Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Mark Brown <broonie@kernel.org>, Bard Liao <bardliao@realtek.com>,
	Oder Chiou <oder_chiou@realtek.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.com>
Subject: [PATCH 6/6] ASoC: Intel: cht_bsw_rt5645: Analog Mic support
Date: Tue,  2 Jan 2018 19:53:14 +0100	[thread overview]
Message-ID: <20180102185314.17189-7-hdegoede@redhat.com> (raw)
In-Reply-To: <20180102185314.17189-1-hdegoede@redhat.com>

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>
---
 sound/soc/intel/boards/cht_bsw_rt5645.c | 7 +++++++
 1 file changed, 7 insertions(+)

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[] = {
 	SND_SOC_DAPM_HP("Headphone", NULL),
 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
 	SND_SOC_DAPM_MIC("Int Mic", NULL),
+	SND_SOC_DAPM_MIC("Int Analog Mic", NULL),
 	SND_SOC_DAPM_SPK("Ext Spk", NULL),
 	SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
 			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[] = {
 	{"IN1N", NULL, "Headset Mic"},
 	{"DMIC L1", NULL, "Int Mic"},
 	{"DMIC R1", NULL, "Int Mic"},
+	{"IN2P", NULL, "Int Analog Mic"},
+	{"IN2N", NULL, "Int Analog Mic"},
 	{"Headphone", NULL, "HPOL"},
 	{"Headphone", NULL, "HPOR"},
 	{"Ext Spk", NULL, "SPOL"},
@@ -135,6 +138,9 @@ static const struct snd_soc_dapm_route cht_rt5645_audio_map[] = {
 	{"Headphone", NULL, "Platform Clock"},
 	{"Headset Mic", NULL, "Platform Clock"},
 	{"Int Mic", NULL, "Platform Clock"},
+	{"Int Analog Mic", NULL, "Platform Clock"},
+	{"Int Analog Mic", NULL, "micbias1"},
+	{"Int Analog Mic", NULL, "micbias2"},
 	{"Ext Spk", NULL, "Platform Clock"},
 };
 
@@ -189,6 +195,7 @@ static const struct snd_kcontrol_new cht_mc_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Headphone"),
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
 	SOC_DAPM_PIN_SWITCH("Int Mic"),
+	SOC_DAPM_PIN_SWITCH("Int Analog Mic"),
 	SOC_DAPM_PIN_SWITCH("Ext Spk"),
 };
 
-- 
2.14.3

  parent reply	other threads:[~2018-01-02 18:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-02 18:53 [PATCH 0/6] ASoC: rt5645: Analog microphone fixes Hans de Goede
2018-01-02 18:53 ` [PATCH 1/6] ASoC: rt5645: change micbias widget type to supply Hans de Goede
2018-01-03 10:50   ` Mark Brown
2018-01-03 11:01     ` Hans de Goede
2018-01-03 11:28       ` Mark Brown
2018-01-03 11:32         ` Hans de Goede
2018-01-03 11:36           ` Mark Brown
2018-01-03 12:45     ` Bard Liao
     [not found]     ` <ABFD875FF5FB574BA706497D987D48D702756F3C@RTITMBSV02.realtek.com.tw>
2018-01-04 10:53       ` Mark Brown
     [not found]         ` <ABFD875FF5FB574BA706497D987D48D7027574B8@RTITMBSV02.realtek.com.tw>
2018-01-04 12:01           ` Mark Brown
     [not found]             ` <ABFD875FF5FB574BA706497D987D48D702757599@RTITMBSV02.realtek.com.tw>
2018-01-04 12:41               ` Mark Brown
2018-01-02 18:53 ` [PATCH 2/6] ASoC: rt5645: add micbias power control select Hans de Goede
2018-01-04 12:37   ` Applied "ASoC: rt5645: add micbias power control select." to the asoc tree Mark Brown
2018-01-02 18:53 ` [PATCH 3/6] ASoC: rt5645: set in2_diff flag for GPD win and pocket devices Hans de Goede
2018-01-03 12:13   ` Applied "ASoC: rt5645: set in2_diff flag for GPD win and pocket devices" to the asoc tree Mark Brown
2018-01-02 18:53 ` [PATCH 4/6] ASoC: rt5645: cleanup DMI matching code Hans de Goede
2018-01-03 12:12   ` Applied "ASoC: rt5645: cleanup DMI matching code" to the asoc tree Mark Brown
2018-01-02 18:53 ` [PATCH 5/6] ASoC: rt5645: add platform data for the Teclast X80 Pro tablet Hans de Goede
2018-01-03 12:12   ` Applied "ASoC: rt5645: add platform data for the Teclast X80 Pro tablet" to the asoc tree Mark Brown
2018-01-02 18:53 ` Hans de Goede [this message]
2018-01-03 12:12   ` Applied "ASoC: Intel: cht_bsw_rt5645: Analog Mic support" " Mark Brown
2018-01-02 18:56 ` [PATCH 0/6] ASoC: rt5645: Analog microphone fixes Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180102185314.17189-7-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=oder_chiou@realtek.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox