Commit e50fad4f authored by ramesh.babu@linux.intel.com's avatar ramesh.babu@linux.intel.com Committed by Mark Brown

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: default avatarRamesh Babu K V <ramesh.babu@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 9c173d15
...@@ -718,6 +718,9 @@ struct snd_soc_dai_link { ...@@ -718,6 +718,9 @@ struct snd_soc_dai_link {
/* Symmetry requirements */ /* Symmetry requirements */
unsigned int symmetric_rates:1; 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 */ /* codec/machine specific init - e.g. add machine controls */
int (*init)(struct snd_soc_pcm_runtime *rtd); int (*init)(struct snd_soc_pcm_runtime *rtd);
......
...@@ -319,7 +319,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) ...@@ -319,7 +319,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
cpu_dai->runtime = NULL; cpu_dai->runtime = NULL;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 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 */ /* powered down playback stream now */
snd_soc_dapm_stream_event(rtd, snd_soc_dapm_stream_event(rtd,
codec_dai->driver->playback.stream_name, codec_dai->driver->playback.stream_name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment