From 45bceef2bf75d39c99afec08aab1ce1e5fb376b1 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 14 Oct 2011 14:43:33 +0300 Subject: [PATCH] --- yaml --- r: 270879 b: refs/heads/master c: 1d69c5c5de32c355667c105a5fac85c8043128e6 h: refs/heads/master i: 270877: b3b47f20f47c43034bdfacfb5d1a61759e77572b 270875: 1988d4c46fa425a1819ef4afe949c74cb1dae311 270871: 8e6e7827e41754332068957489408a78e37095db 270863: 895c7558f6da0917c08d04fe8274e164ef57bf2d 270847: abf67a1a5ca8f9127733c189650ee8e7ab4b5232 v: v3 --- [refs] | 2 +- trunk/include/sound/soc.h | 1 + trunk/sound/soc/soc-pcm.c | 15 +++++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 1615f8d1266c..e9f875516698 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7a0e67b68701d73b2252bd73f7fd49c54aea1e58 +refs/heads/master: 1d69c5c5de32c355667c105a5fac85c8043128e6 diff --git a/trunk/include/sound/soc.h b/trunk/include/sound/soc.h index 858291dc08f9..11cfb5953e06 100644 --- a/trunk/include/sound/soc.h +++ b/trunk/include/sound/soc.h @@ -578,6 +578,7 @@ struct snd_soc_codec { /* dapm */ struct snd_soc_dapm_context dapm; + unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_codec_root; diff --git a/trunk/sound/soc/soc-pcm.c b/trunk/sound/soc/soc-pcm.c index 8eb0f0711f8c..ee15337353fa 100644 --- a/trunk/sound/soc/soc-pcm.c +++ b/trunk/sound/soc/soc-pcm.c @@ -319,10 +319,17 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) cpu_dai->runtime = NULL; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - /* start delayed pop wq here for playback streams */ - codec_dai->pop_wait = 1; - schedule_delayed_work(&rtd->delayed_work, - msecs_to_jiffies(rtd->pmdown_time)); + if (unlikely(codec->ignore_pmdown_time)) { + /* powered down playback stream now */ + snd_soc_dapm_stream_event(rtd, + codec_dai->driver->playback.stream_name, + SND_SOC_DAPM_STREAM_STOP); + } else { + /* start delayed pop wq here for playback streams */ + codec_dai->pop_wait = 1; + schedule_delayed_work(&rtd->delayed_work, + msecs_to_jiffies(rtd->pmdown_time)); + } } else { /* capture streams can be powered down now */ snd_soc_dapm_stream_event(rtd,