Skip to contentSkip to conversation

ASoC: Intel: Add quirk to block match table for Lenovo Yoga Slim 7

PATCH In review Charles Keepax 2 participants 2 messages Sep 28

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Intel: Add quirk to block match table for Lenovo Yoga Slim 7

A variant of the Lenovo Yoga Slim 7 exists on Lunar Lake that doesn't have a physical jack socket. Cirrus codecs still use match tables on LNL but the match table makes no distinction between a system with or without a jack. This leads to the system failing probe as the jack in the topology file is not matched by a DAI link as the machine driver is constructed.

Add a new quirk to block using match tables for specific devices, and rely on function topologies which can handle this difference seamlessly. This is slightly preferred over moving everything to function topologies due to the lower chance of causing regressions on other systems.

---
 .../soc/intel/common/soc-acpi-intel-lnl-match.c  |  1 +
 .../intel/common/soc-acpi-intel-sdca-quirks.c    | 16 ++++++++++++++++
 .../intel/common/soc-acpi-intel-sdca-quirks.h    |  1 +
 3 files changed, 18 insertions(+)
sound/soc/intel/common/soc-acpi-intel-lnl-match.c +1 -0
index f9c47cc1e0c78..cbf79eb2ec00b 100644
@@ -802,6 +802,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
 		.links = lnl_cs42l43_l0,
 		.drv_name = "sof_sdw",
 		.sof_tplg_filename = "sof-lnl-cs42l43-l0.tplg",
+		.machine_check = snd_soc_acpi_intel_force_function_topology,
 		.get_function_tplg_files = sof_sdw_get_tplg_files,
 	},
 	{
sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c +16 -0
index 9fdeb6ad96ac2..e62ef81214ffe 100644
@@ -53,6 +53,22 @@ bool snd_soc_acpi_intel_no_function_topology(void *arg)
 }
 EXPORT_SYMBOL_NS(snd_soc_acpi_intel_no_function_topology, "SND_SOC_ACPI_INTEL_SDCA_QUIRKS");
 
+static const struct dmi_system_id force_function_topology_quirk_table[] = {
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "83R0"),
+		},
+	},
+	{}
+};
+
+bool snd_soc_acpi_intel_force_function_topology(void *arg)
+{
+	return !dmi_check_system(force_function_topology_quirk_table);
+}
+EXPORT_SYMBOL_NS(snd_soc_acpi_intel_force_function_topology, "SND_SOC_ACPI_INTEL_SDCA_QUIRKS");
+
 bool snd_soc_acpi_intel_rt712_vb_no_function_topology(void *arg)
 {
 	return snd_soc_acpi_intel_sdca_is_device_rt712_vb(arg) &&
sound/soc/intel/common/soc-acpi-intel-sdca-quirks.h +1 -0
index 60b665ab5924a..10179004c86a3 100644
@@ -11,6 +11,7 @@
 
 bool snd_soc_acpi_intel_sdca_is_device_rt712_vb(void *arg);
 bool snd_soc_acpi_intel_no_function_topology(void *arg);
+bool snd_soc_acpi_intel_force_function_topology(void *arg);
 bool snd_soc_acpi_intel_rt712_vb_no_function_topology(void *arg);
 
 #endif
Signature · 1 line
2.47.3
maintainer
#1 lore raw
Quoted 1 line · Charles Keepax

ASoC: Intel: Add quirk to block match table for Lenovo Yoga Slim 7

Applied to

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

Thanks!

[1/1] ASoC: Intel: Add quirk to block match table for Lenovo Yoga Slim 7

      https://git.kernel.org/broonie/sound/c/c26d18964a93

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