]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
wm8711: Fix
authorRostislav Lisovy <lisovy@gmail.com>
Thu, 28 Feb 2013 10:49:57 +0000 (11:49 +0100)
committerRostislav Lisovy <lisovy@gmail.com>
Thu, 28 Feb 2013 10:49:57 +0000 (11:49 +0100)
sound/soc/codecs/wm8711.c

index 740edf03dcdd18e9da9dc7cfd43b2af553b87985..bbed062b5aea3f4f78ec2a7b96adcf09b34e1e7c 100644 (file)
@@ -164,7 +164,7 @@ static int wm8711_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_codec *codec = dai->codec;
        struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec);
-       u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0xfffc;
+       u16 iface = snd_soc_read(codec, WM8711_IFACE) & ~0xc;
        int i = get_coeff(wm8711->sysclk, params_rate(params));
        u16 srate = (coeff_div[i].sr << 2) |
                (coeff_div[i].bosr << 1) | coeff_div[i].usb;
@@ -216,10 +216,11 @@ static int wm8711_mute(struct snd_soc_dai *dai, int mute)
        u16 mute_reg = snd_soc_read(codec, WM8711_APDIGI) & 0xfff7;
 
        if (mute)
-               snd_soc_write(codec, WM8711_APDIGI, mute_reg | 0x8);
-       else
-               snd_soc_write(codec, WM8711_APDIGI, mute_reg);
+               mute_reg |= 0x8;
 
+       snd_soc_write(codec, WM8711_APDIGI, mute_reg);
+
+       printk("wm8711 mute: 0x%x\n", mute_reg);
        return 0;
 }