2 * soc-apci-intel-byt-match.c - tables and support for BYT 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 byt_machine_id;
23 #define BYT_THINKPAD_10 1
25 static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
27 byt_machine_id = BYT_THINKPAD_10;
32 static const struct dmi_system_id byt_table[] = {
34 .callback = byt_thinkpad10_quirk_cb,
36 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
37 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 10"),
41 .callback = byt_thinkpad10_quirk_cb,
43 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
44 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Tablet B"),
48 .callback = byt_thinkpad10_quirk_cb,
50 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
51 DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Miix 2 10"),
57 static struct snd_soc_acpi_mach byt_thinkpad_10 = {
59 .drv_name = "cht-bsw-rt5672",
60 .fw_filename = "intel/fw_sst_0f28.bin",
62 .sof_fw_filename = "intel/sof-byt.ri",
63 .sof_tplg_filename = "intel/sof-byt-rt5670.tplg",
64 .asoc_plat_name = "sst-mfld-platform",
67 static struct snd_soc_acpi_mach *byt_quirk(void *arg)
69 struct snd_soc_acpi_mach *mach = arg;
71 dmi_check_system(byt_table);
73 if (byt_machine_id == BYT_THINKPAD_10)
74 return &byt_thinkpad_10;
79 struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[] = {
82 .drv_name = "byt-rt5640",
83 .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
87 .drv_name = "byt-max98090",
88 .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
92 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_legacy_machines);
94 struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
97 .drv_name = "bytcr_rt5640",
98 .fw_filename = "intel/fw_sst_0f28.bin",
99 .board = "bytcr_rt5640",
100 .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",
107 .drv_name = "bytcr_rt5640",
108 .fw_filename = "intel/fw_sst_0f28.bin",
109 .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",
116 .drv_name = "bytcr_rt5640",
117 .fw_filename = "intel/fw_sst_0f28.bin",
118 .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",
125 .drv_name = "bytcr_rt5651",
126 .fw_filename = "intel/fw_sst_0f28.bin",
127 .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",
134 .drv_name = "bytcht_da7213",
135 .fw_filename = "intel/fw_sst_0f28.bin",
136 .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",
143 .drv_name = "bytcht_da7213",
144 .fw_filename = "intel/fw_sst_0f28.bin",
145 .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",
150 /* some Baytrail platforms rely on RT5645, use CHT machine driver */
153 .drv_name = "cht-bsw-rt5645",
154 .fw_filename = "intel/fw_sst_0f28.bin",
156 .sof_fw_filename = "intel/sof-byt.ri",
157 .sof_tplg_filename = "intel/sof-byt-rt5645.tplg",
158 .asoc_plat_name = "sst-mfld-platform",
162 .drv_name = "cht-bsw-rt5645",
163 .fw_filename = "intel/fw_sst_0f28.bin",
165 .sof_fw_filename = "intel/sof-byt.ri",
166 .sof_tplg_filename = "intel/sof-byt-rt5645.tplg",
167 .asoc_plat_name = "sst-mfld-platform",
169 /* use CHT driver to Baytrail Chromebooks */
172 .drv_name = "cht-bsw-max98090",
173 .fw_filename = "intel/fw_sst_0f28.bin",
175 .sof_fw_filename = "intel/sof-byt.ri",
176 .sof_tplg_filename = "intel/sof-byt-max98090.tplg",
177 .asoc_plat_name = "sst-mfld-platform",
179 #if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
181 * This is always last in the table so that it is selected only when
182 * enabled explicitly and there is no codec-related information in SSDT
186 .drv_name = "bytcht_nocodec",
187 .fw_filename = "intel/fw_sst_0f28.bin",
188 .board = "bytcht_nocodec",
193 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_machines);
195 MODULE_LICENSE("GPL v2");
196 MODULE_DESCRIPTION("Intel Common ACPI Match module");