From: 陈金泉 Date: Sat, 18 May 2013 08:09:28 +0000 (+0800) Subject: fix RK616 codec ADC TYPE error X-Git-Tag: firefly_0821_release~7079 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=93ced55ca9d9ae49e55134e4850900b2f251c99a;p=firefly-linux-kernel-4.4.55.git fix RK616 codec ADC TYPE error --- diff --git a/sound/soc/codecs/rk616_codec.c b/sound/soc/codecs/rk616_codec.c index ccad50bd9ca7..e702e91209d3 100755 --- a/sound/soc/codecs/rk616_codec.c +++ b/sound/soc/codecs/rk616_codec.c @@ -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) diff --git a/sound/soc/codecs/rk616_codec.h b/sound/soc/codecs/rk616_codec.h index 09a98f4dff65..bd540c4afcd9 100755 --- a/sound/soc/codecs/rk616_codec.h +++ b/sound/soc/codecs/rk616_codec.h @@ -123,10 +123,10 @@ #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) @@ -210,7 +210,7 @@ #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