summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-03-06 10:10:17 +0900
committerMark Brown <broonie@kernel.org>2020-03-06 14:47:24 +0000
commita9ee331b537a3dfe6778fa4e07c0801f33e474f5 (patch)
treeab4bef02c60957c2f1ad2d4ba1cc822f6ba347de /sound/soc/soc-pcm.c
parent67ad877757cea329f74c1e169ec54131c3f223ce (diff)
ASoC: soc-pcm: Do Digital Mute for both CPU/Codec in same timing.
Digital Mute for CPU is done at soc_pcm_close(), and Digital Mute for Codec is done at soc_pcm_hw_free(). It is just confusable. This patch do Digital Mute for both CPU/Codec in same timing. Then, it cares DAI activity Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87imjip9ty.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index af0e17bfeeab..90d26fccb0da 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -761,9 +761,6 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
snd_soc_runtime_deactivate(rtd, substream->stream);
for_each_rtd_cpu_dai(rtd, i, cpu_dai)
- snd_soc_dai_digital_mute(cpu_dai, 1, substream->stream);
-
- for_each_rtd_cpu_dai(rtd, i, cpu_dai)
snd_soc_dai_shutdown(cpu_dai, substream);
for_each_rtd_codec_dai(rtd, i, codec_dai)
@@ -1232,6 +1229,14 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
substream->stream);
}
+ for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
+ int active = cpu_dai->stream_active[substream->stream];
+
+ if (active == 1)
+ snd_soc_dai_digital_mute(cpu_dai, 1,
+ substream->stream);
+ }
+
/* free any machine hw params */
soc_rtd_hw_free(rtd, substream);