]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - sound/soc/intel/common/soc-acpi-intel-byt-match.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288
[mirror_ubuntu-jammy-kernel.git] / sound / soc / intel / common / soc-acpi-intel-byt-match.c
CommitLineData
2025cf9e 1// SPDX-License-Identifier: GPL-2.0-only
60046406
PLB
2/*
3 * soc-apci-intel-byt-match.c - tables and support for BYT ACPI enumeration.
4 *
5 * Copyright (c) 2017, Intel Corporation.
60046406
PLB
6 */
7
8#include <linux/dmi.h>
9#include <sound/soc-acpi.h>
10#include <sound/soc-acpi-intel-match.h>
11
12static unsigned long byt_machine_id;
13
14#define BYT_THINKPAD_10 1
d3dcc588 15#define BYT_POV_P1006W 2
60046406
PLB
16
17static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
18{
19 byt_machine_id = BYT_THINKPAD_10;
20 return 1;
21}
22
d3dcc588
HG
23static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id *id)
24{
25 byt_machine_id = BYT_POV_P1006W;
26 return 1;
27}
60046406
PLB
28
29static const struct dmi_system_id byt_table[] = {
2ca426a2
HG
30 {
31 .callback = byt_thinkpad10_quirk_cb,
32 .matches = {
33 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
34 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 8"),
35 },
36 },
60046406
PLB
37 {
38 .callback = byt_thinkpad10_quirk_cb,
39 .matches = {
40 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
41 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 10"),
42 },
43 },
44 {
45 .callback = byt_thinkpad10_quirk_cb,
46 .matches = {
47 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
48 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Tablet B"),
49 },
50 },
51 {
52 .callback = byt_thinkpad10_quirk_cb,
53 .matches = {
54 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
55 DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Miix 2 10"),
56 },
57 },
d3dcc588
HG
58 {
59 /* Point of View mobii wintab p1006w (v1.0) */
60 .callback = byt_pov_p1006w_quirk_cb,
61 .matches = {
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"),
67 },
68 },
60046406
PLB
69 { }
70};
71
72static struct snd_soc_acpi_mach byt_thinkpad_10 = {
73 .id = "10EC5640",
74 .drv_name = "cht-bsw-rt5672",
75 .fw_filename = "intel/fw_sst_0f28.bin",
76 .board = "cht-bsw",
528f0715
PLB
77 .sof_fw_filename = "sof-byt.ri",
78 .sof_tplg_filename = "sof-byt-rt5670.tplg",
60046406
PLB
79};
80
d3dcc588
HG
81static struct snd_soc_acpi_mach byt_pov_p1006w = {
82 .id = "10EC5640",
83 .drv_name = "bytcr_rt5651",
84 .fw_filename = "intel/fw_sst_0f28.bin",
85 .board = "bytcr_rt5651",
528f0715
PLB
86 .sof_fw_filename = "sof-byt.ri",
87 .sof_tplg_filename = "sof-byt-rt5651.tplg",
d3dcc588
HG
88};
89
60046406
PLB
90static struct snd_soc_acpi_mach *byt_quirk(void *arg)
91{
92 struct snd_soc_acpi_mach *mach = arg;
93
94 dmi_check_system(byt_table);
95
d3dcc588
HG
96 switch (byt_machine_id) {
97 case BYT_THINKPAD_10:
60046406 98 return &byt_thinkpad_10;
d3dcc588
HG
99 case BYT_POV_P1006W:
100 return &byt_pov_p1006w;
101 default:
60046406 102 return mach;
d3dcc588 103 }
60046406
PLB
104}
105
106struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[] = {
107 {
108 .id = "10EC5640",
109 .drv_name = "byt-rt5640",
110 .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
111 },
112 {
113 .id = "193C9890",
114 .drv_name = "byt-max98090",
115 .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
116 },
117 {}
118};
119EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_legacy_machines);
120
121struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
122 {
123 .id = "10EC5640",
124 .drv_name = "bytcr_rt5640",
125 .fw_filename = "intel/fw_sst_0f28.bin",
126 .board = "bytcr_rt5640",
127 .machine_quirk = byt_quirk,
528f0715
PLB
128 .sof_fw_filename = "sof-byt.ri",
129 .sof_tplg_filename = "sof-byt-rt5640.tplg",
60046406
PLB
130 },
131 {
132 .id = "10EC5642",
133 .drv_name = "bytcr_rt5640",
134 .fw_filename = "intel/fw_sst_0f28.bin",
135 .board = "bytcr_rt5640",
528f0715
PLB
136 .sof_fw_filename = "sof-byt.ri",
137 .sof_tplg_filename = "sof-byt-rt5640.tplg",
60046406
PLB
138 },
139 {
140 .id = "INTCCFFD",
141 .drv_name = "bytcr_rt5640",
142 .fw_filename = "intel/fw_sst_0f28.bin",
143 .board = "bytcr_rt5640",
528f0715
PLB
144 .sof_fw_filename = "sof-byt.ri",
145 .sof_tplg_filename = "sof-byt-rt5640.tplg",
60046406
PLB
146 },
147 {
148 .id = "10EC5651",
149 .drv_name = "bytcr_rt5651",
150 .fw_filename = "intel/fw_sst_0f28.bin",
151 .board = "bytcr_rt5651",
528f0715
PLB
152 .sof_fw_filename = "sof-byt.ri",
153 .sof_tplg_filename = "sof-byt-rt5651.tplg",
60046406
PLB
154 },
155 {
156 .id = "DLGS7212",
157 .drv_name = "bytcht_da7213",
158 .fw_filename = "intel/fw_sst_0f28.bin",
159 .board = "bytcht_da7213",
528f0715
PLB
160 .sof_fw_filename = "sof-byt.ri",
161 .sof_tplg_filename = "sof-byt-da7213.tplg",
60046406
PLB
162 },
163 {
164 .id = "DLGS7213",
165 .drv_name = "bytcht_da7213",
166 .fw_filename = "intel/fw_sst_0f28.bin",
167 .board = "bytcht_da7213",
528f0715
PLB
168 .sof_fw_filename = "sof-byt.ri",
169 .sof_tplg_filename = "sof-byt-da7213.tplg",
60046406 170 },
5198baf8
HG
171 {
172 .id = "ESSX8316",
173 .drv_name = "bytcht_es8316",
174 .fw_filename = "intel/fw_sst_0f28.bin",
175 .board = "bytcht_es8316",
528f0715
PLB
176 .sof_fw_filename = "sof-byt.ri",
177 .sof_tplg_filename = "sof-byt-es8316.tplg",
5198baf8 178 },
f70abd75
B
179 {
180 .id = "10EC5682",
181 .drv_name = "sof_rt5682",
182 .sof_fw_filename = "sof-byt.ri",
183 .sof_tplg_filename = "sof-byt-rt5682.tplg",
184 },
60046406
PLB
185 /* some Baytrail platforms rely on RT5645, use CHT machine driver */
186 {
187 .id = "10EC5645",
188 .drv_name = "cht-bsw-rt5645",
189 .fw_filename = "intel/fw_sst_0f28.bin",
190 .board = "cht-bsw",
528f0715
PLB
191 .sof_fw_filename = "sof-byt.ri",
192 .sof_tplg_filename = "sof-byt-rt5645.tplg",
60046406
PLB
193 },
194 {
195 .id = "10EC5648",
196 .drv_name = "cht-bsw-rt5645",
197 .fw_filename = "intel/fw_sst_0f28.bin",
198 .board = "cht-bsw",
528f0715
PLB
199 .sof_fw_filename = "sof-byt.ri",
200 .sof_tplg_filename = "sof-byt-rt5645.tplg",
60046406
PLB
201 },
202 /* use CHT driver to Baytrail Chromebooks */
203 {
204 .id = "193C9890",
205 .drv_name = "cht-bsw-max98090",
206 .fw_filename = "intel/fw_sst_0f28.bin",
207 .board = "cht-bsw",
528f0715
PLB
208 .sof_fw_filename = "sof-byt.ri",
209 .sof_tplg_filename = "sof-byt-max98090.tplg",
60046406
PLB
210 },
211#if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
212 /*
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
215 */
216 {
217 .id = "80860F28",
218 .drv_name = "bytcht_nocodec",
219 .fw_filename = "intel/fw_sst_0f28.bin",
220 .board = "bytcht_nocodec",
221 },
222#endif
223 {},
224};
225EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_machines);
226
227MODULE_LICENSE("GPL v2");
228MODULE_DESCRIPTION("Intel Common ACPI Match module");