Skip to content

Commit 1d65600

Browse files
jwrdegoedegregkh
authored andcommitted
ASoC: Intel: cht_bsw_rt5645: Analog Mic support
[ Upstream commit b70b309 ] Various Cherry Trail boards with a rt5645 codec have an analog mic connected to IN2P + IN2N. The mic on this boards also needs micbias to be enabled, on some boards micbias1 is used and on others micbias2, so we enable both. This commit adds a new "Int Analog Mic" DAPM widget for this, so that we do not end up enabling micbias on boards with a digital mic which uses the already present "Int Mic" widget. Some existing UCM files already refer to "Int Mic" for their "Internal Analog Microphones" SectionDevice, but these don't work anyways since they enable the RECMIX BST1 Switch instead of the BST2 switch. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 522371c commit 1d65600

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sound/soc/intel/boards/cht_bsw_rt5645.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ static const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
133133
SND_SOC_DAPM_HP("Headphone", NULL),
134134
SND_SOC_DAPM_MIC("Headset Mic", NULL),
135135
SND_SOC_DAPM_MIC("Int Mic", NULL),
136+
SND_SOC_DAPM_MIC("Int Analog Mic", NULL),
136137
SND_SOC_DAPM_SPK("Ext Spk", NULL),
137138
SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
138139
platform_clock_control, SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
@@ -143,13 +144,18 @@ static const struct snd_soc_dapm_route cht_rt5645_audio_map[] = {
143144
{"IN1N", NULL, "Headset Mic"},
144145
{"DMIC L1", NULL, "Int Mic"},
145146
{"DMIC R1", NULL, "Int Mic"},
147+
{"IN2P", NULL, "Int Analog Mic"},
148+
{"IN2N", NULL, "Int Analog Mic"},
146149
{"Headphone", NULL, "HPOL"},
147150
{"Headphone", NULL, "HPOR"},
148151
{"Ext Spk", NULL, "SPOL"},
149152
{"Ext Spk", NULL, "SPOR"},
150153
{"Headphone", NULL, "Platform Clock"},
151154
{"Headset Mic", NULL, "Platform Clock"},
152155
{"Int Mic", NULL, "Platform Clock"},
156+
{"Int Analog Mic", NULL, "Platform Clock"},
157+
{"Int Analog Mic", NULL, "micbias1"},
158+
{"Int Analog Mic", NULL, "micbias2"},
153159
{"Ext Spk", NULL, "Platform Clock"},
154160
};
155161

@@ -204,6 +210,7 @@ static const struct snd_kcontrol_new cht_mc_controls[] = {
204210
SOC_DAPM_PIN_SWITCH("Headphone"),
205211
SOC_DAPM_PIN_SWITCH("Headset Mic"),
206212
SOC_DAPM_PIN_SWITCH("Int Mic"),
213+
SOC_DAPM_PIN_SWITCH("Int Analog Mic"),
207214
SOC_DAPM_PIN_SWITCH("Ext Spk"),
208215
};
209216

0 commit comments

Comments
 (0)