2 * soc-apci-intel-byt-match.c - tables and support for BYT ACPI enumeration.
4 * Copyright (c) 2017, Intel Corporation.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 #include <linux/dmi.h>
18 #include <sound/soc-acpi.h>
19 #include <sound/soc-acpi-intel-match.h>
21 static unsigned long byt_machine_id;
23 #define BYT_THINKPAD_10 1
24 #define BYT_POV_P1006W 2
26 static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
28 byt_machine_id = BYT_THINKPAD_10;
32 static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id *id)
34 byt_machine_id = BYT_POV_P1006W;
38 static const struct dmi_system_id byt_table[] = {
40 .callback = byt_thinkpad10_quirk_cb,
42 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
43 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 8"),
47 .callback = byt_thinkpad10_quirk_cb,
49 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
50 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 10"),
54 .callback = byt_thinkpad10_quirk_cb,
56 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
57 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Tablet B"),
61 .callback = byt_thinkpad10_quirk_cb,
63 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
64 DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Miix 2 10"),
68 /* Point of View mobii wintab p1006w (v1.0) */
69 .callback = byt_pov_p1006w_quirk_cb,
71 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
72 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
73 /* Note 105b is Foxcon's USB/PCI vendor id */
74 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
75 DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
81 static struct snd_soc_acpi_mach byt_thinkpad_10 = {
83 .drv_name = "cht-bsw-rt5672",
84 .fw_filename = "intel/fw_sst_0f28.bin",
86 .sof_fw_filename = "sof-byt.ri",
87 .sof_tplg_filename = "sof-byt-rt5670.tplg",
90 static struct snd_soc_acpi_mach byt_pov_p1006w = {
92 .drv_name = "bytcr_rt5651",
93 .fw_filename = "intel/fw_sst_0f28.bin",
94 .board = "bytcr_rt5651",
95 .sof_fw_filename = "sof-byt.ri",
96 .sof_tplg_filename = "sof-byt-rt5651.tplg",
99 static struct snd_soc_acpi_mach *byt_quirk(void *arg)
101 struct snd_soc_acpi_mach *mach = arg;
103 dmi_check_system(byt_table);
105 switch (byt_machine_id) {
106 case BYT_THINKPAD_10:
107 return &byt_thinkpad_10;
109 return &byt_pov_p1006w;
115 struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[] = {
118 .drv_name = "byt-rt5640",
119 .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
123 .drv_name = "byt-max98090",
124 .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
128 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_legacy_machines);
130 struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
133 .drv_name = "bytcr_rt5640",
134 .fw_filename = "intel/fw_sst_0f28.bin",
135 .board = "bytcr_rt5640",
136 .machine_quirk = byt_quirk,
137 .sof_fw_filename = "sof-byt.ri",
138 .sof_tplg_filename = "sof-byt-rt5640.tplg",
142 .drv_name = "bytcr_rt5640",
143 .fw_filename = "intel/fw_sst_0f28.bin",
144 .board = "bytcr_rt5640",
145 .sof_fw_filename = "sof-byt.ri",
146 .sof_tplg_filename = "sof-byt-rt5640.tplg",
150 .drv_name = "bytcr_rt5640",
151 .fw_filename = "intel/fw_sst_0f28.bin",
152 .board = "bytcr_rt5640",
153 .sof_fw_filename = "sof-byt.ri",
154 .sof_tplg_filename = "sof-byt-rt5640.tplg",
158 .drv_name = "bytcr_rt5651",
159 .fw_filename = "intel/fw_sst_0f28.bin",
160 .board = "bytcr_rt5651",
161 .sof_fw_filename = "sof-byt.ri",
162 .sof_tplg_filename = "sof-byt-rt5651.tplg",
166 .drv_name = "bytcht_da7213",
167 .fw_filename = "intel/fw_sst_0f28.bin",
168 .board = "bytcht_da7213",
169 .sof_fw_filename = "sof-byt.ri",
170 .sof_tplg_filename = "sof-byt-da7213.tplg",
174 .drv_name = "bytcht_da7213",
175 .fw_filename = "intel/fw_sst_0f28.bin",
176 .board = "bytcht_da7213",
177 .sof_fw_filename = "sof-byt.ri",
178 .sof_tplg_filename = "sof-byt-da7213.tplg",
182 .drv_name = "bytcht_es8316",
183 .fw_filename = "intel/fw_sst_0f28.bin",
184 .board = "bytcht_es8316",
185 .sof_fw_filename = "sof-byt.ri",
186 .sof_tplg_filename = "sof-byt-es8316.tplg",
190 .drv_name = "sof_rt5682",
191 .sof_fw_filename = "sof-byt.ri",
192 .sof_tplg_filename = "sof-byt-rt5682.tplg",
194 /* some Baytrail platforms rely on RT5645, use CHT machine driver */
197 .drv_name = "cht-bsw-rt5645",
198 .fw_filename = "intel/fw_sst_0f28.bin",
200 .sof_fw_filename = "sof-byt.ri",
201 .sof_tplg_filename = "sof-byt-rt5645.tplg",
205 .drv_name = "cht-bsw-rt5645",
206 .fw_filename = "intel/fw_sst_0f28.bin",
208 .sof_fw_filename = "sof-byt.ri",
209 .sof_tplg_filename = "sof-byt-rt5645.tplg",
211 /* use CHT driver to Baytrail Chromebooks */
214 .drv_name = "cht-bsw-max98090",
215 .fw_filename = "intel/fw_sst_0f28.bin",
217 .sof_fw_filename = "sof-byt.ri",
218 .sof_tplg_filename = "sof-byt-max98090.tplg",
220 #if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
222 * This is always last in the table so that it is selected only when
223 * enabled explicitly and there is no codec-related information in SSDT
227 .drv_name = "bytcht_nocodec",
228 .fw_filename = "intel/fw_sst_0f28.bin",
229 .board = "bytcht_nocodec",
234 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_machines);
236 MODULE_LICENSE("GPL v2");
237 MODULE_DESCRIPTION("Intel Common ACPI Match module");