Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: max98090/91: adding two virtual Mux widgets for digital mics

The two digital mics M1(primary digital mic) and M2(secondary digital
mic) work independently of one another. It means they could be switched
On or Off independently of one another. To control their On or Off
state, with this patch creating two virtual multiplexer widgets
"DMIC M1 Mux" and "DMIC M2 Mux", with two options "Enable" and "Disable".

Signed-off-by: Sharique Mohammad <sharq0406@gmail.com>
Link: https://patch.msgid.link/20251103091447.771793-1-sharq0406@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Sharique Mohammad and committed by
Mark Brown
947eaef2 db66398f

+16
+16
sound/soc/codecs/max98090.c
··· 817 817 static const struct snd_kcontrol_new max98090_dmic_mux = 818 818 SOC_DAPM_ENUM("DMIC Mux", dmic_mux_enum); 819 819 820 + static const char * const dmic_mX_mux_text[] = { "Enable", "Disable" }; 821 + 822 + static SOC_ENUM_SINGLE_VIRT_DECL(dmic_m1_enum, dmic_mX_mux_text); 823 + static const struct snd_kcontrol_new max98090_dmic_m1_mux = 824 + SOC_DAPM_ENUM("DMIC M1 Mux", dmic_m1_enum); 825 + 826 + static SOC_ENUM_SINGLE_VIRT_DECL(dmic_m2_enum, dmic_mX_mux_text); 827 + static const struct snd_kcontrol_new max98090_dmic_m2_mux = 828 + SOC_DAPM_ENUM("DMIC M2 Mux", dmic_m2_enum); 829 + 820 830 /* LINEA mixer switch */ 821 831 static const struct snd_kcontrol_new max98090_linea_mixer_controls[] = { 822 832 SOC_DAPM_SINGLE("IN1 Switch", M98090_REG_LINE_INPUT_CONFIG, ··· 1116 1106 1117 1107 SND_SOC_DAPM_MUX("DMIC Mux", SND_SOC_NOPM, 0, 0, &max98090_dmic_mux), 1118 1108 1109 + SND_SOC_DAPM_MUX("DMIC M1 Mux", SND_SOC_NOPM, 0, 0, 1110 + &max98090_dmic_m1_mux), 1111 + 1119 1112 SND_SOC_DAPM_PGA_E("MIC1 Input", M98090_REG_MIC1_INPUT_LEVEL, 1120 1113 M98090_MIC_PA1EN_SHIFT, 0, NULL, 0, max98090_micinput_event, 1121 1114 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), ··· 1254 1241 SND_SOC_DAPM_POST_PMU), 1255 1242 SND_SOC_DAPM_SUPPLY("DMIC34_HPF", M98090_REG_FILTER_CONFIG, 1256 1243 M98090_FLT_DMIC34HPF_SHIFT, 0, NULL, 0), 1244 + 1245 + SND_SOC_DAPM_MUX("DMIC M2 Mux", SND_SOC_NOPM, 0, 0, 1246 + &max98090_dmic_m2_mux), 1257 1247 1258 1248 SND_SOC_DAPM_AIF_OUT("AIFOUT2L", "HiFi Capture", 0, 1259 1249 SND_SOC_NOPM, 0, 0),