Re: [PATCH v3 1/3] ASoC: Intel: soc-acpi-cht: Unify device quirks
From: Cezary Rojewski
Date: Thu Jun 11 2026 - 04:49:02 EST
On 6/11/2026 1:51 AM, Yauhen Kharuzhy wrote:
This file contains two types of quirks, both checking DMI for
machine-specific strings and returning machine data for a matching entry.
(...)
diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c
index e4c3492a0c28..28f600171f9d 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c
@@ -9,47 +9,63 @@
#include <sound/soc-acpi.h>
#include <sound/soc-acpi-intel-match.h>
-static unsigned long cht_machine_id;
-
-#define CHT_SURFACE_MACH 1
+static struct snd_soc_acpi_mach cht_surface_mach = {
+ .id = "10EC5640",
+ .drv_name = "cht-bsw-rt5645",
+ .fw_filename = "intel/fw_sst_22a8.bin",
+ .board = "cht-bsw",
+ .sof_tplg_filename = "sof-cht-rt5645.tplg",
Given all the relocations found in the patch, it's hard to assess the actual impact of it. Ideally there should be no need for the relocation at all.
If you believe this has to be done, please split the change - first have a "preparation patch" that relocates stuff/does whatever is necessary with the existing tables (rt5645 and wm5102) and then have a follow up that carries "the impact".
+};
-static int cht_surface_quirk_cb(const struct dmi_system_id *id)
-{
- cht_machine_id = CHT_SURFACE_MACH;
- return 1;
-}
+static struct snd_soc_acpi_mach cht_lenovo_yoga_tab3_x90_mach = {
+ .id = "10WM5102",
+ .drv_name = "bytcr_wm5102",
+ .fw_filename = "intel/fw_sst_22a8.bin",
+ .board = "bytcr_wm5102",
+ .sof_tplg_filename = "sof-cht-wm5102.tplg",
+};
(...)
-static struct snd_soc_acpi_mach cht_surface_mach = {(...)
- .id = "10EC5640",
- .drv_name = "cht-bsw-rt5645",
- .fw_filename = "intel/fw_sst_22a8.bin",
- .board = "cht-bsw",
- .sof_tplg_filename = "sof-cht-rt5645.tplg",
-};
-static struct snd_soc_acpi_mach cht_lenovo_yoga_tab3_x90_mach = {
- .id = "10WM5102",
- .drv_name = "bytcr_wm5102",
- .fw_filename = "intel/fw_sst_22a8.bin",
- .board = "bytcr_wm5102",
- .sof_tplg_filename = "sof-cht-wm5102.tplg",
-};