diff options
author | Sumit Bhattacharya <sumitb@nvidia.com> | 2011-12-07 17:58:14 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-15 11:47:34 +0530 |
commit | 96d3f4ab25478b4b108118c6839cc386853a78ef (patch) | |
tree | 05636de6653a7db68a92e89de99461cd90d53bd5 /sound/soc/tegra/tegra_pcm.h | |
parent | c37dac584d6f0af1dc2b3c941b103bd81d11bd91 (diff) |
ASoC: Tegra: Acquire wake_lock during playback capture
Acquire wake_lock from alsa kernel when pcm playback/capture
starts and hold it until playack/capture ends. It is needed
to prevent device from going into suspend state in middle
of audio playback.
Change-Id: I71e5fae0268f73a3e57f8d886c1b228d46899ea4
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/68671
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound/soc/tegra/tegra_pcm.h')
-rw-r--r-- | sound/soc/tegra/tegra_pcm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra_pcm.h b/sound/soc/tegra/tegra_pcm.h index dbb90339fe0d..883c979268de 100644 --- a/sound/soc/tegra/tegra_pcm.h +++ b/sound/soc/tegra/tegra_pcm.h @@ -33,6 +33,10 @@ #include <mach/dma.h> +#ifdef CONFIG_HAS_WAKELOCK +#include <linux/wakelock.h> +#endif + struct tegra_pcm_dma_params { unsigned long addr; unsigned long wrap; @@ -50,6 +54,10 @@ struct tegra_runtime_data { int dma_req_idx; struct tegra_dma_req dma_req[2]; struct tegra_dma_channel *dma_chan; +#ifdef CONFIG_HAS_WAKELOCK + struct wake_lock tegra_wake_lock; + char tegra_wake_lock_name[32]; +#endif }; #endif |