change headset incall volume for raho
authorChenJQ <chenjq@rock-chips.com>
Sun, 26 Sep 2010 09:54:35 +0000 (02:54 -0700)
committerChenJQ <chenjq@rock-chips.com>
Sun, 26 Sep 2010 09:55:06 +0000 (02:55 -0700)
sound/soc/codecs/wm8994.c
sound/soc/rk2818/Kconfig

index a73e8d9c7b02bd00a87e06800e41f13b0d04ecd5..1d5870fc0abdcc0143cde3a6532e93058ed79acb 100755 (executable)
@@ -675,10 +675,6 @@ void handsetMIC_to_baseband_to_headset(void)
                wm8994_write(0x1E,  0x0006);  //mic vol
                wm8994_write(0x18,  320+(vol+16)*10/15);  //mic vol
        }
-       vol=CONFIG_WM8994_HEADSET_INCALL_VOL;
-       if(vol>0)vol=0;
-       if(vol<-21)vol=-21;
-       wm8994_write(0x31,  (((-vol)/3)<<3)+(-vol)/3);  //-21dB
 
        wm8994_write(0x22,  0x0000);
        wm8994_write(0x23,  0x0100);
@@ -690,8 +686,11 @@ void handsetMIC_to_baseband_to_headset(void)
        wm8994_write(0x2E,  0x0003);  //bit 1 IN2RP_TO_MIXOUTR bit 12 DAC1R_TO_HPOUT1R  0x0102
 #endif
 #ifdef CONFIG_SND_BB_DIFFERENTIAL_INPUT
+       vol=CONFIG_WM8994_HEADSET_INCALL_VOL;
+       if(vol>6)vol=6;
+       if(vol<-12)vol=-12;
+       wm8994_write(0x2B,  (vol+12)/3+1);  //-12~6dB
        wm8994_write(0x02,  0x6240);
-       wm8994_write(0x2B,  0x0005);  //VRX_MIXINL_VOL
        wm8994_write(0x2D,  0x0041);  //bit 1 MIXINL_TO_MIXOUTL bit 12 DAC1L_TO_HPOUT1L  0x0102 
        wm8994_write(0x2E,  0x0081);  //bit 1 MIXINL_TO_MIXOUTR bit 12 DAC1R_TO_HPOUT1R  0x0102
 #endif
index 5345fc2f1ad294cc3e62ac9bac8934f329db1b8f..304ac0a3ba5114d4e3f648d8137c98368c2441d4 100755 (executable)
@@ -78,11 +78,13 @@ config WM8994_EARPIECE_INCALL_VOL
          -27dB to 30dB
 endif
 
+if SND_BB_DIFFERENTIAL_INPUT
 config WM8994_HEADSET_INCALL_VOL
-       default -9
+       default 6
        int "Setting the wm8994 headset incall vol"
        help
-         -21dB to 0dB
+         -12dB to 6dB
+endif
 
 config WM8994_HEADSET_INCALL_MIC_VOL  
        default -6