asoc: alc5640: Mic noise gate
Scott Peterson [Wed, 6 Mar 2013 23:53:03 +0000 (15:53 -0800)]
Enabled noise gate and high pass wind filter
to improve recording performance.

Bug 1234255

Change-Id: I57f4580b979356ec800500d1879e825655058a20
Signed-off-by: Scott Peterson <speterson@nvidia.com>
Reviewed-on: http://git-master/r/206858
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rahul Mittal <rmittal@nvidia.com>
Tested-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-by: Niranjan Wartikar <nwartikar@nvidia.com>
Reviewed-by: Vijay Mali <vmali@nvidia.com>

sound/soc/codecs/rt5640.c

index 7844b54..509e4c1 100644 (file)
@@ -69,6 +69,8 @@ static struct rt5640_init_reg init_list[] = {
        {RT5640_PRIV_DATA       , 0xe0e0},
        {RT5640_PRIV_INDEX      , 0x0023},/* PR23 = 1804'h */
        {RT5640_PRIV_DATA       , 0x1804},
+       {RT5640_PRIV_INDEX      , 0x006e},/* PR6E = 1804'h */
+       {RT5640_PRIV_DATA       , 0x3219},
        /*playback*/
        {RT5640_STO_DAC_MIXER   , 0x1414},/*Dig inf 1 -> Sto DAC mixer -> DACL*/
        {RT5640_OUT_L3_MIXER    , 0x01fe},/*DACL1 -> OUTMIXL*/
@@ -179,8 +181,9 @@ static const u16 rt5640_reg[RT5640_VENDOR_ID2 + 1] = {
        [RT5640_CHARGE_PUMP] = 0x0d00,
        [RT5640_MICBIAS] = 0x3000,
        [RT5640_EQ_CTRL1] = 0x2080,
-       [RT5640_DRC_AGC_1] = 0x2206,
+       [RT5640_DRC_AGC_1] = 0xe206,
        [RT5640_DRC_AGC_2] = 0x1f00,
+       [RT5640_DRC_AGC_3] = 0x0040,
        [RT5640_ANC_CTRL1] = 0x034b,
        [RT5640_ANC_CTRL2] = 0x0066,
        [RT5640_ANC_CTRL3] = 0x000b,
@@ -190,7 +193,7 @@ static const u16 rt5640_reg[RT5640_VENDOR_ID2 + 1] = {
        [RT5640_MP3_PLUS1] = 0x0680,
        [RT5640_MP3_PLUS2] = 0x1c17,
        [RT5640_3D_HP] = 0x8c00,
-       [RT5640_ADJ_HPF] = 0x2a20,
+       [RT5640_ADJ_HPF] = 0xaa20,
        [RT5640_HP_CALIB_AMP_DET] = 0x0420,
        [RT5640_SV_ZCD1] = 0x0809,
        [RT5640_VENDOR_ID1] = 0x10ec,