From 7c90d5403c8a8d57baa4f93ae2a6c7f623dd6fb1 Mon Sep 17 00:00:00 2001 From: ChenJQ Date: Sun, 26 Sep 2010 02:54:35 -0700 Subject: [PATCH] change headset incall volume for raho --- sound/soc/codecs/wm8994.c | 9 ++++----- sound/soc/rk2818/Kconfig | 6 ++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index a73e8d9c7b02..1d5870fc0abd 100755 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -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 diff --git a/sound/soc/rk2818/Kconfig b/sound/soc/rk2818/Kconfig index 5345fc2f1ad2..304ac0a3ba51 100755 --- a/sound/soc/rk2818/Kconfig +++ b/sound/soc/rk2818/Kconfig @@ -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 -- 2.34.1