1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * soc-apci-intel-jsl-match.c - tables and support for JSL ACPI enumeration.
4  *
5  * Copyright (c) 2019-2020, Intel Corporation.
6  *
7  */
8 
9 #include <sound/soc-acpi.h>
10 #include <sound/soc-acpi-intel-match.h>
11 
12 static struct snd_soc_acpi_codecs jsl_7219_98373_codecs = {
13 	.num_codecs = 1,
14 	.codecs = {"MX98373"}
15 };
16 
17 static struct snd_soc_acpi_codecs rt1015_spk = {
18 	.num_codecs = 1,
19 	.codecs = {"10EC1015"}
20 };
21 
22 static struct snd_soc_acpi_codecs mx98360a_spk = {
23 	.num_codecs = 1,
24 	.codecs = {"MX98360A"}
25 };
26 
27 /*
28  * When adding new entry to the snd_soc_acpi_intel_jsl_machines array,
29  * use .quirk_data member to distinguish different machine driver,
30  * and keep ACPI .id field unchanged for the common codec.
31  */
32 struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
33 	{
34 		.id = "DLGS7219",
35 		.drv_name = "sof_da7219_max98373",
36 		.sof_fw_filename = "sof-jsl.ri",
37 		.sof_tplg_filename = "sof-jsl-da7219.tplg",
38 		.machine_quirk = snd_soc_acpi_codec_list,
39 		.quirk_data = &jsl_7219_98373_codecs,
40 	},
41 	{
42 		.id = "DLGS7219",
43 		.drv_name = "sof_da7219_max98360a",
44 		.sof_fw_filename = "sof-jsl.ri",
45 		.sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg",
46 	},
47 	{
48 		.id = "10EC5682",
49 		.drv_name = "jsl_rt5682_rt1015",
50 		.sof_fw_filename = "sof-jsl.ri",
51 		.machine_quirk = snd_soc_acpi_codec_list,
52 		.quirk_data = &rt1015_spk,
53 		.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
54 	},
55 	{
56 		.id = "10EC5682",
57 		.drv_name = "jsl_rt5682_max98360a",
58 		.sof_fw_filename = "sof-jsl.ri",
59 		.machine_quirk = snd_soc_acpi_codec_list,
60 		.quirk_data = &mx98360a_spk,
61 		.sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg",
62 	},
63 	{},
64 };
65 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_jsl_machines);
66