rt5651: Enable platforms with int mic on IN2
Subsystems (3)
cover rt5651: Enable platforms with int mic on IN2
From: Carlo Caione <[email protected]>
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(-)
Signature · 1 line
2.14.2
PATCH 1/2 ASoC: intel: byt: Enable quirk logic for custom maps
From: Carlo Caione <[email protected]>
Enable again the quirk logic for the custom dapm routes.
--- sound/soc/intel/boards/bytcr_rt5651.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/soc/intel/boards/bytcr_rt5651.c +6 -0
@@ -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) {
Signature · 1 line
2.14.2
PATCH 2/2 ASoC: intel: byt: Introduce new custom IN2 map
In reply to Carlo CaioneFrom: Carlo Caione <[email protected]>
Introduce a new custom dapm routes map to quirk platforms with the internal mic connected to IN2P.
--- sound/soc/intel/boards/bytcr_rt5651.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
sound/soc/intel/boards/bytcr_rt5651.c +14 -1
@@ -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);
Signature · 1 line
2.14.2
Quoted 9 lines · Carlo Caione
From: Carlo Caione <[email protected]>
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.
Quoted 8 lines
Carlo Caione (2):
ASoC: intel: byt: Enable quirk logic for custom maps
ASoC: intel: byt: Introduce new custom IN2 mapsound/soc/intel/boards/bytcr_rt5651.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
Quoted 10 lines · Pierre-Louis Bossart
Quoted 9 lines · Carlo Caione
From: Carlo Caione <[email protected]>
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.
Quoted 8 lines
Quoted 1 line
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.
Quoted 1 line
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,
Signature · 1 line
Carlo Caione | +39.340.80.30.096 | Endless