*/
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/pm_runtime.h>
#include <sound/soc.h>
#include <sound/pcm_params.h>
#include <uapi/linux/input.h>
codec->stream[substream->stream].state = state;
codec->stream[substream->stream].dai_name = dai->name;
mutex_unlock(&codec->lock);
+ /* to prevent suspend in case of active audio */
+ pm_stay_awake(dai->dev);
return ret;
}
codec->stream[substream->stream].state = state;
codec->stream[substream->stream].dai_name = NULL;
mutex_unlock(&codec->lock);
+ pm_relax(dai->dev);
return;
}
snd_soc_codec_set_drvdata(codec, info);
gbcodec = info;
- /* Empty function for now */
+ device_init_wakeup(codec->dev, 1);
return 0;
}