1 // SPDX-License-Identifier: GPL-2.0-only
3 * soc-apci-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
17 static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
19 byt_machine_id = BYT_THINKPAD_10;
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_thinkpad10_quirk_cb,
33 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
34 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 8"),
38 .callback = byt_thinkpad10_quirk_cb,
40 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
41 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 10"),
45 .callback = byt_thinkpad10_quirk_cb,
47 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
48 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Tablet B"),
52 .callback = byt_thinkpad10_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"),
72 static struct snd_soc_acpi_mach byt_thinkpad_10 = {
74 .drv_name = "cht-bsw-rt5672",
75 .fw_filename = "intel/fw_sst_0f28.bin",
77 .sof_fw_filename = "sof-byt.ri",
78 .sof_tplg_filename = "sof-byt-rt5670.tplg",
81 static struct snd_soc_acpi_mach byt_pov_p1006w = {
83 .drv_name = "bytcr_rt5651",
84 .fw_filename = "intel/fw_sst_0f28.bin",
85 .board = "bytcr_rt5651",
86 .sof_fw_filename = "sof-byt.ri",
87 .sof_tplg_filename = "sof-byt-rt5651.tplg",
90 static struct snd_soc_acpi_mach *byt_quirk(void *arg)
92 struct snd_soc_acpi_mach *mach = arg;
94 dmi_check_system(byt_table);
96 switch (byt_machine_id) {
98 return &byt_thinkpad_10;
100 return &byt_pov_p1006w;
106 struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[] = {
109 .drv_name = "byt-rt5640",
110 .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
114 .drv_name = "byt-max98090",
115 .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
119 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_legacy_machines);
121 struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
124 .drv_name = "bytcr_rt5640",
125 .fw_filename = "intel/fw_sst_0f28.bin",
126 .board = "bytcr_rt5640",
127 .machine_quirk = byt_quirk,
128 .sof_fw_filename = "sof-byt.ri",
129 .sof_tplg_filename = "sof-byt-rt5640.tplg",
133 .drv_name = "bytcr_rt5640",
134 .fw_filename = "intel/fw_sst_0f28.bin",
135 .board = "bytcr_rt5640",
136 .sof_fw_filename = "sof-byt.ri",
137 .sof_tplg_filename = "sof-byt-rt5640.tplg",
141 .drv_name = "bytcr_rt5640",
142 .fw_filename = "intel/fw_sst_0f28.bin",
143 .board = "bytcr_rt5640",
144 .sof_fw_filename = "sof-byt.ri",
145 .sof_tplg_filename = "sof-byt-rt5640.tplg",
149 .drv_name = "bytcr_rt5651",
150 .fw_filename = "intel/fw_sst_0f28.bin",
151 .board = "bytcr_rt5651",
152 .sof_fw_filename = "sof-byt.ri",
153 .sof_tplg_filename = "sof-byt-rt5651.tplg",
157 .drv_name = "bytcht_da7213",
158 .fw_filename = "intel/fw_sst_0f28.bin",
159 .board = "bytcht_da7213",
160 .sof_fw_filename = "sof-byt.ri",
161 .sof_tplg_filename = "sof-byt-da7213.tplg",
165 .drv_name = "bytcht_da7213",
166 .fw_filename = "intel/fw_sst_0f28.bin",
167 .board = "bytcht_da7213",
168 .sof_fw_filename = "sof-byt.ri",
169 .sof_tplg_filename = "sof-byt-da7213.tplg",
173 .drv_name = "bytcht_es8316",
174 .fw_filename = "intel/fw_sst_0f28.bin",
175 .board = "bytcht_es8316",
176 .sof_fw_filename = "sof-byt.ri",
177 .sof_tplg_filename = "sof-byt-es8316.tplg",
181 .drv_name = "sof_rt5682",
182 .sof_fw_filename = "sof-byt.ri",
183 .sof_tplg_filename = "sof-byt-rt5682.tplg",
185 /* some Baytrail platforms rely on RT5645, use CHT machine driver */
188 .drv_name = "cht-bsw-rt5645",
189 .fw_filename = "intel/fw_sst_0f28.bin",
191 .sof_fw_filename = "sof-byt.ri",
192 .sof_tplg_filename = "sof-byt-rt5645.tplg",
196 .drv_name = "cht-bsw-rt5645",
197 .fw_filename = "intel/fw_sst_0f28.bin",
199 .sof_fw_filename = "sof-byt.ri",
200 .sof_tplg_filename = "sof-byt-rt5645.tplg",
202 /* use CHT driver to Baytrail Chromebooks */
205 .drv_name = "cht-bsw-max98090",
206 .fw_filename = "intel/fw_sst_0f28.bin",
208 .sof_fw_filename = "sof-byt.ri",
209 .sof_tplg_filename = "sof-byt-max98090.tplg",
211 #if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
213 * This is always last in the table so that it is selected only when
214 * enabled explicitly and there is no codec-related information in SSDT
218 .drv_name = "bytcht_nocodec",
219 .fw_filename = "intel/fw_sst_0f28.bin",
220 .board = "bytcht_nocodec",
225 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_machines);
227 MODULE_LICENSE("GPL v2");
228 MODULE_DESCRIPTION("Intel Common ACPI Match module");