]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - sound/soc/codecs/wm8711.c
wm8711: Enable DAC after unmute
[linux-imx.git] / sound / soc / codecs / wm8711.c
index 5b428b060d418da78286a605060c4cb4c019801b..9b6fd734576658073d2ee3bc3e71cc65da634df7 100644 (file)
@@ -211,12 +211,15 @@ static int wm8711_mute(struct snd_soc_dai *dai, int mute)
 {
        struct snd_soc_codec *codec = dai->codec;
        u16 mute_reg = snd_soc_read(codec, WM8711_APDIGI) & 0xfff7;
+       u16 audio_path = snd_soc_read(codec, WM8711_APANA) & 0xffef;
 
        if (mute)
-               snd_soc_write(codec, WM8711_APDIGI, mute_reg | 0x8);
+               mute_reg |= 0x8;        /* Enable soft mute */
        else
-               snd_soc_write(codec, WM8711_APDIGI, mute_reg);
+               audio_path |= 0x10;     /* Select DAC */
 
+       snd_soc_write(codec, WM8711_APDIGI, mute_reg);
+       snd_soc_write(codec, WM8711_APANA, audio_path);
        return 0;
 }