]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00182220 WM8962: set a default volume
authorGary Zhang <b13634@freescale.com>
Wed, 9 May 2012 03:34:37 +0000 (11:34 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:35 +0000 (08:34 +0200)
set default volume for headphone and speaker

Signed-off-by: Gary Zhang <b13634@freescale.com>
sound/soc/codecs/wm8962.c

index ccf8883a78662347686d81519ad8a389772c6dd2..32481c6dc7207c32d7cc936a03ed10ae396667e1 100644 (file)
@@ -4097,6 +4097,16 @@ static int wm8962_probe(struct snd_soc_codec *codec)
                                            pdata->mic_cfg);
        }
 
+       /* set the default volume for headphpone and speaker */
+       snd_soc_update_bits(codec, WM8962_HPOUTL_VOLUME,
+                           WM8962_HPOUTL_VOL_MASK, 0x65);
+       snd_soc_update_bits(codec, WM8962_HPOUTR_VOLUME,
+                           WM8962_HPOUTR_VOL_MASK, 0x65);
+       snd_soc_update_bits(codec, WM8962_SPKOUTL_VOLUME,
+                           WM8962_SPKOUTL_VOL_MASK, 0x72);
+       snd_soc_update_bits(codec, WM8962_SPKOUTR_VOLUME,
+                           WM8962_SPKOUTR_VOL_MASK, 0x72);
+
        /* Latch volume update bits */
        snd_soc_update_bits(codec, WM8962_LEFT_INPUT_VOLUME,
                            WM8962_IN_VU, WM8962_IN_VU);