Commit a9ee331b authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87imjip9ty.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 67ad8777
......@@ -760,9 +760,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);
......@@ -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);
......
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