Commit 6010b2da authored by Mark Brown's avatar Mark Brown Committed by Jaroslav Kysela

ALSA: ASoC: Use codec digital mute when stopping playback

Muting the DAC masks artefacts introduced as the digital stream shuts
down, for example when the input stops being clocked.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 3e860846
...@@ -340,6 +340,12 @@ static int soc_codec_close(struct snd_pcm_substream *substream) ...@@ -340,6 +340,12 @@ static int soc_codec_close(struct snd_pcm_substream *substream)
} }
codec->active--; codec->active--;
/* Muting the DAC suppresses artifacts caused during digital
* shutdown, for example from stopping clocks.
*/
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
snd_soc_dai_digital_mute(codec_dai, 1);
if (cpu_dai->ops.shutdown) if (cpu_dai->ops.shutdown)
cpu_dai->ops.shutdown(substream); cpu_dai->ops.shutdown(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