aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-01-02 13:53:14 -0500
committerMark Brown <broonie@kernel.org>2018-01-03 06:35:47 -0500
commitb70b309950418437bbd2a30afd169c4f09dee3e5 (patch)
tree39ca4623d5ec7be231878accb3ee5efb02fe4537
parenta249a95667f4f814b9b15f4b59049ffe68b5677f (diff)
ASoC: Intel: cht_bsw_rt5645: Analog Mic support
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>
-rw-r--r--sound/soc/intel/boards/cht_bsw_rt5645.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index 18d129caa974..f898ee140cdc 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -118,6 +118,7 @@ static const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
118 SND_SOC_DAPM_HP("Headphone", NULL), 118 SND_SOC_DAPM_HP("Headphone", NULL),
119 SND_SOC_DAPM_MIC("Headset Mic", NULL), 119 SND_SOC_DAPM_MIC("Headset Mic", NULL),
120 SND_SOC_DAPM_MIC("Int Mic", NULL), 120 SND_SOC_DAPM_MIC("Int Mic", NULL),
121 SND_SOC_DAPM_MIC("Int Analog Mic", NULL),
121 SND_SOC_DAPM_SPK("Ext Spk", NULL), 122 SND_SOC_DAPM_SPK("Ext Spk", NULL),
122 SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0, 123 SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
123 platform_clock_control, SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), 124 platform_clock_control, SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
@@ -128,6 +129,8 @@ static const struct snd_soc_dapm_route cht_rt5645_audio_map[] = {
128 {"IN1N", NULL, "Headset Mic"}, 129 {"IN1N", NULL, "Headset Mic"},
129 {"DMIC L1", NULL, "Int Mic"}, 130 {"DMIC L1", NULL, "Int Mic"},
130 {"DMIC R1", NULL, "Int Mic"}, 131 {"DMIC R1", NULL, "Int Mic"},
132 {"IN2P", NULL, "Int Analog Mic"},
133 {"IN2N", NULL, "Int Analog Mic"},
131 {"Headphone", NULL, "HPOL"}, 134 {"Headphone", NULL, "HPOL"},
132 {"Headphone", NULL, "HPOR"}, 135 {"Headphone", NULL, "HPOR"},
133 {"Ext Spk", NULL, "SPOL"}, 136 {"Ext Spk", NULL, "SPOL"},
@@ -135,6 +138,9 @@ static const struct snd_soc_dapm_route cht_rt5645_audio_map[] = {
135 {"Headphone", NULL, "Platform Clock"}, 138 {"Headphone", NULL, "Platform Clock"},
136 {"Headset Mic", NULL, "Platform Clock"}, 139 {"Headset Mic", NULL, "Platform Clock"},
137 {"Int Mic", NULL, "Platform Clock"}, 140 {"Int Mic", NULL, "Platform Clock"},
141 {"Int Analog Mic", NULL, "Platform Clock"},
142 {"Int Analog Mic", NULL, "micbias1"},
143 {"Int Analog Mic", NULL, "micbias2"},
138 {"Ext Spk", NULL, "Platform Clock"}, 144 {"Ext Spk", NULL, "Platform Clock"},
139}; 145};
140 146
@@ -189,6 +195,7 @@ static const struct snd_kcontrol_new cht_mc_controls[] = {
189 SOC_DAPM_PIN_SWITCH("Headphone"), 195 SOC_DAPM_PIN_SWITCH("Headphone"),
190 SOC_DAPM_PIN_SWITCH("Headset Mic"), 196 SOC_DAPM_PIN_SWITCH("Headset Mic"),
191 SOC_DAPM_PIN_SWITCH("Int Mic"), 197 SOC_DAPM_PIN_SWITCH("Int Mic"),
198 SOC_DAPM_PIN_SWITCH("Int Analog Mic"),
192 SOC_DAPM_PIN_SWITCH("Ext Spk"), 199 SOC_DAPM_PIN_SWITCH("Ext Spk"),
193}; 200};
194 201