forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/sound/soc/intel/common/soc-acpi-intel-bxt-match.c
....@@ -1,13 +1,45 @@
1
-// SPDX-License-Identifier: GPL-2.0
1
+// SPDX-License-Identifier: GPL-2.0-only
22 /*
3
- * soc-apci-intel-bxt-match.c - tables and support for BXT ACPI enumeration.
3
+ * soc-acpi-intel-bxt-match.c - tables and support for BXT ACPI enumeration.
44 *
55 * Copyright (c) 2018, Intel Corporation.
66 *
77 */
88
9
+#include <linux/dmi.h>
910 #include <sound/soc-acpi.h>
1011 #include <sound/soc-acpi-intel-match.h>
12
+
13
+enum {
14
+ APL_RVP,
15
+};
16
+
17
+static const struct dmi_system_id apl_table[] = {
18
+ {
19
+ .matches = {
20
+ DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."),
21
+ DMI_MATCH(DMI_BOARD_NAME, "Apollolake RVP1A"),
22
+ },
23
+ .driver_data = (void *)(APL_RVP),
24
+ },
25
+ {}
26
+};
27
+
28
+static struct snd_soc_acpi_mach *apl_quirk(void *arg)
29
+{
30
+ struct snd_soc_acpi_mach *mach = arg;
31
+ const struct dmi_system_id *dmi_id;
32
+ unsigned long apl_machine_id;
33
+
34
+ dmi_id = dmi_first_match(apl_table);
35
+ if (dmi_id) {
36
+ apl_machine_id = (unsigned long)dmi_id->driver_data;
37
+ if (apl_machine_id == APL_RVP)
38
+ return NULL;
39
+ }
40
+
41
+ return mach;
42
+}
1143
1244 static struct snd_soc_acpi_codecs bxt_codecs = {
1345 .num_codecs = 1,
....@@ -19,6 +51,8 @@
1951 .id = "INT343A",
2052 .drv_name = "bxt_alc298s_i2s",
2153 .fw_filename = "intel/dsp_fw_bxtn.bin",
54
+ .sof_fw_filename = "sof-apl.ri",
55
+ .sof_tplg_filename = "sof-apl-rt298.tplg",
2256 },
2357 {
2458 .id = "DLGS7219",
....@@ -26,30 +60,27 @@
2660 .fw_filename = "intel/dsp_fw_bxtn.bin",
2761 .machine_quirk = snd_soc_acpi_codec_list,
2862 .quirk_data = &bxt_codecs,
29
- .sof_fw_filename = "intel/sof-apl.ri",
30
- .sof_tplg_filename = "intel/sof-apl-da7219.tplg",
31
- .asoc_plat_name = "0000:00:0e.0",
63
+ .sof_fw_filename = "sof-apl.ri",
64
+ .sof_tplg_filename = "sof-apl-da7219.tplg",
3265 },
3366 {
3467 .id = "104C5122",
35
- .drv_name = "bxt-pcm512x",
36
- .sof_fw_filename = "intel/sof-apl.ri",
37
- .sof_tplg_filename = "intel/sof-apl-pcm512x.tplg",
38
- .asoc_plat_name = "0000:00:0e.0",
68
+ .drv_name = "sof_pcm512x",
69
+ .sof_fw_filename = "sof-apl.ri",
70
+ .sof_tplg_filename = "sof-apl-pcm512x.tplg",
3971 },
4072 {
4173 .id = "1AEC8804",
42
- .drv_name = "bxt-wm8804",
43
- .sof_fw_filename = "intel/sof-apl.ri",
44
- .sof_tplg_filename = "intel/sof-apl-wm8804.tplg",
45
- .asoc_plat_name = "0000:00:0e.0",
74
+ .drv_name = "sof-wm8804",
75
+ .sof_fw_filename = "sof-apl.ri",
76
+ .sof_tplg_filename = "sof-apl-wm8804.tplg",
4677 },
4778 {
4879 .id = "INT34C3",
4980 .drv_name = "bxt_tdf8532",
50
- .sof_fw_filename = "intel/sof-apl.ri",
51
- .sof_tplg_filename = "intel/sof-apl-tdf8532.tplg",
52
- .asoc_plat_name = "0000:00:0e.0",
81
+ .machine_quirk = apl_quirk,
82
+ .sof_fw_filename = "sof-apl.ri",
83
+ .sof_tplg_filename = "sof-apl-tdf8532.tplg",
5384 },
5485 {},
5586 };