All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SoC: intel: byt: Introduce new custom IN2 map
@ 2017-10-18 16:49 Carlo Caione
  2017-10-18 18:05   ` Pierre-Louis Bossart
  2017-10-21 10:13   ` Mark Brown
  0 siblings, 2 replies; 9+ messages in thread
From: Carlo Caione @ 2017-10-18 16:49 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 | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 3076bfc0db5e..1dad5c98c9ef 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -37,6 +37,7 @@
 enum {
 	BYT_RT5651_DMIC_MAP,
 	BYT_RT5651_IN1_MAP,
+	BYT_RT5651_IN2_MAP,
 };
 
 #define BYT_RT5651_MAP(quirk)	((quirk) & GENMASK(7, 0))
@@ -58,6 +59,8 @@ static void log_quirks(struct device *dev)
 		dev_info(dev, "quirk DMIC_MAP enabled");
 	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
 		dev_info(dev, "quirk IN1_MAP enabled");
+	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN2_MAP)
+		dev_info(dev, "quirk IN2_MAP enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
 		dev_info(dev, "quirk DMIC enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
@@ -143,7 +146,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"},
@@ -151,15 +153,23 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
+	{"IN2P", NULL, "Headset Mic"},
 	{"DMIC L1", NULL, "Internal Mic"},
 	{"DMIC R1", NULL, "Internal Mic"},
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
 	{"Internal Mic", NULL, "micbias1"},
+	{"IN2P", NULL, "Headset Mic"},
 	{"IN1P", NULL, "Internal Mic"},
 };
 
+static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
+	{"Internal Mic", NULL, "micbias1"},
+	{"IN1P", NULL, "Headset Mic"},
+	{"IN2P", NULL, "Internal Mic"},
+};
+
 static const struct snd_kcontrol_new byt_rt5651_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Headphone"),
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -246,6 +256,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;
 	default:
 		custom_map = byt_rt5651_intmic_dmic_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [alsa-devel] [PATCH] SoC: intel: byt: Introduce new custom IN2 map
  2017-10-18 16:49 [PATCH] SoC: intel: byt: Introduce new custom IN2 map Carlo Caione
@ 2017-10-18 18:05   ` Pierre-Louis Bossart
  2017-10-21 10:13   ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2017-10-18 18:05 UTC (permalink / raw)
  To: Carlo Caione, linux, lgirdwood, broonie, alsa-devel, linux-kernel
  Cc: Carlo Caione

On 10/18/17 11:49 AM, Carlo Caione wrote:
> From: Carlo Caione <carlo@endlessm.com>
> 
> Introduce a new custom dapm routes map to quirk platforms with the
> internal mic connected to IN2P.

LGTM. If we start getting more quirks for this codec, we should think of 
adding a module parameters to select them from the command line or with 
modprobe (as done in other machine drivers).

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> 
> Signed-off-by: Carlo Caione <carlo@endlessm.com>
> ---
>   sound/soc/intel/boards/bytcr_rt5651.c | 16 +++++++++++++++-
>   1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 3076bfc0db5e..1dad5c98c9ef 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -37,6 +37,7 @@
>   enum {
>   	BYT_RT5651_DMIC_MAP,
>   	BYT_RT5651_IN1_MAP,
> +	BYT_RT5651_IN2_MAP,
>   };
>   
>   #define BYT_RT5651_MAP(quirk)	((quirk) & GENMASK(7, 0))
> @@ -58,6 +59,8 @@ static void log_quirks(struct device *dev)
>   		dev_info(dev, "quirk DMIC_MAP enabled");
>   	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
>   		dev_info(dev, "quirk IN1_MAP enabled");
> +	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN2_MAP)
> +		dev_info(dev, "quirk IN2_MAP enabled");
>   	if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
>   		dev_info(dev, "quirk DMIC enabled");
>   	if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
> @@ -143,7 +146,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"},
> @@ -151,15 +153,23 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
>   };
>   
>   static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
> +	{"IN2P", NULL, "Headset Mic"},
>   	{"DMIC L1", NULL, "Internal Mic"},
>   	{"DMIC R1", NULL, "Internal Mic"},
>   };
>   
>   static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
>   	{"Internal Mic", NULL, "micbias1"},
> +	{"IN2P", NULL, "Headset Mic"},
>   	{"IN1P", NULL, "Internal Mic"},
>   };
>   
> +static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
> +	{"Internal Mic", NULL, "micbias1"},
> +	{"IN1P", NULL, "Headset Mic"},
> +	{"IN2P", NULL, "Internal Mic"},
> +};
> +
>   static const struct snd_kcontrol_new byt_rt5651_controls[] = {
>   	SOC_DAPM_PIN_SWITCH("Headphone"),
>   	SOC_DAPM_PIN_SWITCH("Headset Mic"),
> @@ -246,6 +256,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;
>   	default:
>   		custom_map = byt_rt5651_intmic_dmic_map;
>   		num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] SoC: intel: byt: Introduce new custom IN2 map
@ 2017-10-18 18:05   ` Pierre-Louis Bossart
  0 siblings, 0 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2017-10-18 18:05 UTC (permalink / raw)
  To: Carlo Caione, linux, lgirdwood, broonie, alsa-devel, linux-kernel
  Cc: Carlo Caione

On 10/18/17 11:49 AM, Carlo Caione wrote:
> From: Carlo Caione <carlo@endlessm.com>
> 
> Introduce a new custom dapm routes map to quirk platforms with the
> internal mic connected to IN2P.

LGTM. If we start getting more quirks for this codec, we should think of 
adding a module parameters to select them from the command line or with 
modprobe (as done in other machine drivers).

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> 
> Signed-off-by: Carlo Caione <carlo@endlessm.com>
> ---
>   sound/soc/intel/boards/bytcr_rt5651.c | 16 +++++++++++++++-
>   1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 3076bfc0db5e..1dad5c98c9ef 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -37,6 +37,7 @@
>   enum {
>   	BYT_RT5651_DMIC_MAP,
>   	BYT_RT5651_IN1_MAP,
> +	BYT_RT5651_IN2_MAP,
>   };
>   
>   #define BYT_RT5651_MAP(quirk)	((quirk) & GENMASK(7, 0))
> @@ -58,6 +59,8 @@ static void log_quirks(struct device *dev)
>   		dev_info(dev, "quirk DMIC_MAP enabled");
>   	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
>   		dev_info(dev, "quirk IN1_MAP enabled");
> +	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN2_MAP)
> +		dev_info(dev, "quirk IN2_MAP enabled");
>   	if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
>   		dev_info(dev, "quirk DMIC enabled");
>   	if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
> @@ -143,7 +146,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"},
> @@ -151,15 +153,23 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
>   };
>   
>   static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
> +	{"IN2P", NULL, "Headset Mic"},
>   	{"DMIC L1", NULL, "Internal Mic"},
>   	{"DMIC R1", NULL, "Internal Mic"},
>   };
>   
>   static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
>   	{"Internal Mic", NULL, "micbias1"},
> +	{"IN2P", NULL, "Headset Mic"},
>   	{"IN1P", NULL, "Internal Mic"},
>   };
>   
> +static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
> +	{"Internal Mic", NULL, "micbias1"},
> +	{"IN1P", NULL, "Headset Mic"},
> +	{"IN2P", NULL, "Internal Mic"},
> +};
> +
>   static const struct snd_kcontrol_new byt_rt5651_controls[] = {
>   	SOC_DAPM_PIN_SWITCH("Headphone"),
>   	SOC_DAPM_PIN_SWITCH("Headset Mic"),
> @@ -246,6 +256,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;
>   	default:
>   		custom_map = byt_rt5651_intmic_dmic_map;
>   		num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Applied "SoC: intel: byt: Introduce new custom IN2 map" to the asoc tree
  2017-10-18 16:49 [PATCH] SoC: intel: byt: Introduce new custom IN2 map Carlo Caione
@ 2017-10-21 10:13   ` Mark Brown
  2017-10-21 10:13   ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2017-10-21 10:13 UTC (permalink / raw)
  To: Carlo Caione
  Cc: Mark Brown, linux, pierre-louis.bossart, lgirdwood, broonie,
	alsa-devel, linux-kernel, alsa-devel

The patch

   SoC: intel: byt: Introduce new custom IN2 map

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 39712db878a499542651eb6c2f5ceec4eacc72d1 Mon Sep 17 00:00:00 2001
From: Carlo Caione <carlo@endlessm.com>
Date: Wed, 18 Oct 2017 17:49:57 +0100
Subject: [PATCH] SoC: intel: byt: Introduce new custom IN2 map

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>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 3076bfc0db5e..1dad5c98c9ef 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -37,6 +37,7 @@
 enum {
 	BYT_RT5651_DMIC_MAP,
 	BYT_RT5651_IN1_MAP,
+	BYT_RT5651_IN2_MAP,
 };
 
 #define BYT_RT5651_MAP(quirk)	((quirk) & GENMASK(7, 0))
@@ -58,6 +59,8 @@ static void log_quirks(struct device *dev)
 		dev_info(dev, "quirk DMIC_MAP enabled");
 	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
 		dev_info(dev, "quirk IN1_MAP enabled");
+	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN2_MAP)
+		dev_info(dev, "quirk IN2_MAP enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
 		dev_info(dev, "quirk DMIC enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
@@ -143,7 +146,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"},
@@ -151,15 +153,23 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
+	{"IN2P", NULL, "Headset Mic"},
 	{"DMIC L1", NULL, "Internal Mic"},
 	{"DMIC R1", NULL, "Internal Mic"},
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
 	{"Internal Mic", NULL, "micbias1"},
+	{"IN2P", NULL, "Headset Mic"},
 	{"IN1P", NULL, "Internal Mic"},
 };
 
+static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
+	{"Internal Mic", NULL, "micbias1"},
+	{"IN1P", NULL, "Headset Mic"},
+	{"IN2P", NULL, "Internal Mic"},
+};
+
 static const struct snd_kcontrol_new byt_rt5651_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Headphone"),
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -246,6 +256,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;
 	default:
 		custom_map = byt_rt5651_intmic_dmic_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Applied "SoC: intel: byt: Introduce new custom IN2 map" to the asoc tree
@ 2017-10-21 10:13   ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2017-10-21 10:13 UTC (permalink / raw)
  To: Carlo Caione
  Cc: alsa-devel, lgirdwood, linux-kernel, pierre-louis.bossart,
	broonie, linux

The patch

   SoC: intel: byt: Introduce new custom IN2 map

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 39712db878a499542651eb6c2f5ceec4eacc72d1 Mon Sep 17 00:00:00 2001
From: Carlo Caione <carlo@endlessm.com>
Date: Wed, 18 Oct 2017 17:49:57 +0100
Subject: [PATCH] SoC: intel: byt: Introduce new custom IN2 map

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>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 3076bfc0db5e..1dad5c98c9ef 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -37,6 +37,7 @@
 enum {
 	BYT_RT5651_DMIC_MAP,
 	BYT_RT5651_IN1_MAP,
+	BYT_RT5651_IN2_MAP,
 };
 
 #define BYT_RT5651_MAP(quirk)	((quirk) & GENMASK(7, 0))
@@ -58,6 +59,8 @@ static void log_quirks(struct device *dev)
 		dev_info(dev, "quirk DMIC_MAP enabled");
 	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
 		dev_info(dev, "quirk IN1_MAP enabled");
+	if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN2_MAP)
+		dev_info(dev, "quirk IN2_MAP enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
 		dev_info(dev, "quirk DMIC enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
@@ -143,7 +146,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"},
@@ -151,15 +153,23 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
+	{"IN2P", NULL, "Headset Mic"},
 	{"DMIC L1", NULL, "Internal Mic"},
 	{"DMIC R1", NULL, "Internal Mic"},
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
 	{"Internal Mic", NULL, "micbias1"},
+	{"IN2P", NULL, "Headset Mic"},
 	{"IN1P", NULL, "Internal Mic"},
 };
 
+static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
+	{"Internal Mic", NULL, "micbias1"},
+	{"IN1P", NULL, "Headset Mic"},
+	{"IN2P", NULL, "Internal Mic"},
+};
+
 static const struct snd_kcontrol_new byt_rt5651_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Headphone"),
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -246,6 +256,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;
 	default:
 		custom_map = byt_rt5651_intmic_dmic_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [alsa-devel] [PATCH] SoC: intel: byt: Introduce new custom IN2 map
  2017-10-18 18:05   ` Pierre-Louis Bossart
@ 2017-11-16 13:53     ` Carlo Caione
  -1 siblings, 0 replies; 9+ messages in thread
From: Carlo Caione @ 2017-11-16 13:53 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Carlo Caione, Linux Upstreaming Team, Liam Girdwood, Mark Brown,
	alsa-devel, open list, Carlo Caione

On Wed, Oct 18, 2017 at 7:05 PM, Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
> On 10/18/17 11:49 AM, Carlo Caione wrote:
>>
>> From: Carlo Caione <carlo@endlessm.com>
>>
>> Introduce a new custom dapm routes map to quirk platforms with the
>> internal mic connected to IN2P.
>
>
> LGTM. If we start getting more quirks for this codec, we should think of
> adding a module parameters to select them from the command line or with
> modprobe (as done in other machine drivers).

Hey Pierre,
I'm currently working on a laptop (always with the rt5651 codec)
having two separate internal mics (on IN1P and IN2P) and the headset
on IN3P. I was thinking how to describe this situation in the current
driver without having to add all the 6 different configuration as
quirks. Any suggestion?

Cheers,

-- 
Carlo Caione

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] SoC: intel: byt: Introduce new custom IN2 map
@ 2017-11-16 13:53     ` Carlo Caione
  0 siblings, 0 replies; 9+ messages in thread
From: Carlo Caione @ 2017-11-16 13:53 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: alsa-devel, Liam Girdwood, open list, Mark Brown, Carlo Caione,
	Carlo Caione, Linux Upstreaming Team

On Wed, Oct 18, 2017 at 7:05 PM, Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
> On 10/18/17 11:49 AM, Carlo Caione wrote:
>>
>> From: Carlo Caione <carlo@endlessm.com>
>>
>> Introduce a new custom dapm routes map to quirk platforms with the
>> internal mic connected to IN2P.
>
>
> LGTM. If we start getting more quirks for this codec, we should think of
> adding a module parameters to select them from the command line or with
> modprobe (as done in other machine drivers).

Hey Pierre,
I'm currently working on a laptop (always with the rt5651 codec)
having two separate internal mics (on IN1P and IN2P) and the headset
on IN3P. I was thinking how to describe this situation in the current
driver without having to add all the 6 different configuration as
quirks. Any suggestion?

Cheers,

-- 
Carlo Caione

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-devel] [PATCH] SoC: intel: byt: Introduce new custom IN2 map
  2017-11-16 13:53     ` Carlo Caione
  (?)
@ 2017-11-21  9:30     ` Carlo Caione
  2017-11-21 15:12       ` Pierre-Louis Bossart
  -1 siblings, 1 reply; 9+ messages in thread
From: Carlo Caione @ 2017-11-21  9:30 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Linux Upstreaming Team, Liam Girdwood, Mark Brown, alsa-devel,
	open list, Carlo Caione

On Thu, Nov 16, 2017 at 1:53 PM, Carlo Caione <carlo@caione.org> wrote:
> On Wed, Oct 18, 2017 at 7:05 PM, Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> wrote:
>> On 10/18/17 11:49 AM, Carlo Caione wrote:
>>>
>>> From: Carlo Caione <carlo@endlessm.com>
>>>
>>> Introduce a new custom dapm routes map to quirk platforms with the
>>> internal mic connected to IN2P.
>>
>>
>> LGTM. If we start getting more quirks for this codec, we should think of
>> adding a module parameters to select them from the command line or with
>> modprobe (as done in other machine drivers).
>
> Hey Pierre,
> I'm currently working on a laptop (always with the rt5651 codec)
> having two separate internal mics (on IN1P and IN2P) and the headset
> on IN3P. I was thinking how to describe this situation in the current
> driver without having to add all the 6 different configuration as
> quirks. Any suggestion?

gentle ping on this question.

cheers,

-- 
Carlo Caione

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-devel] [PATCH] SoC: intel: byt: Introduce new custom IN2 map
  2017-11-21  9:30     ` [alsa-devel] " Carlo Caione
@ 2017-11-21 15:12       ` Pierre-Louis Bossart
  0 siblings, 0 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2017-11-21 15:12 UTC (permalink / raw)
  To: Carlo Caione
  Cc: alsa-devel, Liam Girdwood, open list, Mark Brown, Carlo Caione,
	Linux Upstreaming Team

On 11/21/17 3:30 AM, Carlo Caione wrote:
> On Thu, Nov 16, 2017 at 1:53 PM, Carlo Caione <carlo@caione.org> wrote:
>> On Wed, Oct 18, 2017 at 7:05 PM, Pierre-Louis Bossart
>> <pierre-louis.bossart@linux.intel.com> wrote:
>>> On 10/18/17 11:49 AM, Carlo Caione wrote:
>>>>
>>>> From: Carlo Caione <carlo@endlessm.com>
>>>>
>>>> Introduce a new custom dapm routes map to quirk platforms with the
>>>> internal mic connected to IN2P.
>>>
>>>
>>> LGTM. If we start getting more quirks for this codec, we should think of
>>> adding a module parameters to select them from the command line or with
>>> modprobe (as done in other machine drivers).
>>
>> Hey Pierre,
>> I'm currently working on a laptop (always with the rt5651 codec)
>> having two separate internal mics (on IN1P and IN2P) and the headset
>> on IN3P. I was thinking how to describe this situation in the current
>> driver without having to add all the 6 different configuration as
>> quirks. Any suggestion?


The microphone configurations are not handled with a mask but an enum 
and the BYT_RT5651_MAP() macro. You can just add a new configuration 
such at BYT_RT5651_IN1_IN2 which uses the analog mics on those two and 
implicitly use IN3 for the headset. I don't see the point of handling 
all possible permutations at this point.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-21 15:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18 16:49 [PATCH] SoC: intel: byt: Introduce new custom IN2 map Carlo Caione
2017-10-18 18:05 ` [alsa-devel] " Pierre-Louis Bossart
2017-10-18 18:05   ` Pierre-Louis Bossart
2017-11-16 13:53   ` [alsa-devel] " Carlo Caione
2017-11-16 13:53     ` Carlo Caione
2017-11-21  9:30     ` [alsa-devel] " Carlo Caione
2017-11-21 15:12       ` Pierre-Louis Bossart
2017-10-21 10:13 ` Applied "SoC: intel: byt: Introduce new custom IN2 map" to the asoc tree Mark Brown
2017-10-21 10:13   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.