All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: Intel: fix rt5682-based machine drivers
@ 2019-05-18 18:30 Pierre-Louis Bossart
  2019-05-18 18:30 ` [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button Pierre-Louis Bossart
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2019-05-18 18:30 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

We have two machine drivers based on rt5682 and they both need a
correction for the mapping of the buttons, the initial mapping taken
from the DA7219 is incorrect.

Also fix ACPI tables, quirks as needed.

Sathya Prakash M R (2):
  ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button
  ASoC: Intel: soc-acpi: Fix machine selection order

Yong Zhi (1):
  ASoC: Intel: glk_rt5682_max98357a: Remap button control-function

 sound/soc/intel/boards/glk_rt5682_max98357a.c     |  7 ++++---
 sound/soc/intel/boards/sof_rt5682.c               | 12 +++++++-----
 sound/soc/intel/common/soc-acpi-intel-cnl-match.c | 10 +++++-----
 3 files changed, 16 insertions(+), 13 deletions(-)


base-commit: d0723c9d845f9a6ff1069e5786ccda8e81566763
-- 
2.20.1

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

* [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button
  2019-05-18 18:30 [PATCH 0/3] ASoC: Intel: fix rt5682-based machine drivers Pierre-Louis Bossart
@ 2019-05-18 18:30 ` Pierre-Louis Bossart
  2019-05-20 12:31   ` Mark Brown
  2019-05-18 18:30 ` [PATCH 2/3] ASoC: Intel: soc-acpi: Fix machine selection order Pierre-Louis Bossart
  2019-05-18 18:30 ` [PATCH 3/3] ASoC: Intel: glk_rt5682_max98357a: Remap button control-function Pierre-Louis Bossart
  2 siblings, 1 reply; 8+ messages in thread
From: Pierre-Louis Bossart @ 2019-05-18 18:30 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Sathya Prakash M R, broonie, Pierre-Louis Bossart

From: Sathya Prakash M R <sathya.prakash.m.r@intel.com>

    This fixes:
    1. BIT mask for AMP SSP was incorrect.
    2. The RT5682 codec button mapping is corrected.

Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/sof_rt5682.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index f28fb98cc306..e441dc979966 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -29,9 +29,10 @@
 #define SOF_RT5682_MCLK_EN			BIT(3)
 #define SOF_RT5682_MCLK_24MHZ			BIT(4)
 #define SOF_SPEAKER_AMP_PRESENT		BIT(5)
-#define SOF_RT5682_SSP_AMP(quirk)		((quirk) & GENMASK(8, 6))
-#define SOF_RT5682_SSP_AMP_MASK			(GENMASK(8, 6))
 #define SOF_RT5682_SSP_AMP_SHIFT		6
+#define SOF_RT5682_SSP_AMP_MASK                 (GENMASK(8, 6))
+#define SOF_RT5682_SSP_AMP(quirk)	\
+	(((quirk) << SOF_RT5682_SSP_AMP_SHIFT) & SOF_RT5682_SSP_AMP_MASK)
 
 /* Default: MCLK on, MCLK 19.2M, SSP0  */
 static unsigned long sof_rt5682_quirk = SOF_RT5682_MCLK_EN |
@@ -144,9 +145,9 @@ static int sof_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd)
 	jack = &ctx->sof_headset;
 
 	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
 	ret = snd_soc_component_set_jack(component, jack, NULL);
 
 	if (ret) {
@@ -519,6 +520,7 @@ static int sof_audio_probe(struct platform_device *pdev)
 
 	/* compute number of dai links */
 	sof_audio_card_rt5682.num_links = 1 + dmic_num + hdmi_num;
+
 	if (sof_rt5682_quirk & SOF_SPEAKER_AMP_PRESENT)
 		sof_audio_card_rt5682.num_links++;
 
-- 
2.20.1

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

* [PATCH 2/3] ASoC: Intel: soc-acpi: Fix machine selection order
  2019-05-18 18:30 [PATCH 0/3] ASoC: Intel: fix rt5682-based machine drivers Pierre-Louis Bossart
  2019-05-18 18:30 ` [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button Pierre-Louis Bossart
@ 2019-05-18 18:30 ` Pierre-Louis Bossart
  2019-05-21 20:32   ` Applied "ASoC: Intel: soc-acpi: Fix machine selection order" to the asoc tree Mark Brown
  2019-05-18 18:30 ` [PATCH 3/3] ASoC: Intel: glk_rt5682_max98357a: Remap button control-function Pierre-Louis Bossart
  2 siblings, 1 reply; 8+ messages in thread
From: Pierre-Louis Bossart @ 2019-05-18 18:30 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Sathya Prakash M R, broonie, Pierre-Louis Bossart

From: Sathya Prakash M R <sathya.prakash.m.r@intel.com>

The selection order of m/c in match table is corrected
to use common codec as last in the list.

Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/common/soc-acpi-intel-cnl-match.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/common/soc-acpi-intel-cnl-match.c b/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
index df7c52cad5c3..c36c0aa4f683 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
@@ -29,17 +29,17 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
 		.sof_tplg_filename = "sof-cnl-rt274.tplg",
 	},
 	{
-		.id = "10EC5682",
+		.id = "MX98357A",
 		.drv_name = "sof_rt5682",
+		.quirk_data = &cml_codecs,
 		.sof_fw_filename = "sof-cnl.ri",
-		.sof_tplg_filename = "sof-cml-rt5682.tplg",
+		.sof_tplg_filename = "sof-cml-rt5682-max98357a.tplg",
 	},
 	{
-		.id = "MX98357A",
+		.id = "10EC5682",
 		.drv_name = "sof_rt5682",
-		.quirk_data = &cml_codecs,
 		.sof_fw_filename = "sof-cnl.ri",
-		.sof_tplg_filename = "sof-cml-rt5682-max98357a.tplg",
+		.sof_tplg_filename = "sof-cml-rt5682.tplg",
 	},
 
 	{},
-- 
2.20.1

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

* [PATCH 3/3] ASoC: Intel: glk_rt5682_max98357a: Remap button control-function
  2019-05-18 18:30 [PATCH 0/3] ASoC: Intel: fix rt5682-based machine drivers Pierre-Louis Bossart
  2019-05-18 18:30 ` [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button Pierre-Louis Bossart
  2019-05-18 18:30 ` [PATCH 2/3] ASoC: Intel: soc-acpi: Fix machine selection order Pierre-Louis Bossart
@ 2019-05-18 18:30 ` Pierre-Louis Bossart
  2019-05-21 20:32   ` Applied "ASoC: Intel: glk_rt5682_max98357a: Remap button control-function" to the asoc tree Mark Brown
  2 siblings, 1 reply; 8+ messages in thread
From: Pierre-Louis Bossart @ 2019-05-18 18:30 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Naveen Manohar, broonie, Pierre-Louis Bossart, Yong Zhi

From: Yong Zhi <yong.zhi@intel.com>

Assign button functions based on Android wired headset specs(v1.1).

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/glk_rt5682_max98357a.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/glk_rt5682_max98357a.c b/sound/soc/intel/boards/glk_rt5682_max98357a.c
index d17126f7757c..6b677b5bcdcd 100644
--- a/sound/soc/intel/boards/glk_rt5682_max98357a.c
+++ b/sound/soc/intel/boards/glk_rt5682_max98357a.c
@@ -169,9 +169,10 @@ static int geminilake_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd)
 	jack = &ctx->geminilake_headset;
 
 	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
+
 	ret = snd_soc_component_set_jack(component, jack, NULL);
 
 	if (ret) {
-- 
2.20.1

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

* Re: [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button
  2019-05-18 18:30 ` [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button Pierre-Louis Bossart
@ 2019-05-20 12:31   ` Mark Brown
  2019-05-20 13:39     ` Pierre-Louis Bossart
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2019-05-20 12:31 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: tiwai, Sathya Prakash M R, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 689 bytes --]

On Sat, May 18, 2019 at 01:30:07PM -0500, Pierre-Louis Bossart wrote:
> From: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
> 
>     This fixes:
>     1. BIT mask for AMP SSP was incorrect.
>     2. The RT5682 codec button mapping is corrected.

Indentation is a bit weird here, and these are really two changes that
should be split.

> @@ -519,6 +520,7 @@ static int sof_audio_probe(struct platform_device *pdev)
>  
>  	/* compute number of dai links */
>  	sof_audio_card_rt5682.num_links = 1 + dmic_num + hdmi_num;
> +
>  	if (sof_rt5682_quirk & SOF_SPEAKER_AMP_PRESENT)
>  		sof_audio_card_rt5682.num_links++;
>  

and this is an unrelated indentation change.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button
  2019-05-20 12:31   ` Mark Brown
@ 2019-05-20 13:39     ` Pierre-Louis Bossart
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2019-05-20 13:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: tiwai, Sathya Prakash M R, alsa-devel



On 5/20/19 7:31 AM, Mark Brown wrote:
> On Sat, May 18, 2019 at 01:30:07PM -0500, Pierre-Louis Bossart wrote:
>> From: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
>>
>>      This fixes:
>>      1. BIT mask for AMP SSP was incorrect.
>>      2. The RT5682 codec button mapping is corrected.
> 
> Indentation is a bit weird here, and these are really two changes that
> should be split.
> 
>> @@ -519,6 +520,7 @@ static int sof_audio_probe(struct platform_device *pdev)
>>   
>>   	/* compute number of dai links */
>>   	sof_audio_card_rt5682.num_links = 1 + dmic_num + hdmi_num;
>> +
>>   	if (sof_rt5682_quirk & SOF_SPEAKER_AMP_PRESENT)
>>   		sof_audio_card_rt5682.num_links++;
>>   
> 
> and this is an unrelated indentation change.

ok, I'll send a v2.

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

* Applied "ASoC: Intel: glk_rt5682_max98357a: Remap button control-function" to the asoc tree
  2019-05-18 18:30 ` [PATCH 3/3] ASoC: Intel: glk_rt5682_max98357a: Remap button control-function Pierre-Louis Bossart
@ 2019-05-21 20:32   ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2019-05-21 20:32 UTC (permalink / raw)
  To: Yong Zhi
  Cc: tiwai, Naveen Manohar, alsa-devel, Mark Brown, Pierre-Louis Bossart

The patch

   ASoC: Intel: glk_rt5682_max98357a: Remap button control-function

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3

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 39f2d114a1c7d73d601f19cbea0a955ade2784c3 Mon Sep 17 00:00:00 2001
From: Yong Zhi <yong.zhi@intel.com>
Date: Sat, 18 May 2019 13:30:09 -0500
Subject: [PATCH] ASoC: Intel: glk_rt5682_max98357a: Remap button
 control-function

Assign button functions based on Android wired headset specs(v1.1).

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/glk_rt5682_max98357a.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/glk_rt5682_max98357a.c b/sound/soc/intel/boards/glk_rt5682_max98357a.c
index d17126f7757c..6b677b5bcdcd 100644
--- a/sound/soc/intel/boards/glk_rt5682_max98357a.c
+++ b/sound/soc/intel/boards/glk_rt5682_max98357a.c
@@ -169,9 +169,10 @@ static int geminilake_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd)
 	jack = &ctx->geminilake_headset;
 
 	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
+
 	ret = snd_soc_component_set_jack(component, jack, NULL);
 
 	if (ret) {
-- 
2.20.1

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

* Applied "ASoC: Intel: soc-acpi: Fix machine selection order" to the asoc tree
  2019-05-18 18:30 ` [PATCH 2/3] ASoC: Intel: soc-acpi: Fix machine selection order Pierre-Louis Bossart
@ 2019-05-21 20:32   ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2019-05-21 20:32 UTC (permalink / raw)
  To: Sathya Prakash M R; +Cc: tiwai, alsa-devel, Mark Brown, Pierre-Louis Bossart

The patch

   ASoC: Intel: soc-acpi: Fix machine selection order

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2

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 30d9d4ff53532087bc13ed29d7715df868794b5e Mon Sep 17 00:00:00 2001
From: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Date: Sat, 18 May 2019 13:30:08 -0500
Subject: [PATCH] ASoC: Intel: soc-acpi: Fix machine selection order

The selection order of m/c in match table is corrected
to use common codec as last in the list.

Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/common/soc-acpi-intel-cnl-match.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/common/soc-acpi-intel-cnl-match.c b/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
index df7c52cad5c3..c36c0aa4f683 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
@@ -29,17 +29,17 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
 		.sof_tplg_filename = "sof-cnl-rt274.tplg",
 	},
 	{
-		.id = "10EC5682",
+		.id = "MX98357A",
 		.drv_name = "sof_rt5682",
+		.quirk_data = &cml_codecs,
 		.sof_fw_filename = "sof-cnl.ri",
-		.sof_tplg_filename = "sof-cml-rt5682.tplg",
+		.sof_tplg_filename = "sof-cml-rt5682-max98357a.tplg",
 	},
 	{
-		.id = "MX98357A",
+		.id = "10EC5682",
 		.drv_name = "sof_rt5682",
-		.quirk_data = &cml_codecs,
 		.sof_fw_filename = "sof-cnl.ri",
-		.sof_tplg_filename = "sof-cml-rt5682-max98357a.tplg",
+		.sof_tplg_filename = "sof-cml-rt5682.tplg",
 	},
 
 	{},
-- 
2.20.1

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

end of thread, other threads:[~2019-05-21 20:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-18 18:30 [PATCH 0/3] ASoC: Intel: fix rt5682-based machine drivers Pierre-Louis Bossart
2019-05-18 18:30 ` [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button Pierre-Louis Bossart
2019-05-20 12:31   ` Mark Brown
2019-05-20 13:39     ` Pierre-Louis Bossart
2019-05-18 18:30 ` [PATCH 2/3] ASoC: Intel: soc-acpi: Fix machine selection order Pierre-Louis Bossart
2019-05-21 20:32   ` Applied "ASoC: Intel: soc-acpi: Fix machine selection order" to the asoc tree Mark Brown
2019-05-18 18:30 ` [PATCH 3/3] ASoC: Intel: glk_rt5682_max98357a: Remap button control-function Pierre-Louis Bossart
2019-05-21 20:32   ` Applied "ASoC: Intel: glk_rt5682_max98357a: Remap button control-function" to the asoc tree 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.