]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00213616 wm8962: set default volume for playback and record
authorGary Zhang <b13634@freescale.com>
Thu, 14 Jun 2012 09:46:24 +0000 (17:46 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:49 +0000 (08:34 +0200)
set default volume for playback and record

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

index 32481c6dc7207c32d7cc936a03ed10ae396667e1..2f5ce28d70a0d7475206337fe069adf96fe13071 100644 (file)
@@ -4097,15 +4097,31 @@ static int wm8962_probe(struct snd_soc_codec *codec)
                                            pdata->mic_cfg);
        }
 
-       /* set the default volume for headphpone and speaker */
+       /* set the default volume for playback and record*/
        snd_soc_update_bits(codec, WM8962_HPOUTL_VOLUME,
-                           WM8962_HPOUTL_VOL_MASK, 0x65);
+                           WM8962_HPOUTL_VOL_MASK, 0x5d);
        snd_soc_update_bits(codec, WM8962_HPOUTR_VOLUME,
-                           WM8962_HPOUTR_VOL_MASK, 0x65);
+                           WM8962_HPOUTR_VOL_MASK, 0x5d);
        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);
+       snd_soc_update_bits(codec, WM8962_LEFT_DAC_VOLUME,
+                           WM8962_DACL_VOL_MASK, 0xd8);
+       snd_soc_update_bits(codec, WM8962_RIGHT_DAC_VOLUME,
+                           WM8962_DACR_VOL_MASK, 0xd8);
+
+       snd_soc_update_bits(codec, WM8962_LEFT_INPUT_VOLUME,
+                           WM8962_INL_VOL_MASK, 0x3f);
+       snd_soc_update_bits(codec, WM8962_RIGHT_INPUT_VOLUME,
+                           WM8962_INR_VOL_MASK, 0x3f);
+       snd_soc_update_bits(codec, WM8962_LEFT_ADC_VOLUME,
+                           WM8962_ADCL_VOL_MASK, 0xd8);
+       snd_soc_update_bits(codec, WM8962_LEFT_ADC_VOLUME,
+                           WM8962_ADCR_VOL_MASK, 0xd8);
+       snd_soc_update_bits(codec, WM8962_RIGHT_INPUT_MIXER_VOLUME,
+                           WM8962_IN3R_MIXINR_VOL_MASK, 0x7);
+
 
        /* Latch volume update bits */
        snd_soc_update_bits(codec, WM8962_LEFT_INPUT_VOLUME,