Skip to content

Commit

Permalink
ALSA: ASoC: Use codec digital mute when stopping playback
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Jaroslav Kysela committed Sep 9, 2008
1 parent 3e86084 commit 6010b2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 6010b2d

Please sign in to comment.