fix RK616 codec ADC TYPE error
author陈金泉 <chenjq@rock-chips.com>
Sat, 18 May 2013 08:09:28 +0000 (16:09 +0800)
committer陈金泉 <chenjq@rock-chips.com>
Sat, 18 May 2013 08:09:28 +0000 (16:09 +0800)
sound/soc/codecs/rk616_codec.c
sound/soc/codecs/rk616_codec.h

index ccad50bd9ca7bc1347b5ba73a151d0a174e7f39f..e702e91209d3ddfcf22babde045d9c7eef2bdc2e 100755 (executable)
@@ -1461,7 +1461,7 @@ static int rk616_hw_params(struct snd_pcm_substream *substream,
        }
 
        // bclk = codec_clk / 4
-       // lrck = bclk / (vwl * 2)
+       // lrck = bclk / (wl * 2)
        div = (((rk616->stereo_sysclk / 4) / rate) / 2);
 
        if ((rk616->stereo_sysclk % (4 * rate * 2) > 0) ||
@@ -1518,10 +1518,10 @@ static int rk616_hw_params(struct snd_pcm_substream *substream,
 
        switch (params_channels(params)) {
        case RK616_MONO:
-               adc_aif1 |= RK616_I2S_TYPE_MONO;
+               adc_aif1 |= RK616_ADC_TYPE_MONO;
                break;
        case RK616_STEREO:
-               adc_aif1 |= RK616_I2S_TYPE_STEREO;
+               adc_aif1 |= RK616_ADC_TYPE_STEREO;
                break;
        default:
                return -EINVAL;
@@ -1536,7 +1536,7 @@ static int rk616_hw_params(struct snd_pcm_substream *substream,
 
        snd_soc_update_bits(codec, RK616_ADC_INT_CTL1,
                         RK616_ADC_VWL_MASK | RK616_ADC_SWAP_MASK |
-                        RK616_I2S_TYPE_MASK, adc_aif1);
+                        RK616_ADC_TYPE_MASK, adc_aif1);
        snd_soc_update_bits(codec, RK616_ADC_INT_CTL2,
                        RK616_ADC_WL_MASK | RK616_ADC_RST_MASK, adc_aif2);
        snd_soc_update_bits(codec, RK616_DAC_INT_CTL1,
@@ -1665,7 +1665,6 @@ static struct rk616_reg_val_typ capture_power_down_list[] = {
        {0x848, 0x1f}, //MIXINL power down and mute, MININL No selecting, MICMUX from BST_L
        {0x840, 0x99}, //BST_L power down, mute, and Single-Ended(bit 6), volume 0(bit 5)
        {0x83c, 0x7c}, //power down
-       {0x828, 0x09}, //Set for Capture pop noise
 };
 #define RK616_CODEC_CAPTURE_POWER_DOWN_LIST_LEN ARRAY_SIZE(capture_power_down_list)
 
index 09a98f4dff65868534ce141236980d6cb440ad69..bd540c4afcd921e001a055469b415df4c112a198 100755 (executable)
 #define RK616_ADC_SWAP_EN                      (0x1 << 1)
 #define RK616_ADC_SWAP_DIS                     (0x0 << 1)
 
-#define RK616_I2S_TYPE_MASK                    0x1
-#define RK616_I2S_TYPE_SFT                     0
-#define RK616_I2S_TYPE_STEREO                  0x1
-#define RK616_I2S_TYPE_MONO                    0x0
+#define RK616_ADC_TYPE_MASK                    0x1
+#define RK616_ADC_TYPE_SFT                     0
+#define RK616_ADC_TYPE_MONO                    0x1
+#define RK616_ADC_TYPE_STEREO                  0x0
 
 /* ADC Interface Control 2 (0x0c) */
 #define RK616_I2S_MODE_MASK                    (0x1 << 4)
 #define RK616_ADC_PWRD_SFT                     6
 
 #define RK616_DIFFIN_MIR_PGAR_RLPWRD           (0x1 << 5)
-#define RK616_DIFFIN_MIR_PGAR_RLPWRD_SFT               5
+#define RK616_DIFFIN_MIR_PGAR_RLPWRD_SFT       5
 
 #define RK616_MIC1_MIC2_MIL_PGAL_RLPWRD                (0x1 << 4)
 #define RK616_MIC1_MIC2_MIL_PGAL_RLPWRD_SFT    4