xref: /linux/sound/soc/intel/common/soc-acpi-intel-jsl-match.c (revision 07f0148aafe8c95a3a76cd59e9e75b4d78d1d31d)
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 const struct snd_soc_acpi_codecs rt5682_rt5682s_hp = {
38 	.num_codecs = 2,
39 	.codecs = {"10EC5682", "RTL5682"},
40 };
41 
42 /*
43  * When adding new entry to the snd_soc_acpi_intel_jsl_machines array,
44  * use .quirk_data member to distinguish different machine driver,
45  * and keep ACPI .id field unchanged for the common codec.
46  */
47 struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
48 	{
49 		.id = "DLGS7219",
50 		.drv_name = "sof_da7219_mx98373",
51 		.sof_tplg_filename = "sof-jsl-da7219.tplg",
52 		.machine_quirk = snd_soc_acpi_codec_list,
53 		.quirk_data = &jsl_7219_98373_codecs,
54 	},
55 	{
56 		.id = "DLGS7219",
57 		.drv_name = "sof_da7219_mx98360a",
58 		.sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg",
59 	},
60 	{
61 		.comp_ids = &rt5682_rt5682s_hp,
62 		.drv_name = "jsl_rt5682_rt1015",
63 		.machine_quirk = snd_soc_acpi_codec_list,
64 		.quirk_data = &rt1015_spk,
65 		.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
66 	},
67 	{
68 		.comp_ids = &rt5682_rt5682s_hp,
69 		.drv_name = "jsl_rt5682_rt1015p",
70 		.machine_quirk = snd_soc_acpi_codec_list,
71 		.quirk_data = &rt1015p_spk,
72 		.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
73 	},
74 	{
75 		.comp_ids = &rt5682_rt5682s_hp,
76 		.drv_name = "jsl_rt5682_mx98360",
77 		.machine_quirk = snd_soc_acpi_codec_list,
78 		.quirk_data = &mx98360a_spk,
79 		.sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg",
80 	},
81 	{
82 		.comp_ids = &rt5682_rt5682s_hp,
83 		.drv_name = "jsl_rt5682",
84 		.sof_tplg_filename = "sof-jsl-rt5682.tplg",
85 	},
86 	{
87 		.id = "10134242",
88 		.drv_name = "jsl_cs4242_mx98360a",
89 		.machine_quirk = snd_soc_acpi_codec_list,
90 		.quirk_data = &mx98360a_spk,
91 		.sof_tplg_filename = "sof-jsl-cs42l42-mx98360a.tplg",
92 	},
93 	{
94 		.comp_ids = &essx_83x6,
95 		.drv_name = "sof-essx8336",
96 		.sof_tplg_filename = "sof-jsl-es8336", /* the tplg suffix is added at run time */
97 		.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
98 					SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
99 					SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
100 	},
101 	{},
102 };
103 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_jsl_machines);
104