Merge tag 'powerpc-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux/fpc-iii.git] / sound / soc / intel / common / soc-acpi-intel-cht-match.c
blob2752dc9557334eb84345c82988549f2e2b077fa5
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * soc-acpi-intel-cht-match.c - tables and support for CHT ACPI enumeration.
5 * Copyright (c) 2017, Intel Corporation.
6 */
8 #include <linux/dmi.h>
9 #include <sound/soc-acpi.h>
10 #include <sound/soc-acpi-intel-match.h>
12 static unsigned long cht_machine_id;
14 #define CHT_SURFACE_MACH 1
16 static int cht_surface_quirk_cb(const struct dmi_system_id *id)
18 cht_machine_id = CHT_SURFACE_MACH;
19 return 1;
22 static const struct dmi_system_id cht_table[] = {
24 .callback = cht_surface_quirk_cb,
25 .matches = {
26 DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
27 DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
30 { }
33 static struct snd_soc_acpi_mach cht_surface_mach = {
34 .id = "10EC5640",
35 .drv_name = "cht-bsw-rt5645",
36 .fw_filename = "intel/fw_sst_22a8.bin",
37 .board = "cht-bsw",
38 .sof_fw_filename = "sof-cht.ri",
39 .sof_tplg_filename = "sof-cht-rt5645.tplg",
42 static struct snd_soc_acpi_mach *cht_quirk(void *arg)
44 struct snd_soc_acpi_mach *mach = arg;
46 dmi_check_system(cht_table);
48 if (cht_machine_id == CHT_SURFACE_MACH)
49 return &cht_surface_mach;
50 else
51 return mach;
54 /* Cherryview-based platforms: CherryTrail and Braswell */
55 struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
57 .id = "10EC5670",
58 .drv_name = "cht-bsw-rt5672",
59 .fw_filename = "intel/fw_sst_22a8.bin",
60 .board = "cht-bsw",
61 .sof_fw_filename = "sof-cht.ri",
62 .sof_tplg_filename = "sof-cht-rt5670.tplg",
65 .id = "10EC5672",
66 .drv_name = "cht-bsw-rt5672",
67 .fw_filename = "intel/fw_sst_22a8.bin",
68 .board = "cht-bsw",
69 .sof_fw_filename = "sof-cht.ri",
70 .sof_tplg_filename = "sof-cht-rt5670.tplg",
73 .id = "10EC5645",
74 .drv_name = "cht-bsw-rt5645",
75 .fw_filename = "intel/fw_sst_22a8.bin",
76 .board = "cht-bsw",
77 .sof_fw_filename = "sof-cht.ri",
78 .sof_tplg_filename = "sof-cht-rt5645.tplg",
81 .id = "10EC5650",
82 .drv_name = "cht-bsw-rt5645",
83 .fw_filename = "intel/fw_sst_22a8.bin",
84 .board = "cht-bsw",
85 .sof_fw_filename = "sof-cht.ri",
86 .sof_tplg_filename = "sof-cht-rt5645.tplg",
89 .id = "10EC3270",
90 .drv_name = "cht-bsw-rt5645",
91 .fw_filename = "intel/fw_sst_22a8.bin",
92 .board = "cht-bsw",
93 .sof_fw_filename = "sof-cht.ri",
94 .sof_tplg_filename = "sof-cht-rt5645.tplg",
97 .id = "193C9890",
98 .drv_name = "cht-bsw-max98090",
99 .fw_filename = "intel/fw_sst_22a8.bin",
100 .board = "cht-bsw",
101 .sof_fw_filename = "sof-cht.ri",
102 .sof_tplg_filename = "sof-cht-max98090.tplg",
105 .id = "10508824",
106 .drv_name = "cht-bsw-nau8824",
107 .fw_filename = "intel/fw_sst_22a8.bin",
108 .board = "cht-bsw",
109 .sof_fw_filename = "sof-cht.ri",
110 .sof_tplg_filename = "sof-cht-nau8824.tplg",
113 .id = "DLGS7212",
114 .drv_name = "bytcht_da7213",
115 .fw_filename = "intel/fw_sst_22a8.bin",
116 .board = "bytcht_da7213",
117 .sof_fw_filename = "sof-cht.ri",
118 .sof_tplg_filename = "sof-cht-da7213.tplg",
121 .id = "DLGS7213",
122 .drv_name = "bytcht_da7213",
123 .fw_filename = "intel/fw_sst_22a8.bin",
124 .board = "bytcht_da7213",
125 .sof_fw_filename = "sof-cht.ri",
126 .sof_tplg_filename = "sof-cht-da7213.tplg",
129 .id = "ESSX8316",
130 .drv_name = "bytcht_es8316",
131 .fw_filename = "intel/fw_sst_22a8.bin",
132 .board = "bytcht_es8316",
133 .sof_fw_filename = "sof-cht.ri",
134 .sof_tplg_filename = "sof-cht-es8316.tplg",
136 /* some CHT-T platforms rely on RT5640, use Baytrail machine driver */
138 .id = "10EC5640",
139 .drv_name = "bytcr_rt5640",
140 .fw_filename = "intel/fw_sst_22a8.bin",
141 .board = "bytcr_rt5640",
142 .machine_quirk = cht_quirk,
143 .sof_fw_filename = "sof-cht.ri",
144 .sof_tplg_filename = "sof-cht-rt5640.tplg",
147 .id = "10EC3276",
148 .drv_name = "bytcr_rt5640",
149 .fw_filename = "intel/fw_sst_22a8.bin",
150 .board = "bytcr_rt5640",
151 .sof_fw_filename = "sof-cht.ri",
152 .sof_tplg_filename = "sof-cht-rt5640.tplg",
155 .id = "10EC5682",
156 .drv_name = "sof_rt5682",
157 .sof_fw_filename = "sof-cht.ri",
158 .sof_tplg_filename = "sof-cht-rt5682.tplg",
160 /* some CHT-T platforms rely on RT5651, use Baytrail machine driver */
162 .id = "10EC5651",
163 .drv_name = "bytcr_rt5651",
164 .fw_filename = "intel/fw_sst_22a8.bin",
165 .board = "bytcr_rt5651",
166 .sof_fw_filename = "sof-cht.ri",
167 .sof_tplg_filename = "sof-cht-rt5651.tplg",
170 .id = "14F10720",
171 .drv_name = "bytcht_cx2072x",
172 .fw_filename = "intel/fw_sst_22a8.bin",
173 .board = "bytcht_cx2072x",
174 .sof_fw_filename = "sof-cht.ri",
175 .sof_tplg_filename = "sof-cht-cx2072x.tplg",
178 .id = "104C5122",
179 .drv_name = "sof_pcm512x",
180 .sof_fw_filename = "sof-cht.ri",
181 .sof_tplg_filename = "sof-cht-src-50khz-pcm512x.tplg",
184 #if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
186 * This is always last in the table so that it is selected only when
187 * enabled explicitly and there is no codec-related information in SSDT
190 .id = "808622A8",
191 .drv_name = "bytcht_nocodec",
192 .fw_filename = "intel/fw_sst_22a8.bin",
193 .board = "bytcht_nocodec",
195 #endif
198 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cherrytrail_machines);
200 MODULE_LICENSE("GPL v2");
201 MODULE_DESCRIPTION("Intel Common ACPI Match module");