aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@nokia.com>2008-06-27 07:07:57 -0400
committerJaroslav Kysela <perex@perex.cz>2008-07-10 03:31:40 -0400
commit4d20f70a787e03530786152ea27a6ed157205cdc (patch)
tree2600388d466aa38d0105dee5ba05905096a8e5c7
parent6cabf6b0694951288520512e0b68c78523acc9fd (diff)
ALSA: ASoC: TLV320AIC3X: Add mixer control for ADC highpass filter
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--sound/soc/codecs/tlv320aic3x.c6
-rw-r--r--sound/soc/codecs/tlv320aic3x.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 4f0bf26f170b..d13830623db1 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -223,6 +223,8 @@ static const char *aic3x_right_hpcom_mux[] =
223 { "differential of HPROUT", "constant VCM", "single-ended", 223 { "differential of HPROUT", "constant VCM", "single-ended",
224 "differential of HPLCOM", "external feedback" }; 224 "differential of HPLCOM", "external feedback" };
225static const char *aic3x_linein_mode_mux[] = { "single-ended", "differential" }; 225static const char *aic3x_linein_mode_mux[] = { "single-ended", "differential" };
226static const char *aic3x_adc_hpf[] =
227 { "Disabled", "0.0045xFs", "0.0125xFs", "0.025xFs" };
226 228
227#define LDAC_ENUM 0 229#define LDAC_ENUM 0
228#define RDAC_ENUM 1 230#define RDAC_ENUM 1
@@ -232,6 +234,7 @@ static const char *aic3x_linein_mode_mux[] = { "single-ended", "differential" };
232#define LINE1R_ENUM 5 234#define LINE1R_ENUM 5
233#define LINE2L_ENUM 6 235#define LINE2L_ENUM 6
234#define LINE2R_ENUM 7 236#define LINE2R_ENUM 7
237#define ADC_HPF_ENUM 8
235 238
236static const struct soc_enum aic3x_enum[] = { 239static const struct soc_enum aic3x_enum[] = {
237 SOC_ENUM_SINGLE(DAC_LINE_MUX, 6, 3, aic3x_left_dac_mux), 240 SOC_ENUM_SINGLE(DAC_LINE_MUX, 6, 3, aic3x_left_dac_mux),
@@ -242,6 +245,7 @@ static const struct soc_enum aic3x_enum[] = {
242 SOC_ENUM_SINGLE(LINE1R_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux), 245 SOC_ENUM_SINGLE(LINE1R_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux),
243 SOC_ENUM_SINGLE(LINE2L_2_LADC_CTRL, 7, 2, aic3x_linein_mode_mux), 246 SOC_ENUM_SINGLE(LINE2L_2_LADC_CTRL, 7, 2, aic3x_linein_mode_mux),
244 SOC_ENUM_SINGLE(LINE2R_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux), 247 SOC_ENUM_SINGLE(LINE2R_2_RADC_CTRL, 7, 2, aic3x_linein_mode_mux),
248 SOC_ENUM_DOUBLE(AIC3X_CODEC_DFILT_CTRL, 6, 4, 4, aic3x_adc_hpf),
245}; 249};
246 250
247static const struct snd_kcontrol_new aic3x_snd_controls[] = { 251static const struct snd_kcontrol_new aic3x_snd_controls[] = {
@@ -292,6 +296,8 @@ static const struct snd_kcontrol_new aic3x_snd_controls[] = {
292 /* Input */ 296 /* Input */
293 SOC_DOUBLE_R("PGA Capture Volume", LADC_VOL, RADC_VOL, 0, 0x7f, 0), 297 SOC_DOUBLE_R("PGA Capture Volume", LADC_VOL, RADC_VOL, 0, 0x7f, 0),
294 SOC_DOUBLE_R("PGA Capture Switch", LADC_VOL, RADC_VOL, 7, 0x01, 1), 298 SOC_DOUBLE_R("PGA Capture Switch", LADC_VOL, RADC_VOL, 7, 0x01, 1),
299
300 SOC_ENUM("ADC HPF Cut-off", aic3x_enum[ADC_HPF_ENUM]),
295}; 301};
296 302
297/* add non dapm controls */ 303/* add non dapm controls */
diff --git a/sound/soc/codecs/tlv320aic3x.h b/sound/soc/codecs/tlv320aic3x.h
index c1dd1ac0ceac..e6009461063f 100644
--- a/sound/soc/codecs/tlv320aic3x.h
+++ b/sound/soc/codecs/tlv320aic3x.h
@@ -37,6 +37,8 @@
37#define AIC3X_ASD_INTF_CTRLB 9 37#define AIC3X_ASD_INTF_CTRLB 9
38/* Audio overflow status and PLL R value programming register */ 38/* Audio overflow status and PLL R value programming register */
39#define AIC3X_OVRF_STATUS_AND_PLLR_REG 11 39#define AIC3X_OVRF_STATUS_AND_PLLR_REG 11
40/* Audio codec digital filter control register */
41#define AIC3X_CODEC_DFILT_CTRL 12
40 42
41/* ADC PGA Gain control registers */ 43/* ADC PGA Gain control registers */
42#define LADC_VOL 15 44#define LADC_VOL 15