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;
15 #define BYT_POV_P1006W 2
17 static int byt_rt5672_quirk_cb(const struct dmi_system_id *id)
19 byt_machine_id = BYT_RT5672;
23 static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id *id)
25 byt_machine_id = BYT_POV_P1006W;
29 static const struct dmi_system_id byt_table[] = {
31 .callback = byt_rt5672_quirk_cb,
33 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
34 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 8"),
38 .callback = byt_rt5672_quirk_cb,
40 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
41 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 10"),
45 .callback = byt_rt5672_quirk_cb,
47 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
48 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Tablet B"),
52 .callback = byt_rt5672_quirk_cb,
54 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
55 DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Miix 2 10"),
59 /* Point of View mobii wintab p1006w (v1.0) */
60 .callback = byt_pov_p1006w_quirk_cb,
62 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
63 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
64 /* Note 105b is Foxcon's USB/PCI vendor id */
65 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
66 DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
70 /* Aegex 10 tablet (RU2) */
71 .callback = byt_rt5672_quirk_cb,
73 DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
74 DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
78 /* Dell Venue 10 Pro 5055 */
79 .callback = byt_rt5672_quirk_cb,
81 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
82 DMI_MATCH(DMI_PRODUCT_NAME, "Venue 10 Pro 5055"),
88 /* Various devices use an ACPI id of 10EC5640 while using a rt5672 codec */
89 static struct snd_soc_acpi_mach byt_rt5672 = {
91 .drv_name = "cht-bsw-rt5672",
92 .fw_filename = "/*(DEBLOBBED)*/",
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 = "/*(DEBLOBBED)*/",
101 .board = "bytcr_rt5651",
102 .sof_tplg_filename = "sof-byt-rt5651.tplg",
105 static struct snd_soc_acpi_mach *byt_quirk(void *arg)
107 struct snd_soc_acpi_mach *mach = arg;
109 dmi_check_system(byt_table);
111 switch (byt_machine_id) {
115 return &byt_pov_p1006w;
121 static const struct snd_soc_acpi_codecs rt5640_comp_ids = {
123 .codecs = { "10EC5640", "10EC5642", "INTCCFFD"},
126 static const struct snd_soc_acpi_codecs wm5102_comp_ids = {
128 .codecs = { "10WM5102", "WM510204", "WM510205"},
131 static const struct snd_soc_acpi_codecs da7213_comp_ids = {
133 .codecs = { "DGLS7212", "DGLS7213"},
136 static const struct snd_soc_acpi_codecs rt5645_comp_ids = {
138 .codecs = { "10EC5645", "10EC5648"},
141 struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
143 .comp_ids = &rt5640_comp_ids,
144 .drv_name = "bytcr_rt5640",
145 .fw_filename = "/*(DEBLOBBED)*/",
146 .board = "bytcr_rt5640",
147 .machine_quirk = byt_quirk,
148 .sof_tplg_filename = "sof-byt-rt5640.tplg",
152 .drv_name = "bytcr_rt5651",
153 .fw_filename = "/*(DEBLOBBED)*/",
154 .board = "bytcr_rt5651",
155 .sof_tplg_filename = "sof-byt-rt5651.tplg",
158 .comp_ids = &wm5102_comp_ids,
159 .drv_name = "bytcr_wm5102",
160 .fw_filename = "/*(DEBLOBBED)*/",
161 .board = "bytcr_wm5102",
162 .sof_tplg_filename = "sof-byt-wm5102.tplg",
165 .comp_ids = &da7213_comp_ids,
166 .drv_name = "bytcht_da7213",
167 .fw_filename = "/*(DEBLOBBED)*/",
168 .board = "bytcht_da7213",
169 .sof_tplg_filename = "sof-byt-da7213.tplg",
173 .drv_name = "bytcht_es8316",
174 .fw_filename = "/*(DEBLOBBED)*/",
175 .board = "bytcht_es8316",
176 .sof_tplg_filename = "sof-byt-es8316.tplg",
180 .drv_name = "sof_rt5682",
181 .sof_tplg_filename = "sof-byt-rt5682.tplg",
183 /* some Baytrail platforms rely on RT5645, use CHT machine driver */
185 .comp_ids = &rt5645_comp_ids,
186 .drv_name = "cht-bsw-rt5645",
187 .fw_filename = "/*(DEBLOBBED)*/",
189 .sof_tplg_filename = "sof-byt-rt5645.tplg",
191 /* use CHT driver to Baytrail Chromebooks */
194 .drv_name = "cht-bsw-max98090",
195 .fw_filename = "/*(DEBLOBBED)*/",
197 .sof_tplg_filename = "sof-byt-max98090.tplg",
201 .drv_name = "bytcht_cx2072x",
202 .fw_filename = "/*(DEBLOBBED)*/",
203 .board = "bytcht_cx2072x",
204 .sof_tplg_filename = "sof-byt-cx2072x.tplg",
206 #if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
208 * This is always last in the table so that it is selected only when
209 * enabled explicitly and there is no codec-related information in SSDT
213 .drv_name = "bytcht_nocodec",
214 .fw_filename = "/*(DEBLOBBED)*/",
215 .board = "bytcht_nocodec",
220 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_machines);