WIP FPC-III support
[linux/fpc-iii.git] / sound / soc / intel / common / soc-acpi-intel-icl-match.c
blob9a529a785288568a15bcc672de8e4cdd4e59b915
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * soc-acpi-intel-icl-match.c - tables and support for ICL ACPI enumeration.
5 * Copyright (c) 2018, Intel Corporation.
7 */
9 #include <sound/soc-acpi.h>
10 #include <sound/soc-acpi-intel-match.h>
11 #include "../skylake/skl.h"
13 static struct skl_machine_pdata icl_pdata = {
14 .use_tplg_pcm = true,
17 struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
19 .id = "INT34C2",
20 .drv_name = "icl_rt274",
21 .fw_filename = "intel/dsp_fw_icl.bin",
22 .pdata = &icl_pdata,
23 .sof_fw_filename = "sof-icl.ri",
24 .sof_tplg_filename = "sof-icl-rt274.tplg",
27 .id = "10EC5682",
28 .drv_name = "sof_rt5682",
29 .sof_fw_filename = "sof-icl.ri",
30 .sof_tplg_filename = "sof-icl-rt5682.tplg",
32 {},
34 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines);
36 static const struct snd_soc_acpi_endpoint single_endpoint = {
37 .num = 0,
38 .aggregated = 0,
39 .group_position = 0,
40 .group_id = 0,
43 static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
44 .num = 0,
45 .aggregated = 1,
46 .group_position = 0,
47 .group_id = 1,
50 static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
51 .num = 0,
52 .aggregated = 1,
53 .group_position = 1,
54 .group_id = 1,
57 static const struct snd_soc_acpi_adr_device rt700_0_adr[] = {
59 .adr = 0x000010025D070000,
60 .num_endpoints = 1,
61 .endpoints = &single_endpoint,
62 .name_prefix = "rt700"
66 static const struct snd_soc_acpi_link_adr icl_rvp[] = {
68 .mask = BIT(0),
69 .num_adr = ARRAY_SIZE(rt700_0_adr),
70 .adr_d = rt700_0_adr,
75 static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
77 .adr = 0x000020025D071100,
78 .num_endpoints = 1,
79 .endpoints = &single_endpoint,
80 .name_prefix = "rt711"
84 static const struct snd_soc_acpi_adr_device rt1308_1_adr[] = {
86 .adr = 0x000120025D130800,
87 .num_endpoints = 1,
88 .endpoints = &single_endpoint,
89 .name_prefix = "rt1308-1"
93 static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
95 .adr = 0x000120025D130800,
96 .num_endpoints = 1,
97 .endpoints = &spk_l_endpoint,
98 .name_prefix = "rt1308-1"
102 static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
104 .adr = 0x000220025D130800,
105 .num_endpoints = 1,
106 .endpoints = &spk_r_endpoint,
107 .name_prefix = "rt1308-2"
111 static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
113 .adr = 0x000320025D071500,
114 .num_endpoints = 1,
115 .endpoints = &single_endpoint,
116 .name_prefix = "rt715"
120 static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = {
122 .mask = BIT(0),
123 .num_adr = ARRAY_SIZE(rt711_0_adr),
124 .adr_d = rt711_0_adr,
127 .mask = BIT(1),
128 .num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
129 .adr_d = rt1308_1_group1_adr,
132 .mask = BIT(2),
133 .num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
134 .adr_d = rt1308_2_group1_adr,
137 .mask = BIT(3),
138 .num_adr = ARRAY_SIZE(rt715_3_adr),
139 .adr_d = rt715_3_adr,
144 static const struct snd_soc_acpi_link_adr icl_3_in_1_mono_amp[] = {
146 .mask = BIT(0),
147 .num_adr = ARRAY_SIZE(rt711_0_adr),
148 .adr_d = rt711_0_adr,
151 .mask = BIT(1),
152 .num_adr = ARRAY_SIZE(rt1308_1_adr),
153 .adr_d = rt1308_1_adr,
156 .mask = BIT(3),
157 .num_adr = ARRAY_SIZE(rt715_3_adr),
158 .adr_d = rt715_3_adr,
163 struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[] = {
165 .link_mask = 0xF, /* 4 active links required */
166 .links = icl_3_in_1_default,
167 .drv_name = "sof_sdw",
168 .sof_fw_filename = "sof-icl.ri",
169 .sof_tplg_filename = "sof-icl-rt711-rt1308-rt715.tplg",
172 .link_mask = 0xB, /* 3 active links required */
173 .links = icl_3_in_1_mono_amp,
174 .drv_name = "sof_sdw",
175 .sof_fw_filename = "sof-icl.ri",
176 .sof_tplg_filename = "sof-icl-rt711-rt1308-rt715-mono.tplg",
179 .link_mask = 0x1, /* rt700 connected on link0 */
180 .links = icl_rvp,
181 .drv_name = "sof_sdw",
182 .sof_fw_filename = "sof-icl.ri",
183 .sof_tplg_filename = "sof-icl-rt700.tplg",
187 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_sdw_machines);
189 MODULE_LICENSE("GPL v2");
190 MODULE_DESCRIPTION("Intel Common ACPI Match module");