All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: SOF/Intel: machine driver updates
@ 2021-08-02 15:21 Pierre-Louis Bossart
  2021-08-02 15:21 ` [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710 Pierre-Louis Bossart
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2021-08-02 15:21 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

Two quirks added for Dell XPS 9710 and Intel reference boards, and two
minor cleanups.

Pierre-Louis Bossart (3):
  ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710
  ASoC: Intel: update sof_pcm512x quirks
  ASoC: Intel: sof_sdw_max98373: remove useless inits

jairaj arava (1):
  ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682
    variant

 sound/soc/intel/boards/sof_pcm512x.c      | 13 +++++++++++--
 sound/soc/intel/boards/sof_rt5682.c       | 14 ++++++++++++++
 sound/soc/intel/boards/sof_sdw.c          | 12 ++++++++++++
 sound/soc/intel/boards/sof_sdw_max98373.c |  4 ++--
 sound/soc/sof/sof-pci-dev.c               |  9 +++++++++
 5 files changed, 48 insertions(+), 4 deletions(-)

-- 
2.25.1


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

* [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710
  2021-08-02 15:21 [PATCH 0/4] ASoC: SOF/Intel: machine driver updates Pierre-Louis Bossart
@ 2021-08-02 15:21 ` Pierre-Louis Bossart
  2021-08-02 15:21 ` [PATCH 2/4] ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682 variant Pierre-Louis Bossart
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2021-08-02 15:21 UTC (permalink / raw)
  To: alsa-devel
  Cc: FRED OH, Kai Vehmanen, tiwai, Pierre-Louis Bossart,
	Ranjani Sridharan, broonie, Bard Liao

This device has the same audio subsystem as the 0A5E skew (RT711
headset codec, 2 RT1308 amps and RT715 for mic capture)

BugLink: https://github.com/thesofproject/linux/issues/3057
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: FRED OH <fred.oh@intel.com>
---
 sound/soc/intel/boards/sof_sdw.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index b52418eea21d..6c946d7ee0a6 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -129,6 +129,18 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
 					RT711_JD2 |
 					SOF_RT715_DAI_ID_FIX),
 	},
+	{
+		/* Dell XPS 9710 */
+		.callback = sof_sdw_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A5D")
+		},
+		.driver_data = (void *)(SOF_SDW_TGL_HDMI |
+					RT711_JD2 |
+					SOF_RT715_DAI_ID_FIX |
+					SOF_SDW_FOUR_SPK),
+	},
 	{
 		.callback = sof_sdw_quirk_cb,
 		.matches = {
-- 
2.25.1


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

* [PATCH 2/4] ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682 variant
  2021-08-02 15:21 [PATCH 0/4] ASoC: SOF/Intel: machine driver updates Pierre-Louis Bossart
  2021-08-02 15:21 ` [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710 Pierre-Louis Bossart
@ 2021-08-02 15:21 ` Pierre-Louis Bossart
  2021-08-02 15:21 ` [PATCH 3/4] ASoC: Intel: update sof_pcm512x quirks Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2021-08-02 15:21 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, jairaj arava, broonie, Pierre-Louis Bossart, Bard Liao

From: jairaj arava <jairaj.arava@intel.com>

DMI product name is used to support system variants based on
adl_mx98373_rt5682 in current implementation. Replace this DMI search with
DMI_OEM_STRING and coreboot(BIOS used in these systems) is
setting the needed DMI_OEM_STRING field to uniquely identify these
systems.

Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: jairaj arava <jairaj.arava@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/sof_rt5682.c | 14 ++++++++++++++
 sound/soc/sof/sof-pci-dev.c         |  9 +++++++++
 2 files changed, 23 insertions(+)

diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index adfb4214f24b..f096bd6d69be 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -162,6 +162,20 @@ static const struct dmi_system_id sof_rt5682_quirk_table[] = {
 					SOF_RT5682_SSP_AMP(2) |
 					SOF_RT5682_NUM_HDMIDEV(4)),
 	},
+	{
+		.callback = sof_rt5682_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Alder Lake Client Platform"),
+			DMI_MATCH(DMI_OEM_STRING, "AUDIO-ADL_MAX98373_ALC5682I_I2S"),
+		},
+		.driver_data = (void *)(SOF_RT5682_MCLK_EN |
+					SOF_RT5682_SSP_CODEC(0) |
+					SOF_SPEAKER_AMP_PRESENT |
+					SOF_MAX98373_SPEAKER_AMP_PRESENT |
+					SOF_RT5682_SSP_AMP(2) |
+					SOF_RT5682_NUM_HDMIDEV(4)),
+	},
 	{}
 };
 
diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c
index 03119462f9e2..bc9e70765678 100644
--- a/sound/soc/sof/sof-pci-dev.c
+++ b/sound/soc/sof/sof-pci-dev.c
@@ -50,6 +50,15 @@ static const struct dmi_system_id sof_tplg_table[] = {
 		},
 		.driver_data = "sof-tgl-rt5682-ssp0-max98373-ssp2.tplg",
 	},
+	{
+		.callback = sof_tplg_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Alder Lake Client Platform"),
+			DMI_MATCH(DMI_OEM_STRING, "AUDIO-ADL_MAX98373_ALC5682I_I2S"),
+		},
+		.driver_data = "sof-adl-rt5682-ssp0-max98373-ssp2.tplg",
+	},
 	{}
 };
 
-- 
2.25.1


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

* [PATCH 3/4] ASoC: Intel: update sof_pcm512x quirks
  2021-08-02 15:21 [PATCH 0/4] ASoC: SOF/Intel: machine driver updates Pierre-Louis Bossart
  2021-08-02 15:21 ` [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710 Pierre-Louis Bossart
  2021-08-02 15:21 ` [PATCH 2/4] ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682 variant Pierre-Louis Bossart
@ 2021-08-02 15:21 ` Pierre-Louis Bossart
  2021-08-02 15:21 ` [PATCH 4/4] ASoC: Intel: sof_sdw_max98373: remove useless inits Pierre-Louis Bossart
  2021-08-03 22:35 ` [PATCH 0/4] ASoC: SOF/Intel: machine driver updates Mark Brown
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2021-08-02 15:21 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Guennadi Liakhovetski, broonie, Pierre-Louis Bossart

The default SOF topology enables SSP capture and DMICs, even though
both of these hardware capabilities are not always available in
hardware (specific versions of HiFiberry and DMIC kit needed).

For the SSP capture, this leads to annoying "SP5-Codec: ASoC: no
backend capture" and "streamSSP5-Codec: ASoC: no users capture at
close - state 0" errors.

Update the quirks to match what the topology needs, which also allows
for the ability to remove SSP capture and DMIC support.

BugLink: https://github.com/thesofproject/linux/issues/3061
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/intel/boards/sof_pcm512x.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/boards/sof_pcm512x.c b/sound/soc/intel/boards/sof_pcm512x.c
index 2ec9c62366e2..6815204e58d5 100644
--- a/sound/soc/intel/boards/sof_pcm512x.c
+++ b/sound/soc/intel/boards/sof_pcm512x.c
@@ -26,11 +26,16 @@
 
 #define SOF_PCM512X_SSP_CODEC(quirk)		((quirk) & GENMASK(3, 0))
 #define SOF_PCM512X_SSP_CODEC_MASK			(GENMASK(3, 0))
+#define SOF_PCM512X_ENABLE_SSP_CAPTURE		BIT(4)
+#define SOF_PCM512X_ENABLE_DMIC			BIT(5)
 
 #define IDISP_CODEC_MASK	0x4
 
 /* Default: SSP5 */
-static unsigned long sof_pcm512x_quirk = SOF_PCM512X_SSP_CODEC(5);
+static unsigned long sof_pcm512x_quirk =
+	SOF_PCM512X_SSP_CODEC(5) |
+	SOF_PCM512X_ENABLE_SSP_CAPTURE |
+	SOF_PCM512X_ENABLE_DMIC;
 
 static bool is_legacy_cpu;
 
@@ -244,8 +249,9 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
 	links[id].dpcm_playback = 1;
 	/*
 	 * capture only supported with specific versions of the Hifiberry DAC+
-	 * links[id].dpcm_capture = 1;
 	 */
+	if (sof_pcm512x_quirk & SOF_PCM512X_ENABLE_SSP_CAPTURE)
+		links[id].dpcm_capture = 1;
 	links[id].no_pcm = 1;
 	links[id].cpus = &cpus[id];
 	links[id].num_cpus = 1;
@@ -380,6 +386,9 @@ static int sof_audio_probe(struct platform_device *pdev)
 
 	ssp_codec = sof_pcm512x_quirk & SOF_PCM512X_SSP_CODEC_MASK;
 
+	if (!(sof_pcm512x_quirk & SOF_PCM512X_ENABLE_DMIC))
+		dmic_be_num = 0;
+
 	/* compute number of dai links */
 	sof_audio_card_pcm512x.num_links = 1 + dmic_be_num + hdmi_num;
 
-- 
2.25.1


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

* [PATCH 4/4] ASoC: Intel: sof_sdw_max98373: remove useless inits
  2021-08-02 15:21 [PATCH 0/4] ASoC: SOF/Intel: machine driver updates Pierre-Louis Bossart
                   ` (2 preceding siblings ...)
  2021-08-02 15:21 ` [PATCH 3/4] ASoC: Intel: update sof_pcm512x quirks Pierre-Louis Bossart
@ 2021-08-02 15:21 ` Pierre-Louis Bossart
  2021-08-03 22:35 ` [PATCH 0/4] ASoC: SOF/Intel: machine driver updates Mark Brown
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2021-08-02 15:21 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, Pierre-Louis Bossart, Rander Wang, broonie,
	Ranjani Sridharan, Bard Liao

No need to initialize a variable if the next line overwrites the value.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
---
 sound/soc/intel/boards/sof_sdw_max98373.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/boards/sof_sdw_max98373.c b/sound/soc/intel/boards/sof_sdw_max98373.c
index 25daef910aee..25f9065b627c 100644
--- a/sound/soc/intel/boards/sof_sdw_max98373.c
+++ b/sound/soc/intel/boards/sof_sdw_max98373.c
@@ -90,7 +90,7 @@ static int mx8373_enable_spk_pin(struct snd_pcm_substream *substream, bool enabl
 
 static int mx8373_sdw_prepare(struct snd_pcm_substream *substream)
 {
-	int ret = 0;
+	int ret;
 
 	/* according to soc_pcm_prepare dai link prepare is called first */
 	ret = sdw_prepare(substream);
@@ -102,7 +102,7 @@ static int mx8373_sdw_prepare(struct snd_pcm_substream *substream)
 
 static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream)
 {
-	int ret = 0;
+	int ret;
 
 	/* according to soc_pcm_hw_free dai link free is called first */
 	ret = sdw_hw_free(substream);
-- 
2.25.1


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

* Re: [PATCH 0/4] ASoC: SOF/Intel: machine driver updates
  2021-08-02 15:21 [PATCH 0/4] ASoC: SOF/Intel: machine driver updates Pierre-Louis Bossart
                   ` (3 preceding siblings ...)
  2021-08-02 15:21 ` [PATCH 4/4] ASoC: Intel: sof_sdw_max98373: remove useless inits Pierre-Louis Bossart
@ 2021-08-03 22:35 ` Mark Brown
  4 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-08-03 22:35 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel; +Cc: tiwai, Mark Brown

On Mon, 2 Aug 2021 10:21:47 -0500, Pierre-Louis Bossart wrote:
> Two quirks added for Dell XPS 9710 and Intel reference boards, and two
> minor cleanups.
> 
> Pierre-Louis Bossart (3):
>   ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710
>   ASoC: Intel: update sof_pcm512x quirks
>   ASoC: Intel: sof_sdw_max98373: remove useless inits
> 
> [...]

Applied to

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

Thanks!

[1/4] ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710
      commit: b8cab69b0ed9ee10f2a86670ce41ffad991c8dc9
[2/4] ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682 variant
      commit: 46fa9a158327dd40238fa8e76af4bafdfcb8129e
[3/4] ASoC: Intel: update sof_pcm512x quirks
      commit: 22414cade8dfec25ab94df52b3a4f7aa8edb6120
[4/4] ASoC: Intel: sof_sdw_max98373: remove useless inits
      commit: d4321277b3b90474302a9b3b5ca124bcf0f29f00

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

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

end of thread, other threads:[~2021-08-03 22:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 15:21 [PATCH 0/4] ASoC: SOF/Intel: machine driver updates Pierre-Louis Bossart
2021-08-02 15:21 ` [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710 Pierre-Louis Bossart
2021-08-02 15:21 ` [PATCH 2/4] ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682 variant Pierre-Louis Bossart
2021-08-02 15:21 ` [PATCH 3/4] ASoC: Intel: update sof_pcm512x quirks Pierre-Louis Bossart
2021-08-02 15:21 ` [PATCH 4/4] ASoC: Intel: sof_sdw_max98373: remove useless inits Pierre-Louis Bossart
2021-08-03 22:35 ` [PATCH 0/4] ASoC: SOF/Intel: machine driver updates 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.