From 51bfb1cdabf6bfd9f5707d047669102067f2ac47 Mon Sep 17 00:00:00 2001 From: lxt Date: Sun, 28 Sep 2014 08:15:28 +0800 Subject: [PATCH] rk312x codec : add the ALC & AGC funtion of codec --- sound/soc/codecs/rk312x_codec.c | 7 +++++++ sound/soc/codecs/rk312x_codec.h | 1 + 2 files changed, 8 insertions(+) diff --git a/sound/soc/codecs/rk312x_codec.c b/sound/soc/codecs/rk312x_codec.c index 420e6a5262ce..4c3e0994d685 100755 --- a/sound/soc/codecs/rk312x_codec.c +++ b/sound/soc/codecs/rk312x_codec.c @@ -313,6 +313,7 @@ static int rk312x_codec_register(struct snd_soc_codec *codec, unsigned int reg) case RK312x_PGAR_AGC_MIN_H: case RK312x_PGAR_AGC_MIN_L: case RK312x_PGAR_AGC_CTL5: + case RK312x_ALC_CTL: return 1; default: return 0; @@ -1765,6 +1766,9 @@ static struct rk312x_reg_val_typ capture_power_up_list[] = { {0x94, 0x20 | CAP_VOL}, {0x98, CAP_VOL}, {0x88, 0xf7}, + {0x28, 0x3c}, + {0x124, 0x78}, + {0x164, 0x78}, }; #define RK312x_CODEC_CAPTURE_POWER_UP_LIST_LEN ARRAY_SIZE(capture_power_up_list) @@ -1783,6 +1787,9 @@ static struct rk312x_reg_val_typ capture_power_down_list[] = { {0x9c, 0x00}, {0x88, 0x00}, {0x90, 0x44}, + {0x28, 0x0c}, + {0x124, 0x38}, + {0x164, 0x38}, }; #define RK312x_CODEC_CAPTURE_POWER_DOWN_LIST_LEN ARRAY_SIZE(\ capture_power_down_list) diff --git a/sound/soc/codecs/rk312x_codec.h b/sound/soc/codecs/rk312x_codec.h index 68f28c8dad73..a4fddd3f70e9 100755 --- a/sound/soc/codecs/rk312x_codec.h +++ b/sound/soc/codecs/rk312x_codec.h @@ -20,6 +20,7 @@ #define RK312x_DAC_INT_CTL1 (RK312x_CODEC_BASE + 0x10) #define RK312x_DAC_INT_CTL2 (RK312x_CODEC_BASE + 0x14) #define RK312x_DAC_INT_CTL3 (RK312x_CODEC_BASE + 0x18) +#define RK312x_ALC_CTL (RK312x_CODEC_BASE + 0x28) #define RK312x_ADC_MIC_CTL (RK312x_CODEC_BASE + 0x88) #define RK312x_BST_CTL (RK312x_CODEC_BASE + 0x8c) #define RK312x_ALC_MUNIN_CTL (RK312x_CODEC_BASE + 0x90) -- 2.34.1