1 // SPDX-License-Identifier: GPL-2.0-only
3 * soc-acpi-intel-cht-match.c - tables and support for CHT ACPI enumeration.
5 * Copyright (c) 2017, Intel Corporation.
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
;
22 static const struct dmi_system_id cht_table
[] = {
24 .callback
= cht_surface_quirk_cb
,
26 DMI_MATCH(DMI_SYS_VENDOR
, "Microsoft Corporation"),
27 DMI_MATCH(DMI_PRODUCT_NAME
, "Surface 3"),
33 static struct snd_soc_acpi_mach cht_surface_mach
= {
35 .drv_name
= "cht-bsw-rt5645",
36 .fw_filename
= "intel/fw_sst_22a8.bin",
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
;
54 /* Cherryview-based platforms: CherryTrail and Braswell */
55 struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines
[] = {
58 .drv_name
= "cht-bsw-rt5672",
59 .fw_filename
= "intel/fw_sst_22a8.bin",
61 .sof_fw_filename
= "sof-cht.ri",
62 .sof_tplg_filename
= "sof-cht-rt5670.tplg",
66 .drv_name
= "cht-bsw-rt5672",
67 .fw_filename
= "intel/fw_sst_22a8.bin",
69 .sof_fw_filename
= "sof-cht.ri",
70 .sof_tplg_filename
= "sof-cht-rt5670.tplg",
74 .drv_name
= "cht-bsw-rt5645",
75 .fw_filename
= "intel/fw_sst_22a8.bin",
77 .sof_fw_filename
= "sof-cht.ri",
78 .sof_tplg_filename
= "sof-cht-rt5645.tplg",
82 .drv_name
= "cht-bsw-rt5645",
83 .fw_filename
= "intel/fw_sst_22a8.bin",
85 .sof_fw_filename
= "sof-cht.ri",
86 .sof_tplg_filename
= "sof-cht-rt5645.tplg",
90 .drv_name
= "cht-bsw-rt5645",
91 .fw_filename
= "intel/fw_sst_22a8.bin",
93 .sof_fw_filename
= "sof-cht.ri",
94 .sof_tplg_filename
= "sof-cht-rt5645.tplg",
98 .drv_name
= "cht-bsw-max98090",
99 .fw_filename
= "intel/fw_sst_22a8.bin",
101 .sof_fw_filename
= "sof-cht.ri",
102 .sof_tplg_filename
= "sof-cht-max98090.tplg",
106 .drv_name
= "cht-bsw-nau8824",
107 .fw_filename
= "intel/fw_sst_22a8.bin",
109 .sof_fw_filename
= "sof-cht.ri",
110 .sof_tplg_filename
= "sof-cht-nau8824.tplg",
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",
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",
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 */
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",
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",
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 */
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",
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",
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
191 .drv_name
= "bytcht_nocodec",
192 .fw_filename
= "intel/fw_sst_22a8.bin",
193 .board
= "bytcht_nocodec",
198 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cherrytrail_machines
);
200 MODULE_LICENSE("GPL v2");
201 MODULE_DESCRIPTION("Intel Common ACPI Match module");