diff options
| author | Phani Kumar Uppalapati <phaniu@codeaurora.org> | 2015-06-09 00:41:11 -0700 |
|---|---|---|
| committer | Kyle Yan <kyan@codeaurora.org> | 2016-07-06 15:42:22 -0700 |
| commit | 55cdf93234de5771820eead2b78e5281ead50fde (patch) | |
| tree | 36c05c8952bec56306bd97465db6f3dc4e031ace /sound/soc/soc-pcm.c | |
| parent | 9464621a103d77cf8d2f4cfa2e04ea6370539cf3 (diff) | |
ASoC: pcm: Update RX shutdown sequence
Update RX shutdown sequence so that codec
path gets tear down first followed by cpu dai.
This will avoid slim port underflow/overflows
when slim data protocol is changed.
Change-Id: I6e3582fa010d18d4e0ccfde319dfc4d81af1351f
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
| -rw-r--r-- | sound/soc/soc-pcm.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index b4ffe3904dcc..4ef20ba02cb4 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -698,6 +698,20 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) snd_soc_dai_digital_mute(cpu_dai, 1, substream->stream); + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + if (snd_soc_runtime_ignore_pmdown_time(rtd)) { + /* powered down playback stream now */ + snd_soc_dapm_stream_event(rtd, + SNDRV_PCM_STREAM_PLAYBACK, + SND_SOC_DAPM_STREAM_STOP); + } else { + /* start delayed pop wq here for playback streams */ + rtd->pop_wait = 1; + queue_delayed_work(system_power_efficient_wq, + &rtd->delayed_work, + msecs_to_jiffies(rtd->pmdown_time)); + } + } if (cpu_dai->driver->ops->shutdown) cpu_dai->driver->ops->shutdown(substream, cpu_dai); @@ -713,20 +727,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) if (platform->driver->ops && platform->driver->ops->close) platform->driver->ops->close(substream); - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - if (snd_soc_runtime_ignore_pmdown_time(rtd)) { - /* powered down playback stream now */ - snd_soc_dapm_stream_event(rtd, - SNDRV_PCM_STREAM_PLAYBACK, - SND_SOC_DAPM_STREAM_STOP); - } else { - /* start delayed pop wq here for playback streams */ - rtd->pop_wait = 1; - queue_delayed_work(system_power_efficient_wq, - &rtd->delayed_work, - msecs_to_jiffies(rtd->pmdown_time)); - } - } else { + if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) { /* capture streams can be powered down now */ snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE, SND_SOC_DAPM_STREAM_STOP); |
