Skip to content

Commit eb9cee1

Browse files
committed
ASoC: soc-acpi-intel-ptl-match: Make Chrome matches conditional
For PTL onwards Cirrus are intending to rely on function topologies, rather than using a match table for each system type. Chrome systems tend to have custom magic in the topology and thus need to load a specific file. This causes problems as these system can have the same layout as generic laptops causing the match to apply to other laptops. Add a DMI quirk that forces these matches to only apply to specific devices. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
1 parent 521b0f2 commit eb9cee1

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

sound/soc/intel/common/soc-acpi-intel-ptl-match.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
493493
.link_mask = BIT(2) | BIT(3),
494494
.links = ptl_cs42l43_agg_l3_cs35l56_l2,
495495
.drv_name = "sof_sdw",
496+
.machine_check = snd_soc_acpi_intel_no_function_topology,
496497
.sof_tplg_filename = "sof-ptl-cs42l43-agg-l3-cs35l56-l2.tplg",
497498
},
498499
{

sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*
77
*/
88

9+
#include <linux/dmi.h>
910
#include <linux/soundwire/sdw_intel.h>
1011
#include <sound/sdca.h>
1112
#include <sound/soc-acpi.h>
@@ -37,6 +38,21 @@ bool snd_soc_acpi_intel_sdca_is_device_rt712_vb(void *arg)
3738
}
3839
EXPORT_SYMBOL_NS(snd_soc_acpi_intel_sdca_is_device_rt712_vb, "SND_SOC_ACPI_INTEL_SDCA_QUIRKS");
3940

41+
static const struct dmi_system_id function_topology_quirk_table[] = {
42+
{
43+
.matches = {
44+
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
45+
},
46+
},
47+
{}
48+
};
49+
50+
bool snd_soc_acpi_intel_no_function_topology(void *arg)
51+
{
52+
return !!dmi_check_system(function_topology_quirk_table);
53+
}
54+
EXPORT_SYMBOL_NS(snd_soc_acpi_intel_no_function_topology, "SND_SOC_ACPI_INTEL_SDCA_QUIRKS");
55+
4056
MODULE_DESCRIPTION("ASoC ACPI Intel SDCA quirks");
4157
MODULE_LICENSE("GPL");
4258
MODULE_IMPORT_NS("SND_SOC_SDCA");

sound/soc/intel/common/soc-acpi-intel-sdca-quirks.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
#define _SND_SOC_ACPI_INTEL_SDCA_QUIRKS
1111

1212
bool snd_soc_acpi_intel_sdca_is_device_rt712_vb(void *arg);
13+
bool snd_soc_acpi_intel_no_function_topology(void *arg);
1314

1415
#endif

0 commit comments

Comments
 (0)