ASoC: Ensure WM8962 PLL registers are reset
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 1 Nov 2011 13:36:10 +0000 (13:36 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 1 Nov 2011 18:44:55 +0000 (18:44 +0000)
The WM8962 has a separate software reset for the PLL registers. Ensure that
these are reset also on startup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
sound/soc/codecs/wm8962.c

index f60dfa16545e79ae821551b964151b997b7194a9..32d931f1122cc3b8225e8525b24e0765d242324c 100644 (file)
@@ -1961,7 +1961,13 @@ static int wm8962_readable_register(struct snd_soc_codec *codec, unsigned int re
 
 static int wm8962_reset(struct snd_soc_codec *codec)
 {
-       return snd_soc_write(codec, WM8962_SOFTWARE_RESET, 0x6243);
+       int ret;
+
+       ret = snd_soc_write(codec, WM8962_SOFTWARE_RESET, 0x6243);
+       if (ret != 0)
+               return ret;
+
+       return snd_soc_write(codec, WM8962_PLL_SOFTWARE_RESET, 0);
 }
 
 static const DECLARE_TLV_DB_SCALE(inpga_tlv, -2325, 75, 0);