Skip to content

Commit ef30cb1

Browse files
simontrimmerbroonie
authored andcommitted
ASoC: amd: acp: Add ACP7.0 match entries for cs35l56 and cs42l43
This adds some match entries for a few system configurations: cs42l43 link 0 UID 0 cs35l56 link 1 UID 0 cs35l56 link 1 UID 1 cs35l56 link 1 UID 2 cs35l56 link 1 UID 3 cs42l43 link 1 UID 0 cs35l56 link 1 UID 0 cs35l56 link 1 UID 1 cs35l56 link 1 UID 2 cs35l56 link 1 UID 3 cs35l56 link 1 UID 0 cs35l56 link 1 UID 1 cs35l56 link 1 UID 2 cs35l56 link 1 UID 3 Signed-off-by: Simon Trimmer <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent ec20584 commit ef30cb1

1 file changed

Lines changed: 157 additions & 0 deletions

File tree

sound/soc/amd/acp/amd-acp70-acpi-match.c

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
3030
.group_id = 1
3131
};
3232

33+
static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
34+
.num = 0,
35+
.aggregated = 1,
36+
.group_position = 2,
37+
.group_id = 1
38+
};
39+
40+
static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
41+
.num = 0,
42+
.aggregated = 1,
43+
.group_position = 3,
44+
.group_id = 1
45+
};
46+
3347
static const struct snd_soc_acpi_adr_device rt711_rt1316_group_adr[] = {
3448
{
3549
.adr = 0x000030025D071101ull,
@@ -112,6 +126,134 @@ static const struct snd_soc_acpi_adr_device rt1320_1_single_adr[] = {
112126
}
113127
};
114128

129+
static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = {
130+
{ /* Jack Playback Endpoint */
131+
.num = 0,
132+
.aggregated = 0,
133+
.group_position = 0,
134+
.group_id = 0,
135+
},
136+
{ /* DMIC Capture Endpoint */
137+
.num = 1,
138+
.aggregated = 0,
139+
.group_position = 0,
140+
.group_id = 0,
141+
},
142+
{ /* Jack Capture Endpoint */
143+
.num = 2,
144+
.aggregated = 0,
145+
.group_position = 0,
146+
.group_id = 0,
147+
},
148+
{ /* Speaker Playback Endpoint */
149+
.num = 3,
150+
.aggregated = 0,
151+
.group_position = 0,
152+
.group_id = 0,
153+
},
154+
};
155+
156+
static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
157+
{
158+
.adr = 0x00003001FA424301ull,
159+
.num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
160+
.endpoints = cs42l43_endpoints,
161+
.name_prefix = "cs42l43"
162+
}
163+
};
164+
165+
static const struct snd_soc_acpi_adr_device cs42l43_1_cs35l56x4_1_adr[] = {
166+
{
167+
.adr = 0x00013001FA424301ull,
168+
.num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
169+
.endpoints = cs42l43_endpoints,
170+
.name_prefix = "cs42l43"
171+
},
172+
{
173+
.adr = 0x00013001FA355601ull,
174+
.num_endpoints = 1,
175+
.endpoints = &spk_l_endpoint,
176+
.name_prefix = "AMP1"
177+
},
178+
{
179+
.adr = 0x00013101FA355601ull,
180+
.num_endpoints = 1,
181+
.endpoints = &spk_r_endpoint,
182+
.name_prefix = "AMP2"
183+
},
184+
{
185+
.adr = 0x00013201FA355601ull,
186+
.num_endpoints = 1,
187+
.endpoints = &spk_2_endpoint,
188+
.name_prefix = "AMP3"
189+
},
190+
{
191+
.adr = 0x00013301FA355601ull,
192+
.num_endpoints = 1,
193+
.endpoints = &spk_3_endpoint,
194+
.name_prefix = "AMP4"
195+
},
196+
};
197+
198+
static const struct snd_soc_acpi_adr_device cs35l56x4_1_adr[] = {
199+
{
200+
.adr = 0x00013301FA355601ull,
201+
.num_endpoints = 1,
202+
.endpoints = &spk_l_endpoint,
203+
.name_prefix = "AMP1"
204+
},
205+
{
206+
.adr = 0x00013201FA355601ull,
207+
.num_endpoints = 1,
208+
.endpoints = &spk_r_endpoint,
209+
.name_prefix = "AMP2"
210+
},
211+
{
212+
.adr = 0x00013101FA355601ull,
213+
.num_endpoints = 1,
214+
.endpoints = &spk_2_endpoint,
215+
.name_prefix = "AMP3"
216+
},
217+
{
218+
.adr = 0x00013001FA355601ull,
219+
.num_endpoints = 1,
220+
.endpoints = &spk_3_endpoint,
221+
.name_prefix = "AMP4"
222+
},
223+
};
224+
225+
static const struct snd_soc_acpi_link_adr acp70_cs42l43_l1_cs35l56x4_l1[] = {
226+
{
227+
.mask = BIT(1),
228+
.num_adr = ARRAY_SIZE(cs42l43_1_cs35l56x4_1_adr),
229+
.adr_d = cs42l43_1_cs35l56x4_1_adr,
230+
},
231+
{}
232+
};
233+
234+
static const struct snd_soc_acpi_link_adr acp70_cs42l43_l0_cs35l56x4_l1[] = {
235+
{
236+
.mask = BIT(0),
237+
.num_adr = ARRAY_SIZE(cs42l43_0_adr),
238+
.adr_d = cs42l43_0_adr,
239+
},
240+
{
241+
.mask = BIT(1),
242+
.num_adr = ARRAY_SIZE(cs35l56x4_1_adr),
243+
.adr_d = cs35l56x4_1_adr,
244+
},
245+
{}
246+
};
247+
248+
static const struct snd_soc_acpi_link_adr acp70_cs35l56x4_l1[] = {
249+
{
250+
.mask = BIT(1),
251+
.num_adr = ARRAY_SIZE(cs35l56x4_1_adr),
252+
.adr_d = cs35l56x4_1_adr,
253+
},
254+
{}
255+
};
256+
115257
static const struct snd_soc_acpi_link_adr acp70_rt722_only[] = {
116258
{
117259
.mask = BIT(0),
@@ -151,6 +293,21 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = {
151293
.links = acp70_4_in_1_sdca,
152294
.drv_name = "amd_sdw",
153295
},
296+
{
297+
.link_mask = BIT(0) | BIT(1),
298+
.links = acp70_cs42l43_l0_cs35l56x4_l1,
299+
.drv_name = "amd_sdw",
300+
},
301+
{
302+
.link_mask = BIT(1),
303+
.links = acp70_cs42l43_l1_cs35l56x4_l1,
304+
.drv_name = "amd_sdw",
305+
},
306+
{
307+
.link_mask = BIT(1),
308+
.links = acp70_cs35l56x4_l1,
309+
.drv_name = "amd_sdw",
310+
},
154311
{},
155312
};
156313
EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sdw_machines);

0 commit comments

Comments
 (0)