[alsa-devel] [PATCH v3] ASoC: soc-compress: Cancel delayed power down if needed
Charles Keepax
ckeepax at opensource.wolfsonmicro.com
Fri Mar 8 17:52:52 CET 2013
When a new stream is being opened it is necessary to cancel any delayed
power down of the audio.
Signed-off-by: Charles Keepax <ckeepax at opensource.wolfsonmicro.com>
---
Apologies for the delay on this.
Charles
sound/soc/soc-compress.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index b5b3db7..44bad67 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -198,6 +198,7 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
{
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct snd_soc_platform *platform = rtd->platform;
+ struct snd_soc_dai *codec_dai = rtd->codec_dai;
int ret = 0;
mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
@@ -220,6 +221,10 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
goto out;
}
+ /* cancel any delayed stream shutdown that is pending */
+ rtd->pop_wait = 0;
+ cancel_delayed_work(&rtd->delayed_work);
+
snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
SND_SOC_DAPM_STREAM_START);
--
1.7.2.5
More information about the Alsa-devel
mailing list