mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
ASoC: alc5632: Add DMIC switches and controls
Add DMIC switches and controls to ALC5632 codec. Signed-off-by: Andrey Danin <danindrey@mail.ru> Signed-off-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
75b3566f79
commit
5e4e94a958
@ -196,8 +196,12 @@ static const struct snd_kcontrol_new alc5632_snd_controls[] = {
|
|||||||
ALC5632_MIC_CTRL, 10, 2, 0, boost_tlv),
|
ALC5632_MIC_CTRL, 10, 2, 0, boost_tlv),
|
||||||
SOC_SINGLE_TLV("Mic 2 Boost Volume",
|
SOC_SINGLE_TLV("Mic 2 Boost Volume",
|
||||||
ALC5632_MIC_CTRL, 8, 2, 0, boost_tlv),
|
ALC5632_MIC_CTRL, 8, 2, 0, boost_tlv),
|
||||||
SOC_SINGLE_TLV("Digital Boost Volume",
|
SOC_SINGLE_TLV("DMIC Boost Volume",
|
||||||
ALC5632_DIGI_BOOST_CTRL, 0, 7, 0, dig_tlv),
|
ALC5632_DIGI_BOOST_CTRL, 0, 7, 0, dig_tlv),
|
||||||
|
SOC_SINGLE("DMIC En Capture Switch",
|
||||||
|
ALC5632_DIGI_BOOST_CTRL, 15, 1, 0),
|
||||||
|
SOC_SINGLE("DMIC PreFilter Capture Switch",
|
||||||
|
ALC5632_DIGI_BOOST_CTRL, 12, 1, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -266,6 +270,14 @@ SOC_DAPM_SINGLE("SPK2REC_R Capture Switch", ALC5632_ADC_REC_MIXER, 1, 1, 1),
|
|||||||
SOC_DAPM_SINGLE("MONO2REC_R Capture Switch", ALC5632_ADC_REC_MIXER, 0, 1, 1),
|
SOC_DAPM_SINGLE("MONO2REC_R Capture Switch", ALC5632_ADC_REC_MIXER, 0, 1, 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Dmic Mixer */
|
||||||
|
static const struct snd_kcontrol_new alc5632_dmicl_mixer_controls[] = {
|
||||||
|
SOC_DAPM_SINGLE("DMICL2ADC Capture Switch", ALC5632_DIGI_BOOST_CTRL, 7, 1, 1),
|
||||||
|
};
|
||||||
|
static const struct snd_kcontrol_new alc5632_dmicr_mixer_controls[] = {
|
||||||
|
SOC_DAPM_SINGLE("DMICR2ADC Capture Switch", ALC5632_DIGI_BOOST_CTRL, 6, 1, 1),
|
||||||
|
};
|
||||||
|
|
||||||
static const char * const alc5632_spk_n_sour_sel[] = {
|
static const char * const alc5632_spk_n_sour_sel[] = {
|
||||||
"RN/-R", "RP/+R", "LN/-R", "Mute"};
|
"RN/-R", "RP/+R", "LN/-R", "Mute"};
|
||||||
static const char * const alc5632_hpl_out_input_sel[] = {
|
static const char * const alc5632_hpl_out_input_sel[] = {
|
||||||
@ -364,6 +376,12 @@ SND_SOC_DAPM_MIXER("Mono Mix", ALC5632_PWR_MANAG_ADD2, 2, 0,
|
|||||||
SND_SOC_DAPM_MIXER("Speaker Mix", ALC5632_PWR_MANAG_ADD2, 3, 0,
|
SND_SOC_DAPM_MIXER("Speaker Mix", ALC5632_PWR_MANAG_ADD2, 3, 0,
|
||||||
&alc5632_speaker_mixer_controls[0],
|
&alc5632_speaker_mixer_controls[0],
|
||||||
ARRAY_SIZE(alc5632_speaker_mixer_controls)),
|
ARRAY_SIZE(alc5632_speaker_mixer_controls)),
|
||||||
|
SND_SOC_DAPM_MIXER("DMICL Mix", SND_SOC_NOPM, 0, 0,
|
||||||
|
&alc5632_dmicl_mixer_controls[0],
|
||||||
|
ARRAY_SIZE(alc5632_dmicl_mixer_controls)),
|
||||||
|
SND_SOC_DAPM_MIXER("DMICR Mix", SND_SOC_NOPM, 0, 0,
|
||||||
|
&alc5632_dmicr_mixer_controls[0],
|
||||||
|
ARRAY_SIZE(alc5632_dmicr_mixer_controls)),
|
||||||
|
|
||||||
/* input mixers */
|
/* input mixers */
|
||||||
SND_SOC_DAPM_MIXER("Left Capture Mix", ALC5632_PWR_MANAG_ADD2, 1, 0,
|
SND_SOC_DAPM_MIXER("Left Capture Mix", ALC5632_PWR_MANAG_ADD2, 1, 0,
|
||||||
@ -538,12 +556,14 @@ static const struct snd_soc_dapm_route alc5632_dapm_routes[] = {
|
|||||||
|
|
||||||
/* left ADC */
|
/* left ADC */
|
||||||
{"Left ADC", NULL, "Left Capture Mix"},
|
{"Left ADC", NULL, "Left Capture Mix"},
|
||||||
{"Left ADC", NULL, "DMICDAT"},
|
{"DMICL Mix", "DMICL2ADC Capture Switch", "DMICDAT"},
|
||||||
|
{"Left ADC", NULL, "DMICL Mix"},
|
||||||
{"ADCLR", NULL, "Left ADC"},
|
{"ADCLR", NULL, "Left ADC"},
|
||||||
|
|
||||||
/* right ADC */
|
/* right ADC */
|
||||||
{"Right ADC", NULL, "Right Capture Mix"},
|
{"Right ADC", NULL, "Right Capture Mix"},
|
||||||
{"Right ADC", NULL, "DMICDAT"},
|
{"DMICR Mix", "DMICR2ADC Capture Switch", "DMICDAT"},
|
||||||
|
{"Right ADC", NULL, "DMICR Mix"},
|
||||||
{"ADCR Mux", "Stereo ADC", "Right ADC"},
|
{"ADCR Mux", "Stereo ADC", "Right ADC"},
|
||||||
{"ADCR Mux", "Voice ADC", "Right ADC"},
|
{"ADCR Mux", "Voice ADC", "Right ADC"},
|
||||||
{"ADCLR", NULL, "ADCR Mux"},
|
{"ADCLR", NULL, "ADCR Mux"},
|
||||||
|
Loading…
Reference in New Issue
Block a user