Skip to content

Commit

Permalink
ASoC: rt5640: add Mono ADC Capture Switch control
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bard Liao authored and Mark Brown committed Oct 28, 2016
1 parent 25fb706 commit ca5f17c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/codecs/rt5640.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 4 additions & 0 deletions sound/soc/codecs/rt5640.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ca5f17c

Please sign in to comment.