From: Bard Liao Date: Wed, 26 Oct 2016 01:40:44 +0000 (+0800) Subject: ASoC: rt5640: add Mono ADC Capture Switch control X-Git-Tag: v4.10-rc1~121^2~3^2~5^4 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ca5f17c59b63c3e52f8fad887c27c6eaa5ced81f;p=uclinux-h8%2Flinux.git ASoC: rt5640: add Mono ADC Capture Switch control Mono ADC Capture Switch control is missing in the driver. So, add it. Signed-off-by: Bard Liao Tested-by: Pierre-Louis Bossart Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 0a7378f81acb..e29a6defefa0 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -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), diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h index 22c017c58d5b..b8a811732a52 100644 --- a/sound/soc/codecs/rt5640.h +++ b/sound/soc/codecs/rt5640.h @@ -1971,6 +1971,10 @@ #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 */