]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: rt5640: add Mono ADC Capture Switch control
authorBard Liao <bardliao@realtek.com>
Wed, 26 Oct 2016 01:40:44 +0000 (09:40 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 28 Oct 2016 18:44:40 +0000 (19:44 +0100)
Mono ADC Capture Switch control is missing in the driver. So, add it.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5640.c
sound/soc/codecs/rt5640.h

index 0a7378f81acb141cba3c1996154200d573bbc674..e29a6defefa006dda473856fb30ca64ba152bdd9 100644 (file)
@@ -423,6 +423,8 @@ static const struct snd_kcontrol_new rt5640_snd_controls[] = {
        SOC_DOUBLE_TLV("ADC Capture Volume", RT5640_ADC_DIG_VOL,
                        RT5640_L_VOL_SFT, RT5640_R_VOL_SFT,
                        127, 0, adc_vol_tlv),
+       SOC_DOUBLE("Mono ADC Capture Switch", RT5640_DUMMY1,
+               RT5640_M_MONO_ADC_L_SFT, RT5640_M_MONO_ADC_R_SFT, 1, 1),
        SOC_DOUBLE_TLV("Mono ADC Capture Volume", RT5640_ADC_DATA,
                        RT5640_L_VOL_SFT, RT5640_R_VOL_SFT,
                        127, 0, adc_vol_tlv),
index 22c017c58d5b3f524c4bca6ae59c01b622027dfb..b8a811732a52ebb408a2787740dd449b7be9b3c6 100644 (file)
 #define RT5640_ZCD_HP_EN                       (0x1 << 15)
 
 /* General Control 1 (0xfa) */
+#define RT5640_M_MONO_ADC_L                    (0x1 << 13)
+#define RT5640_M_MONO_ADC_L_SFT                        13
+#define RT5640_M_MONO_ADC_R                    (0x1 << 12)
+#define RT5640_M_MONO_ADC_R_SFT                        12
 #define RT5640_MCLK_DET                                (0x1 << 11)
 
 /* Codec Private Register definition */