diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-09-06 13:33:24 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-09-09 03:11:59 -0400 |
commit | 6010b2da1f11752dd58191423fc9878b0ce420c8 (patch) | |
tree | c96d329d2e3e17d4da2de15d6fc359a5022fc691 /sound/soc/soc-core.c | |
parent | 3e860846d7f44993ded9b4fbf36e7b051b86df08 (diff) |
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 <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1563ceedf61a..ad381138fc2e 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) | |||
340 | } | 340 | } |
341 | codec->active--; | 341 | codec->active--; |
342 | 342 | ||
343 | /* Muting the DAC suppresses artifacts caused during digital | ||
344 | * shutdown, for example from stopping clocks. | ||
345 | */ | ||
346 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
347 | snd_soc_dai_digital_mute(codec_dai, 1); | ||
348 | |||
343 | if (cpu_dai->ops.shutdown) | 349 | if (cpu_dai->ops.shutdown) |
344 | cpu_dai->ops.shutdown(substream); | 350 | cpu_dai->ops.shutdown(substream); |
345 | 351 | ||