hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/sound/soc/intel/common/soc-acpi-intel-byt-match.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
2
- * soc-apci-intel-byt-match.c - tables and support for BYT ACPI enumeration.
3
+ * soc-acpi-intel-byt-match.c - tables and support for BYT ACPI enumeration.
34 *
45 * Copyright (c) 2017, Intel Corporation.
5
- *
6
- *
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.
10
- *
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
14
- * more details.
156 */
167
178 #include <linux/dmi.h>
....@@ -21,6 +12,8 @@
2112 static unsigned long byt_machine_id;
2213
2314 #define BYT_THINKPAD_10 1
15
+#define BYT_POV_P1006W 2
16
+#define BYT_AEGEX_10 3
2417
2518 static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
2619 {
....@@ -28,8 +21,26 @@
2821 return 1;
2922 }
3023
24
+static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id *id)
25
+{
26
+ byt_machine_id = BYT_POV_P1006W;
27
+ return 1;
28
+}
29
+
30
+static int byt_aegex10_quirk_cb(const struct dmi_system_id *id)
31
+{
32
+ byt_machine_id = BYT_AEGEX_10;
33
+ return 1;
34
+}
3135
3236 static const struct dmi_system_id byt_table[] = {
37
+ {
38
+ .callback = byt_thinkpad10_quirk_cb,
39
+ .matches = {
40
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
41
+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 8"),
42
+ },
43
+ },
3344 {
3445 .callback = byt_thinkpad10_quirk_cb,
3546 .matches = {
....@@ -51,17 +62,45 @@
5162 DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Miix 2 10"),
5263 },
5364 },
65
+ {
66
+ /* Point of View mobii wintab p1006w (v1.0) */
67
+ .callback = byt_pov_p1006w_quirk_cb,
68
+ .matches = {
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"),
74
+ },
75
+ },
76
+ {
77
+ /* Aegex 10 tablet (RU2) */
78
+ .callback = byt_aegex10_quirk_cb,
79
+ .matches = {
80
+ DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
81
+ DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
82
+ },
83
+ },
5484 { }
5585 };
5686
87
+/* The Thinkapd 10 and Aegex 10 tablets have the same ID problem */
5788 static struct snd_soc_acpi_mach byt_thinkpad_10 = {
5889 .id = "10EC5640",
5990 .drv_name = "cht-bsw-rt5672",
6091 .fw_filename = "intel/fw_sst_0f28.bin",
6192 .board = "cht-bsw",
62
- .sof_fw_filename = "intel/sof-byt.ri",
63
- .sof_tplg_filename = "intel/sof-byt-rt5670.tplg",
64
- .asoc_plat_name = "sst-mfld-platform",
93
+ .sof_fw_filename = "sof-byt.ri",
94
+ .sof_tplg_filename = "sof-byt-rt5670.tplg",
95
+};
96
+
97
+static struct snd_soc_acpi_mach byt_pov_p1006w = {
98
+ .id = "10EC5640",
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",
65104 };
66105
67106 static struct snd_soc_acpi_mach *byt_quirk(void *arg)
....@@ -70,26 +109,16 @@
70109
71110 dmi_check_system(byt_table);
72111
73
- if (byt_machine_id == BYT_THINKPAD_10)
112
+ switch (byt_machine_id) {
113
+ case BYT_THINKPAD_10:
114
+ case BYT_AEGEX_10:
74115 return &byt_thinkpad_10;
75
- else
116
+ case BYT_POV_P1006W:
117
+ return &byt_pov_p1006w;
118
+ default:
76119 return mach;
120
+ }
77121 }
78
-
79
-struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[] = {
80
- {
81
- .id = "10EC5640",
82
- .drv_name = "byt-rt5640",
83
- .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
84
- },
85
- {
86
- .id = "193C9890",
87
- .drv_name = "byt-max98090",
88
- .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
89
- },
90
- {}
91
-};
92
-EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_legacy_machines);
93122
94123 struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
95124 {
....@@ -98,54 +127,62 @@
98127 .fw_filename = "intel/fw_sst_0f28.bin",
99128 .board = "bytcr_rt5640",
100129 .machine_quirk = byt_quirk,
101
- .sof_fw_filename = "intel/sof-byt.ri",
102
- .sof_tplg_filename = "intel/sof-byt-rt5640.tplg",
103
- .asoc_plat_name = "sst-mfld-platform",
130
+ .sof_fw_filename = "sof-byt.ri",
131
+ .sof_tplg_filename = "sof-byt-rt5640.tplg",
104132 },
105133 {
106134 .id = "10EC5642",
107135 .drv_name = "bytcr_rt5640",
108136 .fw_filename = "intel/fw_sst_0f28.bin",
109137 .board = "bytcr_rt5640",
110
- .sof_fw_filename = "intel/sof-byt.ri",
111
- .sof_tplg_filename = "intel/sof-byt-rt5640.tplg",
112
- .asoc_plat_name = "sst-mfld-platform",
138
+ .sof_fw_filename = "sof-byt.ri",
139
+ .sof_tplg_filename = "sof-byt-rt5640.tplg",
113140 },
114141 {
115142 .id = "INTCCFFD",
116143 .drv_name = "bytcr_rt5640",
117144 .fw_filename = "intel/fw_sst_0f28.bin",
118145 .board = "bytcr_rt5640",
119
- .sof_fw_filename = "intel/sof-byt.ri",
120
- .sof_tplg_filename = "intel/sof-byt-rt5640.tplg",
121
- .asoc_plat_name = "sst-mfld-platform",
146
+ .sof_fw_filename = "sof-byt.ri",
147
+ .sof_tplg_filename = "sof-byt-rt5640.tplg",
122148 },
123149 {
124150 .id = "10EC5651",
125151 .drv_name = "bytcr_rt5651",
126152 .fw_filename = "intel/fw_sst_0f28.bin",
127153 .board = "bytcr_rt5651",
128
- .sof_fw_filename = "intel/sof-byt.ri",
129
- .sof_tplg_filename = "intel/sof-byt-rt5651.tplg",
130
- .asoc_plat_name = "sst-mfld-platform",
154
+ .sof_fw_filename = "sof-byt.ri",
155
+ .sof_tplg_filename = "sof-byt-rt5651.tplg",
131156 },
132157 {
133158 .id = "DLGS7212",
134159 .drv_name = "bytcht_da7213",
135160 .fw_filename = "intel/fw_sst_0f28.bin",
136161 .board = "bytcht_da7213",
137
- .sof_fw_filename = "intel/sof-byt.ri",
138
- .sof_tplg_filename = "intel/sof-byt-da7213.tplg",
139
- .asoc_plat_name = "sst-mfld-platform",
162
+ .sof_fw_filename = "sof-byt.ri",
163
+ .sof_tplg_filename = "sof-byt-da7213.tplg",
140164 },
141165 {
142166 .id = "DLGS7213",
143167 .drv_name = "bytcht_da7213",
144168 .fw_filename = "intel/fw_sst_0f28.bin",
145169 .board = "bytcht_da7213",
146
- .sof_fw_filename = "intel/sof-byt.ri",
147
- .sof_tplg_filename = "intel/sof-byt-da7213.tplg",
148
- .asoc_plat_name = "sst-mfld-platform",
170
+ .sof_fw_filename = "sof-byt.ri",
171
+ .sof_tplg_filename = "sof-byt-da7213.tplg",
172
+ },
173
+ {
174
+ .id = "ESSX8316",
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",
180
+ },
181
+ {
182
+ .id = "10EC5682",
183
+ .drv_name = "sof_rt5682",
184
+ .sof_fw_filename = "sof-byt.ri",
185
+ .sof_tplg_filename = "sof-byt-rt5682.tplg",
149186 },
150187 /* some Baytrail platforms rely on RT5645, use CHT machine driver */
151188 {
....@@ -153,18 +190,16 @@
153190 .drv_name = "cht-bsw-rt5645",
154191 .fw_filename = "intel/fw_sst_0f28.bin",
155192 .board = "cht-bsw",
156
- .sof_fw_filename = "intel/sof-byt.ri",
157
- .sof_tplg_filename = "intel/sof-byt-rt5645.tplg",
158
- .asoc_plat_name = "sst-mfld-platform",
193
+ .sof_fw_filename = "sof-byt.ri",
194
+ .sof_tplg_filename = "sof-byt-rt5645.tplg",
159195 },
160196 {
161197 .id = "10EC5648",
162198 .drv_name = "cht-bsw-rt5645",
163199 .fw_filename = "intel/fw_sst_0f28.bin",
164200 .board = "cht-bsw",
165
- .sof_fw_filename = "intel/sof-byt.ri",
166
- .sof_tplg_filename = "intel/sof-byt-rt5645.tplg",
167
- .asoc_plat_name = "sst-mfld-platform",
201
+ .sof_fw_filename = "sof-byt.ri",
202
+ .sof_tplg_filename = "sof-byt-rt5645.tplg",
168203 },
169204 /* use CHT driver to Baytrail Chromebooks */
170205 {
....@@ -172,9 +207,16 @@
172207 .drv_name = "cht-bsw-max98090",
173208 .fw_filename = "intel/fw_sst_0f28.bin",
174209 .board = "cht-bsw",
175
- .sof_fw_filename = "intel/sof-byt.ri",
176
- .sof_tplg_filename = "intel/sof-byt-max98090.tplg",
177
- .asoc_plat_name = "sst-mfld-platform",
210
+ .sof_fw_filename = "sof-byt.ri",
211
+ .sof_tplg_filename = "sof-byt-max98090.tplg",
212
+ },
213
+ {
214
+ .id = "14F10720",
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",
178220 },
179221 #if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
180222 /*