Skip to content

Commit a34ee45

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 <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7fba5c7 commit a34ee45

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
@@ -96,6 +96,7 @@ static const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
9696
SND_SOC_DAPM_HP("Headphone", NULL),
9797
SND_SOC_DAPM_MIC("Headset Mic", NULL),
9898
SND_SOC_DAPM_MIC("Int Mic", NULL),
99+
SND_SOC_DAPM_MIC("Int Analog Mic", NULL),
99100
SND_SOC_DAPM_SPK("Ext Spk", NULL),
100101
SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
101102
platform_clock_control, SND_SOC_DAPM_POST_PMD),
@@ -106,6 +107,8 @@ static const struct snd_soc_dapm_route cht_rt5645_audio_map[] = {
106107
{"IN1N", NULL, "Headset Mic"},
107108
{"DMIC L1", NULL, "Int Mic"},
108109
{"DMIC R1", NULL, "Int Mic"},
110+
{"IN2P", NULL, "Int Analog Mic"},
111+
{"IN2N", NULL, "Int Analog Mic"},
109112
{"Headphone", NULL, "HPOL"},
110113
{"Headphone", NULL, "HPOR"},
111114
{"Ext Spk", NULL, "SPOL"},
@@ -119,6 +122,9 @@ static const struct snd_soc_dapm_route cht_rt5645_audio_map[] = {
119122
{"Headphone", NULL, "Platform Clock"},
120123
{"Headset Mic", NULL, "Platform Clock"},
121124
{"Int Mic", NULL, "Platform Clock"},
125+
{"Int Analog Mic", NULL, "Platform Clock"},
126+
{"Int Analog Mic", NULL, "micbias1"},
127+
{"Int Analog Mic", NULL, "micbias2"},
122128
{"Ext Spk", NULL, "Platform Clock"},
123129
};
124130

@@ -147,6 +153,7 @@ static const struct snd_kcontrol_new cht_mc_controls[] = {
147153
SOC_DAPM_PIN_SWITCH("Headphone"),
148154
SOC_DAPM_PIN_SWITCH("Headset Mic"),
149155
SOC_DAPM_PIN_SWITCH("Int Mic"),
156+
SOC_DAPM_PIN_SWITCH("Int Analog Mic"),
150157
SOC_DAPM_PIN_SWITCH("Ext Spk"),
151158
};
152159

0 commit comments

Comments
 (0)