From 96d3f4ab25478b4b108118c6839cc386853a78ef Mon Sep 17 00:00:00 2001 From: Sumit Bhattacharya Date: Wed, 7 Dec 2011 17:58:14 +0530 Subject: 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 Reviewed-on: http://git-master/r/68671 Reviewed-by: Nikesh Oswal Reviewed-by: Scott Peterson --- sound/soc/tegra/tegra_pcm.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sound/soc/tegra/tegra_pcm.h') 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 +#ifdef CONFIG_HAS_WAKELOCK +#include +#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 -- cgit v1.2.3