diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-10-14 14:43:33 +0300 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-14 20:42:21 +0100 |
commit | 1d69c5c5de32c355667c105a5fac85c8043128e6 (patch) | |
tree | fcfe58ff456b0503c063f2e678d4c09110334b73 /sound/soc/soc-pcm.c | |
parent | 7a0e67b68701d73b2252bd73f7fd49c54aea1e58 (diff) | |
download | op-kernel-dev-1d69c5c5de32c355667c105a5fac85c8043128e6.zip op-kernel-dev-1d69c5c5de32c355667c105a5fac85c8043128e6.tar.gz |
ASoC: core: Add flag to ignore pmdown_time at pcm_close
With this flag codec drivers can indicate that it is desired
to ignore the pmdown_time for DAPM shutdown sequence when
playback stream is stopped.
The DAPM sequence will be executed without delay in this case.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 8eb0f07..ee15337 100644 --- a/sound/soc/soc-pcm.c +++ b/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, |