All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Intel/rt5651 updates
@ 2018-01-05 19:20 Pierre-Louis Bossart
  2018-01-05 19:20 ` [PATCH 1/4] ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used Pierre-Louis Bossart
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Pierre-Louis Bossart @ 2018-01-05 19:20 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Keyon Jie, Pierre-Louis Bossart, liam.r.girdwood,
	vinod.koul, broonie, Carlo Caione, bardliao

Fix existing quirks and add new ones, and add support for LineIn

An updated UCM file supporting all possible inputs/outputs is
available at https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
Additional validation of the microphone/LineIn settings is still on-going
with Carlo Caione and Realtek.

Keyon Jie (1):
  ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used

Pierre-Louis Bossart (3):
  ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks
  ASoC: Intel: bytcr-rt5651: fix Kiano DMI quirk
  ASoC: Intel: bytcr-rt5651: add support for Line In

 sound/soc/intel/boards/bytcr_rt5651.c | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

-- 
2.14.1

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

* [PATCH 1/4] ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used
  2018-01-05 19:20 [PATCH 0/4] Intel/rt5651 updates Pierre-Louis Bossart
@ 2018-01-05 19:20 ` Pierre-Louis Bossart
  2018-01-08 16:23   ` Applied "ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used" to the asoc tree Mark Brown
  2018-01-05 19:20 ` [PATCH 2/4] ASoC: Intel: bytcr_rt5651: enable MinnowBoard Turbot quirks Pierre-Louis Bossart
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Pierre-Louis Bossart @ 2018-01-05 19:20 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Keyon Jie, Pierre-Louis Bossart, liam.r.girdwood,
	vinod.koul, broonie, Carlo Caione, bardliao

From: Keyon Jie <yang.jie@linux.intel.com>

On Minnowboard Max with Realtek rt5651 eval board, the IN3P is
connected to Headset Mic.

Here add and select it for Minnowboard Max.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 488ec48f296a..de3758b2aac1 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -39,6 +39,7 @@ enum {
 	BYT_RT5651_IN1_MAP,
 	BYT_RT5651_IN2_MAP,
 	BYT_RT5651_IN1_IN2_MAP,
+	BYT_RT5651_IN3_MAP,
 };
 
 #define BYT_RT5651_MAP(quirk)	((quirk) & GENMASK(7, 0))
@@ -63,6 +64,8 @@ static void log_quirks(struct device *dev)
 		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_MAP(byt_rt5651_quirk) == BYT_RT5651_IN3_MAP)
+		dev_info(dev, "quirk IN3_MAP enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
 		dev_info(dev, "quirk DMIC enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
@@ -179,6 +182,12 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
 	{"IN3P", NULL, "Headset Mic"},
 };
 
+static const struct snd_soc_dapm_route byt_rt5651_intmic_in3_map[] = {
+	{"Internal Mic", NULL, "micbias1"},
+	{"IN3P", NULL, "Headset Mic"},
+	{"IN1P", NULL, "Internal Mic"},
+};
+
 static const struct snd_kcontrol_new byt_rt5651_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Headphone"),
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -255,8 +264,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Circuitco"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Max B3 PLATFORM"),
 		},
-		.driver_data = (void *)(BYT_RT5651_DMIC_MAP |
-					BYT_RT5651_DMIC_EN),
+		.driver_data = (void *)(BYT_RT5651_IN3_MAP),
 	},
 	{
 		.callback = byt_rt5651_quirk_cb,
@@ -293,6 +301,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
 		custom_map = byt_rt5651_intmic_in1_in2_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
 		break;
+	case BYT_RT5651_IN3_MAP:
+		custom_map = byt_rt5651_intmic_in3_map;
+		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in3_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] 13+ messages in thread

* [PATCH 2/4] ASoC: Intel: bytcr_rt5651: enable MinnowBoard Turbot quirks
  2018-01-05 19:20 [PATCH 0/4] Intel/rt5651 updates Pierre-Louis Bossart
  2018-01-05 19:20 ` [PATCH 1/4] ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used Pierre-Louis Bossart
@ 2018-01-05 19:20 ` Pierre-Louis Bossart
  2018-01-08 16:23   ` Applied "ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks" to the asoc tree Mark Brown
  2018-01-05 19:20 ` [PATCH 2/4] ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks Pierre-Louis Bossart
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Pierre-Louis Bossart @ 2018-01-05 19:20 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Keyon Jie, Pierre-Louis Bossart, liam.r.girdwood,
	vinod.koul, broonie, Carlo Caione, bardliao

Define DMI quirk for rt5651 eval board connected to MinnowBoard
Turbot. The only difference with a MinnowBoard MAX is that the MCLK
pin is enabled on the LSE connector

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index de3758b2aac1..7d95008f1795 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -266,6 +266,15 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 		},
 		.driver_data = (void *)(BYT_RT5651_IN3_MAP),
 	},
+	{
+		.callback = byt_rt5651_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ADI"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Turbot"),
+		},
+		.driver_data = (void *)(BYT_RT5651_MCLK_EN |
+					BYT_RT5651_IN3_MAP),
+	},
 	{
 		.callback = byt_rt5651_quirk_cb,
 		.matches = {
-- 
2.14.1

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

* [PATCH 2/4] ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks
  2018-01-05 19:20 [PATCH 0/4] Intel/rt5651 updates Pierre-Louis Bossart
  2018-01-05 19:20 ` [PATCH 1/4] ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used Pierre-Louis Bossart
  2018-01-05 19:20 ` [PATCH 2/4] ASoC: Intel: bytcr_rt5651: enable MinnowBoard Turbot quirks Pierre-Louis Bossart
@ 2018-01-05 19:20 ` Pierre-Louis Bossart
  2018-01-08  8:25   ` Zhang, Keqiao
  2018-01-05 19:20 ` [PATCH 3/4] ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk Pierre-Louis Bossart
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Pierre-Louis Bossart @ 2018-01-05 19:20 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Keyon Jie, Pierre-Louis Bossart, liam.r.girdwood,
	vinod.koul, broonie, Carlo Caione, bardliao

Define DMI quirk for rt5651 eval board connected to MinnowBoard
Turbot. The only difference with a MinnowBoard MAX is that the MCLK
pin is enabled on the LSE connector

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index de3758b2aac1..7d95008f1795 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -266,6 +266,15 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 		},
 		.driver_data = (void *)(BYT_RT5651_IN3_MAP),
 	},
+	{
+		.callback = byt_rt5651_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ADI"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Turbot"),
+		},
+		.driver_data = (void *)(BYT_RT5651_MCLK_EN |
+					BYT_RT5651_IN3_MAP),
+	},
 	{
 		.callback = byt_rt5651_quirk_cb,
 		.matches = {
-- 
2.14.1

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

* [PATCH 3/4] ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk
  2018-01-05 19:20 [PATCH 0/4] Intel/rt5651 updates Pierre-Louis Bossart
                   ` (2 preceding siblings ...)
  2018-01-05 19:20 ` [PATCH 2/4] ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks Pierre-Louis Bossart
@ 2018-01-05 19:20 ` Pierre-Louis Bossart
  2018-01-08 16:23   ` Applied "ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk" to the asoc tree Mark Brown
  2018-01-05 19:20 ` [PATCH 3/4] ASoC: Intel: bytcr-rt5651: fix Kiano DMI quirk Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Pierre-Louis Bossart @ 2018-01-05 19:20 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Keyon Jie, Pierre-Louis Bossart, liam.r.girdwood,
	vinod.koul, broonie, Carlo Caione, bardliao

The current code doesn't enable the MCLK which reduces audio quality
(PLL driven from BLCK), fix the quirk

Tested-by: Carlo Caione <carlo@caione.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 7d95008f1795..dfe6435f8ed0 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -281,7 +281,8 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "KIANO"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "KIANO SlimNote 14.2"),
 		},
-		.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP),
+		.driver_data = (void *)(BYT_RT5651_MCLK_EN |
+					BYT_RT5651_IN1_IN2_MAP),
 	},
 	{}
 };
-- 
2.14.1

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

* [PATCH 3/4] ASoC: Intel: bytcr-rt5651: fix Kiano DMI quirk
  2018-01-05 19:20 [PATCH 0/4] Intel/rt5651 updates Pierre-Louis Bossart
                   ` (3 preceding siblings ...)
  2018-01-05 19:20 ` [PATCH 3/4] ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk Pierre-Louis Bossart
@ 2018-01-05 19:20 ` Pierre-Louis Bossart
  2018-01-05 19:20 ` [PATCH 4/4] ASoC: Intel: bytcr-rt5651: add support for Line In Pierre-Louis Bossart
  2018-01-08  4:44 ` [PATCH 0/4] Intel/rt5651 updates Vinod Koul
  6 siblings, 0 replies; 13+ messages in thread
From: Pierre-Louis Bossart @ 2018-01-05 19:20 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Keyon Jie, Pierre-Louis Bossart, liam.r.girdwood,
	vinod.koul, broonie, Carlo Caione, bardliao

The current code doesn't enable the MCLK which reduces audio quality
(PLL driven from BLCK), fix the quirk

Tested-by: Carlo Caione <carlo@caione.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 7d95008f1795..dfe6435f8ed0 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -281,7 +281,8 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "KIANO"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "KIANO SlimNote 14.2"),
 		},
-		.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP),
+		.driver_data = (void *)(BYT_RT5651_MCLK_EN |
+					BYT_RT5651_IN1_IN2_MAP),
 	},
 	{}
 };
-- 
2.14.1

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

* [PATCH 4/4] ASoC: Intel: bytcr-rt5651: add support for Line In
  2018-01-05 19:20 [PATCH 0/4] Intel/rt5651 updates Pierre-Louis Bossart
                   ` (4 preceding siblings ...)
  2018-01-05 19:20 ` [PATCH 3/4] ASoC: Intel: bytcr-rt5651: fix Kiano DMI quirk Pierre-Louis Bossart
@ 2018-01-05 19:20 ` Pierre-Louis Bossart
  2018-01-08 16:22   ` Applied "ASoC: Intel: bytcr-rt5651: add support for Line In" to the asoc tree Mark Brown
  2018-01-08  4:44 ` [PATCH 0/4] Intel/rt5651 updates Vinod Koul
  6 siblings, 1 reply; 13+ messages in thread
From: Pierre-Louis Bossart @ 2018-01-05 19:20 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Keyon Jie, Pierre-Louis Bossart, liam.r.girdwood,
	vinod.koul, broonie, Carlo Caione, bardliao

Add the DAPM widgets and routes.

Tested with MinnowMax Turbot + rt5651 eval board with Speaker
(LineOut) -> LineIn loopback

Thanks to Bard Liao @ Realtek for providing the 0dB settings

"IN Capture Volume" = 23
"ADC Capture Volume" = 47
"OUT Playback Volume" = 31
"DAC1 Playback Volume" = 175

Cc: Bard Liao <bardliao@realtek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.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 dfe6435f8ed0..22c9cc5d135e 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -131,6 +131,7 @@ static const struct snd_soc_dapm_widget byt_rt5651_widgets[] = {
 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
 	SND_SOC_DAPM_MIC("Internal Mic", NULL),
 	SND_SOC_DAPM_SPK("Speaker", NULL),
+	SND_SOC_DAPM_LINE("Line In", 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),
@@ -142,6 +143,7 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
 	{"Headset Mic", NULL, "Platform Clock"},
 	{"Internal Mic", NULL, "Platform Clock"},
 	{"Speaker", NULL, "Platform Clock"},
+	{"Line In", NULL, "Platform Clock"},
 
 	{"AIF1 Playback", NULL, "ssp2 Tx"},
 	{"ssp2 Tx", NULL, "codec_out0"},
@@ -155,6 +157,9 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
 	{"Headphone", NULL, "HPOR"},
 	{"Speaker", NULL, "LOUTL"},
 	{"Speaker", NULL, "LOUTR"},
+	{"IN2P", NULL, "Line In"},
+	{"IN2N", NULL, "Line In"},
+
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
@@ -193,6 +198,7 @@ static const struct snd_kcontrol_new byt_rt5651_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
 	SOC_DAPM_PIN_SWITCH("Internal Mic"),
 	SOC_DAPM_PIN_SWITCH("Speaker"),
+	SOC_DAPM_PIN_SWITCH("Line In"),
 };
 
 static struct snd_soc_jack_pin bytcr_jack_pins[] = {
-- 
2.14.1

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

* Re: [PATCH 0/4] Intel/rt5651 updates
  2018-01-05 19:20 [PATCH 0/4] Intel/rt5651 updates Pierre-Louis Bossart
                   ` (5 preceding siblings ...)
  2018-01-05 19:20 ` [PATCH 4/4] ASoC: Intel: bytcr-rt5651: add support for Line In Pierre-Louis Bossart
@ 2018-01-08  4:44 ` Vinod Koul
  6 siblings, 0 replies; 13+ messages in thread
From: Vinod Koul @ 2018-01-08  4:44 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: alsa-devel, tiwai, Keyon Jie, liam.r.girdwood, broonie,
	Carlo Caione, bardliao

On Fri, Jan 05, 2018 at 01:20:17PM -0600, Pierre-Louis Bossart wrote:
> Fix existing quirks and add new ones, and add support for LineIn
> 
> An updated UCM file supporting all possible inputs/outputs is
> available at https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
> Additional validation of the microphone/LineIn settings is still on-going
> with Carlo Caione and Realtek.

Acked-By: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

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

* Re: [PATCH 2/4] ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks
  2018-01-05 19:20 ` [PATCH 2/4] ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks Pierre-Louis Bossart
@ 2018-01-08  8:25   ` Zhang, Keqiao
  0 siblings, 0 replies; 13+ messages in thread
From: Zhang, Keqiao @ 2018-01-08  8:25 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel
  Cc: tiwai, Keyon Jie, liam.r.girdwood, Koul, Vinod, broonie,
	Carlo Caione, bardliao



> -----Original Message-----
> From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-bounces@alsa-
> project.org] On Behalf Of Pierre-Louis Bossart
> Sent: Saturday, January 6, 2018 3:20 AM
> To: alsa-devel@alsa-project.org
> Cc: tiwai@suse.de; Keyon Jie <yang.jie@linux.intel.com>; Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com>; liam.r.girdwood@linux.intel.com; Koul,
> Vinod <vinod.koul@intel.com>; broonie@kernel.org; Carlo Caione
> <carlo@caione.org>; bardliao@realtek.com
> Subject: [alsa-devel] [PATCH 2/4] ASoC: Intel: bytcr-rt5651: enable
> MinnowBoard Turbot quirks
> 
> Define DMI quirk for rt5651 eval board connected to MinnowBoard Turbot. The
> only difference with a MinnowBoard MAX is that the MCLK pin is enabled on the
> LSE connector
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Keqiao.Zhang <Keqiao.zhang@intel.com>
> ---
>  sound/soc/intel/boards/bytcr_rt5651.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c
> b/sound/soc/intel/boards/bytcr_rt5651.c
> index de3758b2aac1..7d95008f1795 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -266,6 +266,15 @@ static const struct dmi_system_id
> byt_rt5651_quirk_table[] = {
>  		},
>  		.driver_data = (void *)(BYT_RT5651_IN3_MAP),
>  	},
> +	{
> +		.callback = byt_rt5651_quirk_cb,
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "ADI"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard
> Turbot"),
> +		},
> +		.driver_data = (void *)(BYT_RT5651_MCLK_EN |
> +					BYT_RT5651_IN3_MAP),
> +	},
>  	{
>  		.callback = byt_rt5651_quirk_cb,
>  		.matches = {
> --
> 2.14.1
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Applied "ASoC: Intel: bytcr-rt5651: add support for Line In" to the asoc tree
  2018-01-05 19:20 ` [PATCH 4/4] ASoC: Intel: bytcr-rt5651: add support for Line In Pierre-Louis Bossart
@ 2018-01-08 16:22   ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2018-01-08 16:22 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: alsa-devel, tiwai, Keyon Jie, liam.r.girdwood, vinod.koul,
	broonie, Carlo Caione, bardliao

The patch

   ASoC: Intel: bytcr-rt5651: add support for Line In

has been applied to the asoc tree at

   https://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 ea39bdcf22b084c6e6db0078f3140f0655a1e572 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Fri, 5 Jan 2018 13:20:23 -0600
Subject: [PATCH] ASoC: Intel: bytcr-rt5651: add support for Line In

Add the DAPM widgets and routes.

Tested with MinnowMax Turbot + rt5651 eval board with Speaker
(LineOut) -> LineIn loopback

Thanks to Bard Liao @ Realtek for providing the 0dB settings

"IN Capture Volume" = 23
"ADC Capture Volume" = 47
"OUT Playback Volume" = 31
"DAC1 Playback Volume" = 175

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 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 dfe6435f8ed0..22c9cc5d135e 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -131,6 +131,7 @@ static const struct snd_soc_dapm_widget byt_rt5651_widgets[] = {
 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
 	SND_SOC_DAPM_MIC("Internal Mic", NULL),
 	SND_SOC_DAPM_SPK("Speaker", NULL),
+	SND_SOC_DAPM_LINE("Line In", 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),
@@ -142,6 +143,7 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
 	{"Headset Mic", NULL, "Platform Clock"},
 	{"Internal Mic", NULL, "Platform Clock"},
 	{"Speaker", NULL, "Platform Clock"},
+	{"Line In", NULL, "Platform Clock"},
 
 	{"AIF1 Playback", NULL, "ssp2 Tx"},
 	{"ssp2 Tx", NULL, "codec_out0"},
@@ -155,6 +157,9 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
 	{"Headphone", NULL, "HPOR"},
 	{"Speaker", NULL, "LOUTL"},
 	{"Speaker", NULL, "LOUTR"},
+	{"IN2P", NULL, "Line In"},
+	{"IN2N", NULL, "Line In"},
+
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
@@ -193,6 +198,7 @@ static const struct snd_kcontrol_new byt_rt5651_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
 	SOC_DAPM_PIN_SWITCH("Internal Mic"),
 	SOC_DAPM_PIN_SWITCH("Speaker"),
+	SOC_DAPM_PIN_SWITCH("Line In"),
 };
 
 static struct snd_soc_jack_pin bytcr_jack_pins[] = {
-- 
2.15.1

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

* Applied "ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks" to the asoc tree
  2018-01-05 19:20 ` [PATCH 2/4] ASoC: Intel: bytcr_rt5651: enable MinnowBoard Turbot quirks Pierre-Louis Bossart
@ 2018-01-08 16:23   ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2018-01-08 16:23 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Keqiao.Zhang, alsa-devel, tiwai, Keyon Jie, liam.r.girdwood,
	vinod.koul, broonie, Carlo Caione, bardliao

The patch

   ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks

has been applied to the asoc tree at

   https://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 416f2b51119b8cdd899b226e4cf683d000797a8b Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Fri, 5 Jan 2018 13:20:20 -0600
Subject: [PATCH] ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks

Define DMI quirk for rt5651 eval board connected to MinnowBoard
Turbot. The only difference with a MinnowBoard MAX is that the MCLK
pin is enabled on the LSE connector

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Keqiao.Zhang <Keqiao.zhang@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index a958ed37569f..dfe6435f8ed0 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -266,6 +266,15 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 		},
 		.driver_data = (void *)(BYT_RT5651_IN3_MAP),
 	},
+	{
+		.callback = byt_rt5651_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ADI"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Turbot"),
+		},
+		.driver_data = (void *)(BYT_RT5651_MCLK_EN |
+					BYT_RT5651_IN3_MAP),
+	},
 	{
 		.callback = byt_rt5651_quirk_cb,
 		.matches = {
-- 
2.15.1

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

* Applied "ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used" to the asoc tree
  2018-01-05 19:20 ` [PATCH 1/4] ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used Pierre-Louis Bossart
@ 2018-01-08 16:23   ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2018-01-08 16:23 UTC (permalink / raw)
  To: Keyon Jie
  Cc: alsa-devel, tiwai, Pierre-Louis Bossart, liam.r.girdwood,
	vinod.koul, broonie, Carlo Caione, bardliao

The patch

   ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used

has been applied to the asoc tree at

   https://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 60e3b52e9354550c28090237b083b20bbabed598 Mon Sep 17 00:00:00 2001
From: Keyon Jie <yang.jie@linux.intel.com>
Date: Fri, 5 Jan 2018 13:20:18 -0600
Subject: [PATCH] ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also
 be used

On Minnowboard Max with Realtek rt5651 eval board, the IN3P is
connected to Headset Mic.

Here add and select it for Minnowboard Max.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index de064f0f7b08..a958ed37569f 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -39,6 +39,7 @@ enum {
 	BYT_RT5651_IN1_MAP,
 	BYT_RT5651_IN2_MAP,
 	BYT_RT5651_IN1_IN2_MAP,
+	BYT_RT5651_IN3_MAP,
 };
 
 #define BYT_RT5651_MAP(quirk)	((quirk) & GENMASK(7, 0))
@@ -63,6 +64,8 @@ static void log_quirks(struct device *dev)
 		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_MAP(byt_rt5651_quirk) == BYT_RT5651_IN3_MAP)
+		dev_info(dev, "quirk IN3_MAP enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
 		dev_info(dev, "quirk DMIC enabled");
 	if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
@@ -179,6 +182,12 @@ static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_in2_map[] = {
 	{"IN3P", NULL, "Headset Mic"},
 };
 
+static const struct snd_soc_dapm_route byt_rt5651_intmic_in3_map[] = {
+	{"Internal Mic", NULL, "micbias1"},
+	{"IN3P", NULL, "Headset Mic"},
+	{"IN1P", NULL, "Internal Mic"},
+};
+
 static const struct snd_kcontrol_new byt_rt5651_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Headphone"),
 	SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -255,8 +264,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Circuitco"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Max B3 PLATFORM"),
 		},
-		.driver_data = (void *)(BYT_RT5651_DMIC_MAP |
-					BYT_RT5651_DMIC_EN),
+		.driver_data = (void *)(BYT_RT5651_IN3_MAP),
 	},
 	{
 		.callback = byt_rt5651_quirk_cb,
@@ -294,6 +302,10 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
 		custom_map = byt_rt5651_intmic_in1_in2_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_in2_map);
 		break;
+	case BYT_RT5651_IN3_MAP:
+		custom_map = byt_rt5651_intmic_in3_map;
+		num_routes = ARRAY_SIZE(byt_rt5651_intmic_in3_map);
+		break;
 	default:
 		custom_map = byt_rt5651_intmic_dmic_map;
 		num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
-- 
2.15.1

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

* Applied "ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk" to the asoc tree
  2018-01-05 19:20 ` [PATCH 3/4] ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk Pierre-Louis Bossart
@ 2018-01-08 16:23   ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2018-01-08 16:23 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: alsa-devel, tiwai, Keyon Jie, liam.r.girdwood, vinod.koul,
	broonie, Carlo Caione, bardliao

The patch

   ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk

has been applied to the asoc tree at

   https://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 56e49aa41da204f8582816c3f2572862c71adc90 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Fri, 5 Jan 2018 13:20:21 -0600
Subject: [PATCH] ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk

The current code doesn't enable the MCLK which reduces audio quality
(PLL driven from BLCK), fix the quirk

Tested-by: Carlo Caione <carlo@caione.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 488ec48f296a..de064f0f7b08 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -264,7 +264,8 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "KIANO"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "KIANO SlimNote 14.2"),
 		},
-		.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP),
+		.driver_data = (void *)(BYT_RT5651_MCLK_EN |
+					BYT_RT5651_IN1_IN2_MAP),
 	},
 	{}
 };
-- 
2.15.1

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

end of thread, other threads:[~2018-01-08 16:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 19:20 [PATCH 0/4] Intel/rt5651 updates Pierre-Louis Bossart
2018-01-05 19:20 ` [PATCH 1/4] ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used Pierre-Louis Bossart
2018-01-08 16:23   ` Applied "ASoC: Intel: bytcr-rt5651: add quirk for IN3P which may also be used" to the asoc tree Mark Brown
2018-01-05 19:20 ` [PATCH 2/4] ASoC: Intel: bytcr_rt5651: enable MinnowBoard Turbot quirks Pierre-Louis Bossart
2018-01-08 16:23   ` Applied "ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks" to the asoc tree Mark Brown
2018-01-05 19:20 ` [PATCH 2/4] ASoC: Intel: bytcr-rt5651: enable MinnowBoard Turbot quirks Pierre-Louis Bossart
2018-01-08  8:25   ` Zhang, Keqiao
2018-01-05 19:20 ` [PATCH 3/4] ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk Pierre-Louis Bossart
2018-01-08 16:23   ` Applied "ASoC: Intel: bytcr_rt5651: fix Kiano DMI quirk" to the asoc tree Mark Brown
2018-01-05 19:20 ` [PATCH 3/4] ASoC: Intel: bytcr-rt5651: fix Kiano DMI quirk Pierre-Louis Bossart
2018-01-05 19:20 ` [PATCH 4/4] ASoC: Intel: bytcr-rt5651: add support for Line In Pierre-Louis Bossart
2018-01-08 16:22   ` Applied "ASoC: Intel: bytcr-rt5651: add support for Line In" to the asoc tree Mark Brown
2018-01-08  4:44 ` [PATCH 0/4] Intel/rt5651 updates Vinod Koul

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.