From: Carlo Caione <carlo@caione.org>
To: linux@endlessm.com, pierre-louis.bossart@linux.intel.com,
lgirdwood@gmail.com, broonie@kernel.org,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: Carlo Caione <carlo@endlessm.com>
Subject: [PATCH 1/2] ASoC: intel: byt: Introduce new map for dual mics
Date: Tue, 21 Nov 2017 17:15:45 +0000 [thread overview]
Message-ID: <20171121171546.5656-2-carlo@caione.org> (raw)
In-Reply-To: <20171121171546.5656-1-carlo@caione.org>
From: Carlo Caione <carlo@endlessm.com>
The RT5651 codec has 3 analog inputs. Some laptops have two different
internal analog microphones on the external case.
Add a new custom quirk mapping the two internal mics on IN1P / IN2P,
leaving the headset mic on IN3P.
Signed-off-by: Carlo Caione <carlo@endlessm.com>
---
sound/soc/intel/boards/bytcr_rt5651.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index d955836c6870..e3d5e6ea707f 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -38,6 +38,7 @@ enum {
BYT_RT5651_DMIC_MAP,
BYT_RT5651_IN1_MAP,
BYT_RT5651_IN2_MAP,
+ BYT_RT5651_IN1_IN2_MAP,
};
#define BYT_RT5651_MAP(quirk) ((quirk) & GENMASK(7, 0))
@@ -171,6 +172,13 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
{"IN2P", NULL, "Internal Mic"},
};
+static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
+ {"Internal Mic", NULL, "micbias1"},
+ {"IN1P", NULL, "Internal Mic"},
+ {"IN2P", NULL, "Internal Mic"},
+ {"IN3P", NULL, "Headset Mic"},
+};
+
static const struct snd_kcontrol_new byt_rt5651_controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone"),
SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -281,6 +289,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
custom_map = byt_rt5651_intmic_in2_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_in2_map);
break;
+ case BYT_RT5651_IN1_IN2_MAP:
+ custom_map = byt_rt5651_intmic_in1_in2_map;
+ num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
+ break;
default:
custom_map = byt_rt5651_intmic_dmic_map;
num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
--
2.14.1
next prev parent reply other threads:[~2017-11-21 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 17:15 [PATCH 0/2] Update codec driver for dual mics configuration Carlo Caione
2017-11-21 17:15 ` Carlo Caione [this message]
2017-11-29 18:59 ` Applied "ASoC: intel: byt: Introduce new map for dual mics" to the asoc tree Mark Brown
2017-11-21 17:15 ` [PATCH 2/2] ASoC: intel: byt: Fix quirk for KIANO laptop Carlo Caione
2017-11-29 18:59 ` Applied "ASoC: intel: byt: Fix quirk for KIANO laptop" to the asoc tree Mark Brown
2017-11-28 14:08 ` [PATCH 0/2] Update codec driver for dual mics configuration Carlo Caione
2017-11-28 15:15 ` Mark Brown
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=20171121171546.5656-2-carlo@caione.org \
--to=carlo@caione.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=carlo@endlessm.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@endlessm.com \
--cc=pierre-louis.bossart@linux.intel.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