From: Mark Brown Date: Wed, 8 Feb 2012 20:10:56 +0000 (+0000) Subject: ASoC: pcm: If pmdown_time is zero then shut down DAPM immediately X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b5d1d036eadb30996184cc335c798219dd5922a9;p=openwrt%2Fstaging%2Fblogic.git ASoC: pcm: If pmdown_time is zero then shut down DAPM immediately Since we've already got logic to special case immediate teardown of the stream we may as well use it if the pmdown_time has been set to zero by the application layer instead of scheduling a work item with zero delay. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 121318defea3..15816eccad34 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -369,7 +369,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) cpu_dai->runtime = NULL; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - if (codec->ignore_pmdown_time || + if (!rtd->pmdown_time || codec->ignore_pmdown_time || rtd->dai_link->ignore_pmdown_time) { /* powered down playback stream now */ snd_soc_dapm_stream_event(rtd,