]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: Fix WM8962 headphone volume update for use of advanced caches
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 7 Jun 2011 22:42:04 +0000 (23:42 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:38 +0000 (15:05 -0700)
commit 0f82bdf572fc6e42147151aa4d52542f7fc6d793 upstream.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/soc/codecs/wm8962.c

index 500011eb8b2bdb31d88fa2a8df819c72626a97bc..c22659edbb3eca676cc71d10f8627491743f1327 100644 (file)
@@ -1998,12 +1998,12 @@ static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,
                return 0;
 
        /* If the left PGA is enabled hit that VU bit... */
-       if (reg_cache[WM8962_PWR_MGMT_2] & WM8962_HPOUTL_PGA_ENA)
+       if (snd_soc_read(codec, WM8962_PWR_MGMT_2) & WM8962_HPOUTL_PGA_ENA)
                return snd_soc_write(codec, WM8962_HPOUTL_VOLUME,
                                     reg_cache[WM8962_HPOUTL_VOLUME]);
 
        /* ...otherwise the right.  The VU is stereo. */
-       if (reg_cache[WM8962_PWR_MGMT_2] & WM8962_HPOUTR_PGA_ENA)
+       if (snd_soc_read(codec, WM8962_PWR_MGMT_2) & WM8962_HPOUTR_PGA_ENA)
                return snd_soc_write(codec, WM8962_HPOUTR_VOLUME,
                                     reg_cache[WM8962_HPOUTR_VOLUME]);