* [PATCH 0/2] rt5651: Enable platforms with int mic on IN2
@ 2017-10-18 16:07 Carlo Caione
2017-10-18 16:07 ` [PATCH 1/2] ASoC: intel: byt: Enable quirk logic for custom maps Carlo Caione
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Carlo Caione @ 2017-10-18 16:07 UTC (permalink / raw)
To: linux, pierre-louis.bossart, lgirdwood, broonie, alsa-devel,
linux-kernel
Cc: Carlo Caione
From: Carlo Caione <carlo@endlessm.com>
While working on enabling a cherry-trail laptop shipping the rt5651
codec I realized that the machine driver needed some fixup.
In particular the laptop I'm working on (KIANO SlimNote 14.2) has the
internal mic connected to the IN2 port.
All the laptop-specific work with the related quirks will follow.
Carlo Caione (2):
ASoC: intel: byt: Enable quirk logic for custom maps
ASoC: intel: byt: Introduce new custom IN2 map
sound/soc/intel/boards/bytcr_rt5651.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
--
2.14.2
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] ASoC: intel: byt: Enable quirk logic for custom maps 2017-10-18 16:07 [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 Carlo Caione @ 2017-10-18 16:07 ` Carlo Caione 2017-10-18 16:07 ` [PATCH 2/2] ASoC: intel: byt: Introduce new custom IN2 map Carlo Caione 2017-10-18 16:19 ` [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 Pierre-Louis Bossart 2 siblings, 0 replies; 5+ messages in thread From: Carlo Caione @ 2017-10-18 16:07 UTC (permalink / raw) To: linux, pierre-louis.bossart, lgirdwood, broonie, alsa-devel, linux-kernel Cc: Carlo Caione From: Carlo Caione <carlo@endlessm.com> Enable again the quirk logic for the custom dapm routes. Signed-off-by: Carlo Caione <carlo@endlessm.com> --- sound/soc/intel/boards/bytcr_rt5651.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 4a3516b38c2c..ec84454a232d 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -142,6 +142,12 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic1_map); } + ret = snd_soc_dapm_add_routes(&card->dapm, custom_map, num_routes); + if (ret) { + dev_err(card->dev, "unable to add custom routes map\n"); + return ret; + } + ret = snd_soc_add_card_controls(card, byt_rt5651_controls, ARRAY_SIZE(byt_rt5651_controls)); if (ret) { -- 2.14.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ASoC: intel: byt: Introduce new custom IN2 map 2017-10-18 16:07 [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 Carlo Caione 2017-10-18 16:07 ` [PATCH 1/2] ASoC: intel: byt: Enable quirk logic for custom maps Carlo Caione @ 2017-10-18 16:07 ` Carlo Caione 2017-10-18 16:19 ` [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 Pierre-Louis Bossart 2 siblings, 0 replies; 5+ messages in thread From: Carlo Caione @ 2017-10-18 16:07 UTC (permalink / raw) To: linux, pierre-louis.bossart, lgirdwood, broonie, alsa-devel, linux-kernel Cc: Carlo Caione From: Carlo Caione <carlo@endlessm.com> Introduce a new custom dapm routes map to quirk platforms with the internal mic connected to IN2P. Signed-off-by: Carlo Caione <carlo@endlessm.com> --- sound/soc/intel/boards/bytcr_rt5651.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index ec84454a232d..a8a9c83dfcc0 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -47,7 +47,6 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = { {"ssp2 Rx", NULL, "AIF1 Capture"}, {"Headset Mic", NULL, "micbias1"}, /* lowercase for rt5651 */ - {"IN2P", NULL, "Headset Mic"}, {"Headphone", NULL, "HPOL"}, {"Headphone", NULL, "HPOR"}, {"Speaker", NULL, "LOUTL"}, @@ -55,22 +54,32 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = { }; static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic1_map[] = { + {"IN2P", NULL, "Headset Mic"}, {"DMIC1", NULL, "Internal Mic"}, }; static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic2_map[] = { + {"IN2P", NULL, "Headset Mic"}, {"DMIC2", NULL, "Internal Mic"}, }; static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = { {"Internal Mic", NULL, "micbias1"}, {"IN1P", NULL, "Internal Mic"}, + {"IN2P", NULL, "Headset Mic"}, +}; + +static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = { + {"Internal Mic", NULL, "micbias1"}, + {"IN2P", NULL, "Internal Mic"}, + {"IN1P", NULL, "Headset Mic"}, }; enum { BYT_RT5651_DMIC1_MAP, BYT_RT5651_DMIC2_MAP, BYT_RT5651_IN1_MAP, + BYT_RT5651_IN2_MAP, }; #define BYT_RT5651_MAP(quirk) ((quirk) & 0xff) @@ -133,6 +142,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) custom_map = byt_rt5651_intmic_in1_map; num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map); break; + case BYT_RT5651_IN2_MAP: + custom_map = byt_rt5651_intmic_in2_map; + num_routes = ARRAY_SIZE(byt_rt5651_intmic_in2_map); + break; case BYT_RT5651_DMIC2_MAP: custom_map = byt_rt5651_intmic_dmic2_map; num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic2_map); -- 2.14.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 2017-10-18 16:07 [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 Carlo Caione 2017-10-18 16:07 ` [PATCH 1/2] ASoC: intel: byt: Enable quirk logic for custom maps Carlo Caione 2017-10-18 16:07 ` [PATCH 2/2] ASoC: intel: byt: Introduce new custom IN2 map Carlo Caione @ 2017-10-18 16:19 ` Pierre-Louis Bossart 2017-10-18 16:35 ` Carlo Caione 2 siblings, 1 reply; 5+ messages in thread From: Pierre-Louis Bossart @ 2017-10-18 16:19 UTC (permalink / raw) To: Carlo Caione, linux, lgirdwood, broonie, alsa-devel, linux-kernel Cc: Carlo Caione On 10/18/17 11:07 AM, Carlo Caione wrote: > From: Carlo Caione <carlo@endlessm.com> > > While working on enabling a cherry-trail laptop shipping the rt5651 > codec I realized that the machine driver needed some fixup. > > In particular the laptop I'm working on (KIANO SlimNote 14.2) has the > internal mic connected to the IN2 port. > > All the laptop-specific work with the related quirks will follow. Nice, thanks for the work. You'll have to rebase and resubmit to fix conflicts. I provided changes to simplify DMIC quirks (there is a single interface, not 2 on this chip) that aren't reflected in your patches and the addition of MCLK support. Mark's for-next branch already took the changes this morning. Also let me know if you want the UCM files to be updated. > > Carlo Caione (2): > ASoC: intel: byt: Enable quirk logic for custom maps > ASoC: intel: byt: Introduce new custom IN2 map > > sound/soc/intel/boards/bytcr_rt5651.c | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 2017-10-18 16:19 ` [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 Pierre-Louis Bossart @ 2017-10-18 16:35 ` Carlo Caione 0 siblings, 0 replies; 5+ messages in thread From: Carlo Caione @ 2017-10-18 16:35 UTC (permalink / raw) To: Pierre-Louis Bossart Cc: Carlo Caione, Linux Upstreaming Team, Liam Girdwood, Mark Brown, alsa-devel, linux-kernel On Wed, Oct 18, 2017 at 5:19 PM, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> wrote: > On 10/18/17 11:07 AM, Carlo Caione wrote: >> >> From: Carlo Caione <carlo@endlessm.com> >> >> While working on enabling a cherry-trail laptop shipping the rt5651 >> codec I realized that the machine driver needed some fixup. >> >> In particular the laptop I'm working on (KIANO SlimNote 14.2) has the >> internal mic connected to the IN2 port. >> >> All the laptop-specific work with the related quirks will follow. > > > Nice, thanks for the work. You'll have to rebase and resubmit to fix > conflicts. I provided changes to simplify DMIC quirks (there is a single > interface, not 2 on this chip) that aren't reflected in your patches and the > addition of MCLK support. Mark's for-next branch already took the changes > this morning. Ups, missed that for a few hours. I'll prepare a new PR. > Also let me know if you want the UCM files to be updated. I have a UCM file already that seems to work fine on this laptop. I'll prepare a PR also for that once all the kernel pieces are in place. Thank you, -- Carlo Caione | +39.340.80.30.096 | Endless ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-18 16:35 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-18 16:07 [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 Carlo Caione 2017-10-18 16:07 ` [PATCH 1/2] ASoC: intel: byt: Enable quirk logic for custom maps Carlo Caione 2017-10-18 16:07 ` [PATCH 2/2] ASoC: intel: byt: Introduce new custom IN2 map Carlo Caione 2017-10-18 16:19 ` [PATCH 0/2] rt5651: Enable platforms with int mic on IN2 Pierre-Louis Bossart 2017-10-18 16:35 ` Carlo Caione
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox