[alsa-devel] [PATCH] ASoC: rt5645: Add Mono ADC Boost Gain control
Ben Zhang
benzh at chromium.org
Tue Nov 3 05:37:14 CET 2015
"Mono ADC Boost Gain" (MX-20h) is a coarse capture volume
control with a step of 12dB on the Mono audio path. It is
similar to the "STO1 ADC Boost Gain" control on the Stereo1
audio path.
Signed-off-by: Ben Zhang <benzh at chromium.org>
---
sound/soc/codecs/rt5645.c | 3 +++
sound/soc/codecs/rt5645.h | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index f046bb8..f8c5e82 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -625,6 +625,9 @@ static const struct snd_kcontrol_new rt5645_snd_controls[] = {
SOC_DOUBLE_TLV("STO2 ADC Boost Gain", RT5645_ADC_BST_VOL1,
RT5645_STO2_ADC_L_BST_SFT, RT5645_STO2_ADC_R_BST_SFT, 3, 0,
adc_bst_tlv),
+ SOC_DOUBLE_TLV("Mono ADC Boost Gain", RT5645_ADC_BST_VOL2,
+ RT5645_MONO_ADC_L_BST_SFT, RT5645_MONO_ADC_R_BST_SFT, 3, 0,
+ adc_bst_tlv),
/* I2S2 function select */
SOC_SINGLE("I2S2 Func Switch", RT5645_GPIO_CTRL1, RT5645_I2S2_SEL_SFT,
diff --git a/sound/soc/codecs/rt5645.h b/sound/soc/codecs/rt5645.h
index 7cea282..9ddba59 100644
--- a/sound/soc/codecs/rt5645.h
+++ b/sound/soc/codecs/rt5645.h
@@ -322,6 +322,14 @@
#define RT5645_STO2_ADC_COMP_MASK (0x3 << 4)
#define RT5645_STO2_ADC_COMP_SFT 4
+/* Mono ADC Boost Volume Control (0x20) */
+#define RT5645_MONO_ADC_L_BST_MASK (0x3 << 14)
+#define RT5645_MONO_ADC_L_BST_SFT 14
+#define RT5645_MONO_ADC_R_BST_MASK (0x3 << 12)
+#define RT5645_MONO_ADC_R_BST_SFT 12
+#define RT5645_MONO_ADC_COMP_MASK (0x3 << 10)
+#define RT5645_MONO_ADC_COMP_SFT 10
+
/* Stereo2 ADC Mixer Control (0x26) */
#define RT5645_STO2_ADC_SRC_MASK (0x1 << 15)
#define RT5645_STO2_ADC_SRC_SFT 15
--
2.6.0.rc2.230.g3dd15c0
More information about the Alsa-devel
mailing list