From: Mark Brown Date: Sat, 6 Sep 2008 17:33:24 +0000 (+0100) Subject: ALSA: ASoC: Use codec digital mute when stopping playback X-Git-Tag: v2.6.28-rc1~720^2~89 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6010b2da1f11752dd58191423fc9878b0ce420c8;p=linux-2.6-omap-h63xx.git 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: Mark Brown Signed-off-by: Jaroslav Kysela --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1563ceedf61..ad381138fc2 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -340,6 +340,12 @@ static int soc_codec_close(struct snd_pcm_substream *substream) } 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) cpu_dai->ops.shutdown(substream);