2 * soc-apci-intel-cht-match.c - tables and support for CHT 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 cht_machine_id;
23 #define CHT_SURFACE_MACH 1
25 static int cht_surface_quirk_cb(const struct dmi_system_id *id)
27 cht_machine_id = CHT_SURFACE_MACH;
31 static const struct dmi_system_id cht_table[] = {
33 .callback = cht_surface_quirk_cb,
35 DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
36 DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
42 static struct snd_soc_acpi_mach cht_surface_mach = {
44 .drv_name = "cht-bsw-rt5645",
45 .fw_filename = "/*(DEBLOBBED)*/",
47 .sof_fw_filename = "intel/sof-cht.ri",
48 .sof_tplg_filename = "intel/sof-cht-rt5645.tplg",
49 .asoc_plat_name = "sst-mfld-platform",
52 static struct snd_soc_acpi_mach *cht_quirk(void *arg)
54 struct snd_soc_acpi_mach *mach = arg;
56 dmi_check_system(cht_table);
58 if (cht_machine_id == CHT_SURFACE_MACH)
59 return &cht_surface_mach;
64 /* Cherryview-based platforms: CherryTrail and Braswell */
65 struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
68 .drv_name = "cht-bsw-rt5672",
69 .fw_filename = "/*(DEBLOBBED)*/",
71 .sof_fw_filename = "intel/sof-cht.ri",
72 .sof_tplg_filename = "intel/sof-cht-rt5670.tplg",
73 .asoc_plat_name = "sst-mfld-platform",
77 .drv_name = "cht-bsw-rt5672",
78 .fw_filename = "/*(DEBLOBBED)*/",
80 .sof_fw_filename = "intel/sof-cht.ri",
81 .sof_tplg_filename = "intel/sof-cht-rt5670.tplg",
82 .asoc_plat_name = "sst-mfld-platform",
86 .drv_name = "cht-bsw-rt5645",
87 .fw_filename = "/*(DEBLOBBED)*/",
89 .sof_fw_filename = "intel/sof-cht.ri",
90 .sof_tplg_filename = "intel/sof-cht-rt5645.tplg",
91 .asoc_plat_name = "sst-mfld-platform",
95 .drv_name = "cht-bsw-rt5645",
96 .fw_filename = "/*(DEBLOBBED)*/",
98 .sof_fw_filename = "intel/sof-cht.ri",
99 .sof_tplg_filename = "intel/sof-cht-rt5645.tplg",
100 .asoc_plat_name = "sst-mfld-platform",
104 .drv_name = "cht-bsw-rt5645",
105 .fw_filename = "/*(DEBLOBBED)*/",
107 .sof_fw_filename = "intel/sof-cht.ri",
108 .sof_tplg_filename = "intel/sof-cht-rt5645.tplg",
109 .asoc_plat_name = "sst-mfld-platform",
113 .drv_name = "cht-bsw-max98090",
114 .fw_filename = "/*(DEBLOBBED)*/",
116 .sof_fw_filename = "intel/sof-cht.ri",
117 .sof_tplg_filename = "intel/sof-cht-max98090.tplg",
118 .asoc_plat_name = "sst-mfld-platform",
122 .drv_name = "cht-bsw-nau8824",
123 .fw_filename = "/*(DEBLOBBED)*/",
125 .sof_fw_filename = "intel/sof-cht.ri",
126 .sof_tplg_filename = "intel/sof-cht-nau8824.tplg",
127 .asoc_plat_name = "sst-mfld-platform",
131 .drv_name = "bytcht_da7213",
132 .fw_filename = "/*(DEBLOBBED)*/",
133 .board = "bytcht_da7213",
134 .sof_fw_filename = "intel/sof-cht.ri",
135 .sof_tplg_filename = "intel/sof-cht-da7213.tplg",
136 .asoc_plat_name = "sst-mfld-platform",
140 .drv_name = "bytcht_da7213",
141 .fw_filename = "/*(DEBLOBBED)*/",
142 .board = "bytcht_da7213",
143 .sof_fw_filename = "intel/sof-cht.ri",
144 .sof_tplg_filename = "intel/sof-cht-da7213.tplg",
145 .asoc_plat_name = "sst-mfld-platform",
149 .drv_name = "bytcht_es8316",
150 .fw_filename = "/*(DEBLOBBED)*/",
151 .board = "bytcht_es8316",
152 .sof_fw_filename = "intel/sof-cht.ri",
153 .sof_tplg_filename = "intel/sof-cht-es8316.tplg",
154 .asoc_plat_name = "sst-mfld-platform",
156 /* some CHT-T platforms rely on RT5640, use Baytrail machine driver */
159 .drv_name = "bytcr_rt5640",
160 .fw_filename = "/*(DEBLOBBED)*/",
161 .board = "bytcr_rt5640",
162 .machine_quirk = cht_quirk,
163 .sof_fw_filename = "intel/sof-cht.ri",
164 .sof_tplg_filename = "intel/sof-cht-rt5640.tplg",
165 .asoc_plat_name = "sst-mfld-platform",
169 .drv_name = "bytcr_rt5640",
170 .fw_filename = "/*(DEBLOBBED)*/",
171 .board = "bytcr_rt5640",
172 .sof_fw_filename = "intel/sof-cht.ri",
173 .sof_tplg_filename = "intel/sof-cht-rt5640.tplg",
174 .asoc_plat_name = "sst-mfld-platform",
176 /* some CHT-T platforms rely on RT5651, use Baytrail machine driver */
179 .drv_name = "bytcr_rt5651",
180 .fw_filename = "/*(DEBLOBBED)*/",
181 .board = "bytcr_rt5651",
182 .sof_fw_filename = "intel/sof-cht.ri",
183 .sof_tplg_filename = "intel/sof-cht-rt5651.tplg",
184 .asoc_plat_name = "sst-mfld-platform",
186 #if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
188 * This is always last in the table so that it is selected only when
189 * enabled explicitly and there is no codec-related information in SSDT
193 .drv_name = "bytcht_nocodec",
194 .fw_filename = "/*(DEBLOBBED)*/",
195 .board = "bytcht_nocodec",
200 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cherrytrail_machines);
202 MODULE_LICENSE("GPL v2");
203 MODULE_DESCRIPTION("Intel Common ACPI Match module");