[PATCH] ASoC: rt5682s: Add LDO control for dacref

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add LDO control for dacref.

Signed-off-by: Jack Yu <jack.yu@xxxxxxxxxxx>
---
 sound/soc/codecs/rt5682s.c | 12 ++++++++++++
 sound/soc/codecs/rt5682s.h |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/sound/soc/codecs/rt5682s.c b/sound/soc/codecs/rt5682s.c
index c261c33c4be7..c05996e8fc5a 100644
--- a/sound/soc/codecs/rt5682s.c
+++ b/sound/soc/codecs/rt5682s.c
@@ -1017,6 +1017,15 @@ static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -1725, 75, 0);
 static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);
 static const DECLARE_TLV_DB_SCALE(cbj_bst_tlv, -1200, 150, 0);
 
+/* LDO output select */
+static const char * const rt5682s_ldo_output_select[] = {
+	"1.607V", "1.5V", "1.406V", "1.731V"
+};
+
+static SOC_ENUM_SINGLE_DECL(rt5682s_ldo_output_enum, RT5682S_BIAS_CUR_CTRL_7,
+				RT5682S_DVO_LDO_DACREF_SFT, rt5682s_ldo_output_select);
+
+
 static const struct snd_kcontrol_new rt5682s_snd_controls[] = {
 	/* DAC Digital Volume */
 	SOC_DOUBLE_TLV("DAC1 Playback Volume", RT5682S_DAC1_DIG_VOL,
@@ -1035,6 +1044,9 @@ static const struct snd_kcontrol_new rt5682s_snd_controls[] = {
 	/* ADC Boost Volume Control */
 	SOC_DOUBLE_TLV("STO1 ADC Boost Gain Volume", RT5682S_STO1_ADC_BOOST,
 		RT5682S_STO1_ADC_L_BST_SFT, RT5682S_STO1_ADC_R_BST_SFT, 3, 0, adc_bst_tlv),
+
+	/* LDO Output Select Control */
+	SOC_ENUM("LDO Output Select", rt5682s_ldo_output_enum),
 };
 
 /**
diff --git a/sound/soc/codecs/rt5682s.h b/sound/soc/codecs/rt5682s.h
index 1d79d432d0d8..0ae5a35825f4 100644
--- a/sound/soc/codecs/rt5682s.h
+++ b/sound/soc/codecs/rt5682s.h
@@ -1263,6 +1263,9 @@
 #define RT5682S_JDH_NO_PLUG			(0x1 << 4)
 #define RT5682S_JDH_PLUG			(0x0 << 4)
 
+/* Bias current control 7  (0x0110) */
+#define RT5682S_DVO_LDO_DACREF_SFT			4
+
 /* Charge Pump Internal Register1 (0x0125) */
 #define RT5682S_CP_CLK_HP_MASK			(0x3 << 4)
 #define RT5682S_CP_CLK_HP_100KHZ		(0x0 << 4)
-- 
2.34.1

<<attachment: winmail.dat>>


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux