xref: /linux/sound/soc/intel/common/soc-acpi-intel-jsl-match.c (revision 55ec81f7517fad09135f65552cea0a3ee84fff30)
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 const struct snd_soc_acpi_codecs essx_83x6 = {
13 	.num_codecs = 3,
14 	.codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
15 };
16 
17 static const struct snd_soc_acpi_codecs jsl_7219_98373_codecs = {
18 	.num_codecs = 1,
19 	.codecs = {"MX98373"}
20 };
21 
22 static const struct snd_soc_acpi_codecs rt1015_spk = {
23 	.num_codecs = 1,
24 	.codecs = {"10EC1015"}
25 };
26 
27 static const struct snd_soc_acpi_codecs rt1015p_spk = {
28 	.num_codecs = 1,
29 	.codecs = {"RTL1015"}
30 };
31 
32 static const struct snd_soc_acpi_codecs mx98360a_spk = {
33 	.num_codecs = 1,
34 	.codecs = {"MX98360A"}
35 };
36 
37 static struct snd_soc_acpi_codecs rt5650_spk = {
38 	.num_codecs = 1,
39 	.codecs = {"10EC5650"}
40 };
41 
42 static const struct snd_soc_acpi_codecs rt5682_rt5682s_hp = {
43 	.num_codecs = 2,
44 	.codecs = {"10EC5682", "RTL5682"},
45 };
46 
47 /*
48  * When adding new entry to the snd_soc_acpi_intel_jsl_machines array,
49  * use .quirk_data member to distinguish different machine driver,
50  * and keep ACPI .id field unchanged for the common codec.
51  */
52 struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
53 	{
54 		.id = "DLGS7219",
55 		.drv_name = "sof_da7219_mx98373",
56 		.sof_tplg_filename = "sof-jsl-da7219.tplg",
57 		.machine_quirk = snd_soc_acpi_codec_list,
58 		.quirk_data = &jsl_7219_98373_codecs,
59 	},
60 	{
61 		.id = "DLGS7219",
62 		.drv_name = "sof_da7219_mx98360a",
63 		.sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg",
64 	},
65 	{
66 		.comp_ids = &rt5682_rt5682s_hp,
67 		.drv_name = "jsl_rt5682_rt1015",
68 		.machine_quirk = snd_soc_acpi_codec_list,
69 		.quirk_data = &rt1015_spk,
70 		.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
71 	},
72 	{
73 		.comp_ids = &rt5682_rt5682s_hp,
74 		.drv_name = "jsl_rt5682_rt1015p",
75 		.machine_quirk = snd_soc_acpi_codec_list,
76 		.quirk_data = &rt1015p_spk,
77 		.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
78 	},
79 	{
80 		.comp_ids = &rt5682_rt5682s_hp,
81 		.drv_name = "jsl_rt5682_mx98360",
82 		.machine_quirk = snd_soc_acpi_codec_list,
83 		.quirk_data = &mx98360a_spk,
84 		.sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg",
85 	},
86 	{
87 		.comp_ids = &rt5682_rt5682s_hp,
88 		.drv_name = "jsl_rt5682",
89 		.sof_tplg_filename = "sof-jsl-rt5682.tplg",
90 	},
91 	{
92 		.id = "10134242",
93 		.drv_name = "jsl_cs4242_mx98360a",
94 		.machine_quirk = snd_soc_acpi_codec_list,
95 		.quirk_data = &mx98360a_spk,
96 		.sof_tplg_filename = "sof-jsl-cs42l42-mx98360a.tplg",
97 	},
98 	{
99 		.comp_ids = &essx_83x6,
100 		.drv_name = "sof-essx8336",
101 		.sof_tplg_filename = "sof-jsl-es8336", /* the tplg suffix is added at run time */
102 		.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
103 					SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
104 					SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
105 	},
106 	{
107 		.id = "10EC5650",
108 		.drv_name = "jsl_rt5650",
109 		.machine_quirk = snd_soc_acpi_codec_list,
110 		.quirk_data = &rt5650_spk,
111 		.sof_tplg_filename = "sof-jsl-rt5650.tplg",
112 	},
113 	{},
114 };
115 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_jsl_machines);
116