ASoC: Intel: fix rt5682-based machine drivers
Subsystems (3)
cover ASoC: Intel: fix rt5682-based machine drivers
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
Signature · 1 line
2.20.1
PATCH 1/3 ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button
From: Sathya Prakash M R <[email protected]>
This fixes:
1. BIT mask for AMP SSP was incorrect.
2. The RT5682 codec button mapping is corrected.
--- sound/soc/intel/boards/sof_rt5682.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
sound/soc/intel/boards/sof_rt5682.c +7 -5
@@ -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++;
Signature · 1 line
2.20.1
Mark Brown
maintainerRe: [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button
Quoted 5 lines · Pierre-Louis Bossart
From: Sathya Prakash M R <[email protected]>
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.
sound/soc/intel/boards/sof_rt5682.c static int sof_audio_probe(struct platform_device *pdev) · line 526
Quoted 8 lines
sound/soc/intel/boards/sof_rt5682.c +1
-0@@ -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.
Re: [PATCH 1/3] ASoC: Intel: sof-rt5682: Few minor fixes for AMP SSP and codec button
Quoted 12 lines · Mark Brown
Quoted 5 lines · Pierre-Louis Bossart
From: Sathya Prakash M R <[email protected]>
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.
Quoted 2 lines
(quoted diff) +0
-0@@ -519,6 +520,7 @@ static int sof_audio_probe(struct platform_device *pdev)
Quoted 8 lines
sound/soc/intel/boards/sof_rt5682.c static int sof_audio_probe(struct platform_device *pdev) · line 526
Quoted 6 lines
sound/soc/intel/boards/sof_rt5682.c +1
-0/* 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.
PATCH 2/3 ASoC: Intel: soc-acpi: Fix machine selection order
In reply to Pierre-Louis BossartFrom: Sathya Prakash M R <[email protected]>
The selection order of m/c in match table is corrected to use common codec as last in the list.
--- sound/soc/intel/common/soc-acpi-intel-cnl-match.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/soc/intel/common/soc-acpi-intel-cnl-match.c +5 -5
@@ -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", }, {},
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: Intel: soc-acpi: Fix machine selection order" to the asoc tree
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
Quoted 1 line
From
30d9d4ff53532087bc13ed29d7715df868794b5eMon Sep 17 00:00:00 2001
From: Sathya Prakash M R <[email protected]>
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.
--- sound/soc/intel/common/soc-acpi-intel-cnl-match.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/soc/intel/common/soc-acpi-intel-cnl-match.c +5 -5
@@ -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", }, {},
Signature · 1 line
2.20.1
PATCH 3/3 ASoC: Intel: glk_rt5682_max98357a: Remap button control-function
In reply to Pierre-Louis BossartFrom: Yong Zhi <[email protected]>
Assign button functions based on Android wired headset specs(v1.1).
--- sound/soc/intel/boards/glk_rt5682_max98357a.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/intel/boards/glk_rt5682_max98357a.c +4 -3
@@ -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) {
Signature · 1 line
2.20.1
Mark Brown
maintainerApplied "ASoC: Intel: glk_rt5682_max98357a: Remap button control-function" to the asoc tree
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
Quoted 1 line
From
39f2d114a1c7d73d601f19cbea0a955ade2784c3Mon Sep 17 00:00:00 2001
From: Yong Zhi <[email protected]>
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).
--- sound/soc/intel/boards/glk_rt5682_max98357a.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/intel/boards/glk_rt5682_max98357a.c +4 -3
@@ -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) {
Signature · 1 line
2.20.1