From: ramesh.babu@linux.intel.com Date: Thu, 27 Oct 2011 06:42:33 +0000 (+0530) Subject: ASoC: Allow machines to ignore pmdown_time per-link X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e50fad4f029c36ed85a71fe7413684cfd3c7d78c;p=mv-sheeva.git ASoC: Allow machines to ignore pmdown_time per-link With this flag, each dai_link in machine driver can choose to ignore pmdown_time during DAPM shut down sequence. If the ignore_pmdown_time is set, the DAPM for corresponding DAI will be executed immediately. Signed-off-by: Ramesh Babu K V Signed-off-by: Vinod Koul Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/include/sound/soc.h b/include/sound/soc.h index 11cfb5953e0..877fcc1e016 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -718,6 +718,9 @@ struct snd_soc_dai_link { /* Symmetry requirements */ unsigned int symmetric_rates:1; + /* pmdown_time is ignored at stop */ + unsigned int ignore_pmdown_time:1; + /* codec/machine specific init - e.g. add machine controls */ int (*init)(struct snd_soc_pcm_runtime *rtd); diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index ee15337353f..52a7259f618 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -319,7 +319,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) cpu_dai->runtime = NULL; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - if (unlikely(codec->ignore_pmdown_time)) { + if (unlikely(codec->ignore_pmdown_time || + rtd->dai_link->ignore_pmdown_time)) { /* powered down playback stream now */ snd_soc_dapm_stream_event(rtd, codec_dai->driver->playback.stream_name,