ASoC: Codec: Fix dmic capture in rt5659 driver
Sameer Pujar [Fri, 21 Aug 2015 14:14:44 +0000 (19:14 +0530)]
The change is needed for allowing the capture to
happen from connected dmic via codec.

Bug 200131501

Change-Id: I91bdcbcd96110d756e10b8ebdd4096e5eb485e91
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/787362
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Tested-by: Diwakar Paliwal <dpaliwal@nvidia.com>
Reviewed-by: Diwakar Paliwal <dpaliwal@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

sound/soc/codecs/rt5659.c

index b6011fe..fba6fd8 100644 (file)
@@ -39,6 +39,7 @@ static struct reg_default init_list[] = {
        /*DMIC1_SDA from GPIO5*/
        {RT5659_DMIC_CTRL_1,            0x24a8},
        {RT5659_GPIO_CTRL_1,            0x4800},
+       {RT5659_GPIO_CTRL_3,            0x8000},
        /* Headset mic (IN1) */
        {RT5659_IN1_IN2,                0x4000}, /*Set BST1 to 36dB*/
        /* Jack detect (JD3 to IRQ)*/
@@ -4365,6 +4366,8 @@ static int rt5659_i2c_probe(struct i2c_client *i2c,
                return -ENODEV;
        }
 
+       rt5659->pdata.dmic1_data_pin = RT5659_DMIC1_DATA_GPIO5;
+
        regmap_write(rt5659->regmap, RT5659_RESET, 0);
 
        rt5659_calibrate(rt5659);