1 // SPDX-License-Identifier: GPL-2.0-only
3 * soc-acpi-intel-byt-match.c - tables and support for BYT ACPI enumeration.
5 * Copyright (c) 2017, Intel Corporation.
9 #include <sound/soc-acpi.h>
10 #include <sound/soc-acpi-intel-match.h>
12 static unsigned long byt_machine_id
;
14 #define BYT_THINKPAD_10 1
15 #define BYT_POV_P1006W 2
16 #define BYT_AEGEX_10 3
18 static int byt_thinkpad10_quirk_cb(const struct dmi_system_id
*id
)
20 byt_machine_id
= BYT_THINKPAD_10
;
24 static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id
*id
)
26 byt_machine_id
= BYT_POV_P1006W
;
30 static int byt_aegex10_quirk_cb(const struct dmi_system_id
*id
)
32 byt_machine_id
= BYT_AEGEX_10
;
36 static const struct dmi_system_id byt_table
[] = {
38 .callback
= byt_thinkpad10_quirk_cb
,
40 DMI_MATCH(DMI_SYS_VENDOR
, "LENOVO"),
41 DMI_MATCH(DMI_PRODUCT_VERSION
, "ThinkPad 8"),
45 .callback
= byt_thinkpad10_quirk_cb
,
47 DMI_MATCH(DMI_SYS_VENDOR
, "LENOVO"),
48 DMI_MATCH(DMI_PRODUCT_VERSION
, "ThinkPad 10"),
52 .callback
= byt_thinkpad10_quirk_cb
,
54 DMI_MATCH(DMI_SYS_VENDOR
, "LENOVO"),
55 DMI_MATCH(DMI_PRODUCT_VERSION
, "ThinkPad Tablet B"),
59 .callback
= byt_thinkpad10_quirk_cb
,
61 DMI_MATCH(DMI_SYS_VENDOR
, "LENOVO"),
62 DMI_MATCH(DMI_PRODUCT_VERSION
, "Lenovo Miix 2 10"),
66 /* Point of View mobii wintab p1006w (v1.0) */
67 .callback
= byt_pov_p1006w_quirk_cb
,
69 DMI_EXACT_MATCH(DMI_SYS_VENDOR
, "Insyde"),
70 DMI_EXACT_MATCH(DMI_PRODUCT_NAME
, "BayTrail"),
71 /* Note 105b is Foxcon's USB/PCI vendor id */
72 DMI_EXACT_MATCH(DMI_BOARD_VENDOR
, "105B"),
73 DMI_EXACT_MATCH(DMI_BOARD_NAME
, "0E57"),
77 /* Aegex 10 tablet (RU2) */
78 .callback
= byt_aegex10_quirk_cb
,
80 DMI_MATCH(DMI_SYS_VENDOR
, "AEGEX"),
81 DMI_MATCH(DMI_PRODUCT_VERSION
, "RU2"),
87 /* The Thinkapd 10 and Aegex 10 tablets have the same ID problem */
88 static struct snd_soc_acpi_mach byt_thinkpad_10
= {
90 .drv_name
= "cht-bsw-rt5672",
91 .fw_filename
= "intel/fw_sst_0f28.bin",
93 .sof_fw_filename
= "sof-byt.ri",
94 .sof_tplg_filename
= "sof-byt-rt5670.tplg",
97 static struct snd_soc_acpi_mach byt_pov_p1006w
= {
99 .drv_name
= "bytcr_rt5651",
100 .fw_filename
= "intel/fw_sst_0f28.bin",
101 .board
= "bytcr_rt5651",
102 .sof_fw_filename
= "sof-byt.ri",
103 .sof_tplg_filename
= "sof-byt-rt5651.tplg",
106 static struct snd_soc_acpi_mach
*byt_quirk(void *arg
)
108 struct snd_soc_acpi_mach
*mach
= arg
;
110 dmi_check_system(byt_table
);
112 switch (byt_machine_id
) {
113 case BYT_THINKPAD_10
:
115 return &byt_thinkpad_10
;
117 return &byt_pov_p1006w
;
123 struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines
[] = {
126 .drv_name
= "bytcr_rt5640",
127 .fw_filename
= "intel/fw_sst_0f28.bin",
128 .board
= "bytcr_rt5640",
129 .machine_quirk
= byt_quirk
,
130 .sof_fw_filename
= "sof-byt.ri",
131 .sof_tplg_filename
= "sof-byt-rt5640.tplg",
135 .drv_name
= "bytcr_rt5640",
136 .fw_filename
= "intel/fw_sst_0f28.bin",
137 .board
= "bytcr_rt5640",
138 .sof_fw_filename
= "sof-byt.ri",
139 .sof_tplg_filename
= "sof-byt-rt5640.tplg",
143 .drv_name
= "bytcr_rt5640",
144 .fw_filename
= "intel/fw_sst_0f28.bin",
145 .board
= "bytcr_rt5640",
146 .sof_fw_filename
= "sof-byt.ri",
147 .sof_tplg_filename
= "sof-byt-rt5640.tplg",
151 .drv_name
= "bytcr_rt5651",
152 .fw_filename
= "intel/fw_sst_0f28.bin",
153 .board
= "bytcr_rt5651",
154 .sof_fw_filename
= "sof-byt.ri",
155 .sof_tplg_filename
= "sof-byt-rt5651.tplg",
159 .drv_name
= "bytcht_da7213",
160 .fw_filename
= "intel/fw_sst_0f28.bin",
161 .board
= "bytcht_da7213",
162 .sof_fw_filename
= "sof-byt.ri",
163 .sof_tplg_filename
= "sof-byt-da7213.tplg",
167 .drv_name
= "bytcht_da7213",
168 .fw_filename
= "intel/fw_sst_0f28.bin",
169 .board
= "bytcht_da7213",
170 .sof_fw_filename
= "sof-byt.ri",
171 .sof_tplg_filename
= "sof-byt-da7213.tplg",
175 .drv_name
= "bytcht_es8316",
176 .fw_filename
= "intel/fw_sst_0f28.bin",
177 .board
= "bytcht_es8316",
178 .sof_fw_filename
= "sof-byt.ri",
179 .sof_tplg_filename
= "sof-byt-es8316.tplg",
183 .drv_name
= "sof_rt5682",
184 .sof_fw_filename
= "sof-byt.ri",
185 .sof_tplg_filename
= "sof-byt-rt5682.tplg",
187 /* some Baytrail platforms rely on RT5645, use CHT machine driver */
190 .drv_name
= "cht-bsw-rt5645",
191 .fw_filename
= "intel/fw_sst_0f28.bin",
193 .sof_fw_filename
= "sof-byt.ri",
194 .sof_tplg_filename
= "sof-byt-rt5645.tplg",
198 .drv_name
= "cht-bsw-rt5645",
199 .fw_filename
= "intel/fw_sst_0f28.bin",
201 .sof_fw_filename
= "sof-byt.ri",
202 .sof_tplg_filename
= "sof-byt-rt5645.tplg",
204 /* use CHT driver to Baytrail Chromebooks */
207 .drv_name
= "cht-bsw-max98090",
208 .fw_filename
= "intel/fw_sst_0f28.bin",
210 .sof_fw_filename
= "sof-byt.ri",
211 .sof_tplg_filename
= "sof-byt-max98090.tplg",
215 .drv_name
= "bytcht_cx2072x",
216 .fw_filename
= "intel/fw_sst_0f28.bin",
217 .board
= "bytcht_cx2072x",
218 .sof_fw_filename
= "sof-byt.ri",
219 .sof_tplg_filename
= "sof-byt-cx2072x.tplg",
221 #if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
223 * This is always last in the table so that it is selected only when
224 * enabled explicitly and there is no codec-related information in SSDT
228 .drv_name
= "bytcht_nocodec",
229 .fw_filename
= "intel/fw_sst_0f28.bin",
230 .board
= "bytcht_nocodec",
235 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_machines
);
237 MODULE_LICENSE("GPL v2");
238 MODULE_DESCRIPTION("Intel Common ACPI Match module");