Skip to contentSkip to conversation

ASoC: rt5645: Add Mono ADC Boost Gain control

PATCH In review Ben Zhang 1 participant 2 messages Nov 3, 2015

Subsystems (3)
lore
Share & tools
lore

Ben Zhang

author
#0 lore raw

PATCH 1/1 ASoC: rt5645: Add Mono ADC Boost Gain control

"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.

---
 sound/soc/codecs/rt5645.c | 3 +++
 sound/soc/codecs/rt5645.h | 8 ++++++++
 2 files changed, 11 insertions(+)
sound/soc/codecs/rt5645.c +3 -0
index f046bb8..f8c5e82 100644
@@ -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,
sound/soc/codecs/rt5645.h +8 -0
index 7cea282..9ddba59 100644
@@ -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
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
author
#1 lore raw
Quoted 6 lines · Ben Zhang

"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.

Please ignore this patch. The control has already been added by commit 8c1a9d6323ab
("ASoC: rt5645: Correct the naming and setting of ADC Boost Volume Control")

Oder, thanks for pointing me to the existing patch.