Skip to content

Commit c052406

Browse files
charleskeepaxbroonie
authored andcommitted
ASoC: Intel: soc-acpi: arl: Add match entries for new cs42l43 laptops
Add some new match table entries on Arrowlake for some coming cs42l43 laptops. Signed-off-by: Charles Keepax <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Bard Liao <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 690640e commit c052406

File tree

1 file changed

+219
-0
lines changed

1 file changed

+219
-0
lines changed

sound/soc/intel/common/soc-acpi-intel-arl-match.c

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,112 @@ static const struct snd_soc_acpi_endpoint single_endpoint = {
1515
.group_id = 0,
1616
};
1717

18+
static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
19+
.num = 0,
20+
.aggregated = 1,
21+
.group_position = 0,
22+
.group_id = 1,
23+
};
24+
25+
static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
26+
.num = 0,
27+
.aggregated = 1,
28+
.group_position = 1,
29+
.group_id = 1,
30+
};
31+
32+
static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
33+
.num = 0,
34+
.aggregated = 1,
35+
.group_position = 2,
36+
.group_id = 1,
37+
};
38+
39+
static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
40+
.num = 0,
41+
.aggregated = 1,
42+
.group_position = 3,
43+
.group_id = 1,
44+
};
45+
46+
static const struct snd_soc_acpi_adr_device cs35l56_2_lr_adr[] = {
47+
{
48+
.adr = 0x00023001FA355601ull,
49+
.num_endpoints = 1,
50+
.endpoints = &spk_l_endpoint,
51+
.name_prefix = "AMP1"
52+
},
53+
{
54+
.adr = 0x00023101FA355601ull,
55+
.num_endpoints = 1,
56+
.endpoints = &spk_r_endpoint,
57+
.name_prefix = "AMP2"
58+
}
59+
};
60+
61+
static const struct snd_soc_acpi_adr_device cs35l56_3_lr_adr[] = {
62+
{
63+
.adr = 0x00033001FA355601ull,
64+
.num_endpoints = 1,
65+
.endpoints = &spk_l_endpoint,
66+
.name_prefix = "AMP1"
67+
},
68+
{
69+
.adr = 0x00033401FA355601ull,
70+
.num_endpoints = 1,
71+
.endpoints = &spk_r_endpoint,
72+
.name_prefix = "AMP2"
73+
}
74+
};
75+
76+
static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = {
77+
{
78+
.adr = 0x00023201FA355601ull,
79+
.num_endpoints = 1,
80+
.endpoints = &spk_r_endpoint,
81+
.name_prefix = "AMP3"
82+
},
83+
{
84+
.adr = 0x00023301FA355601ull,
85+
.num_endpoints = 1,
86+
.endpoints = &spk_3_endpoint,
87+
.name_prefix = "AMP4"
88+
}
89+
};
90+
91+
static const struct snd_soc_acpi_adr_device cs35l56_3_l_adr[] = {
92+
{
93+
.adr = 0x00033001fa355601ull,
94+
.num_endpoints = 1,
95+
.endpoints = &spk_l_endpoint,
96+
.name_prefix = "AMP1"
97+
},
98+
{
99+
.adr = 0x00033101fa355601ull,
100+
.num_endpoints = 1,
101+
.endpoints = &spk_2_endpoint,
102+
.name_prefix = "AMP2"
103+
}
104+
};
105+
106+
static const struct snd_soc_acpi_adr_device cs35l56_2_r1_adr[] = {
107+
{
108+
.adr = 0x00023101FA355601ull,
109+
.num_endpoints = 1,
110+
.endpoints = &spk_r_endpoint,
111+
.name_prefix = "AMP2"
112+
},
113+
};
114+
115+
static const struct snd_soc_acpi_adr_device cs35l56_3_l1_adr[] = {
116+
{
117+
.adr = 0x00033301fa355601ull,
118+
.num_endpoints = 1,
119+
.endpoints = &spk_l_endpoint,
120+
.name_prefix = "AMP1"
121+
},
122+
};
123+
18124
static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = {
19125
{ /* Jack Playback Endpoint */
20126
.num = 0,
@@ -51,6 +157,15 @@ static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
51157
}
52158
};
53159

160+
static const struct snd_soc_acpi_adr_device cs42l43_2_adr[] = {
161+
{
162+
.adr = 0x00023001FA424301ull,
163+
.num_endpoints = ARRAY_SIZE(cs42l43_endpoints),
164+
.endpoints = cs42l43_endpoints,
165+
.name_prefix = "cs42l43"
166+
}
167+
};
168+
54169
static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
55170
{
56171
.adr = 0x000020025D071100ull,
@@ -77,6 +192,80 @@ static const struct snd_soc_acpi_link_adr arl_cs42l43_l0[] = {
77192
},
78193
};
79194

195+
static const struct snd_soc_acpi_link_adr arl_cs42l43_l2[] = {
196+
{
197+
.mask = BIT(2),
198+
.num_adr = ARRAY_SIZE(cs42l43_2_adr),
199+
.adr_d = cs42l43_2_adr,
200+
},
201+
};
202+
203+
static const struct snd_soc_acpi_link_adr arl_cs42l43_l2_cs35l56_l3[] = {
204+
{
205+
.mask = BIT(2),
206+
.num_adr = ARRAY_SIZE(cs42l43_2_adr),
207+
.adr_d = cs42l43_2_adr,
208+
},
209+
{
210+
.mask = BIT(3),
211+
.num_adr = ARRAY_SIZE(cs35l56_3_lr_adr),
212+
.adr_d = cs35l56_3_lr_adr,
213+
},
214+
{}
215+
};
216+
217+
static const struct snd_soc_acpi_link_adr arl_cs42l43_l0_cs35l56_l2[] = {
218+
{
219+
.mask = BIT(0),
220+
.num_adr = ARRAY_SIZE(cs42l43_0_adr),
221+
.adr_d = cs42l43_0_adr,
222+
},
223+
{
224+
.mask = BIT(2),
225+
.num_adr = ARRAY_SIZE(cs35l56_2_lr_adr),
226+
.adr_d = cs35l56_2_lr_adr,
227+
},
228+
{}
229+
};
230+
231+
static const struct snd_soc_acpi_link_adr arl_cs42l43_l0_cs35l56_l23[] = {
232+
{
233+
.mask = BIT(0),
234+
.num_adr = ARRAY_SIZE(cs42l43_0_adr),
235+
.adr_d = cs42l43_0_adr,
236+
},
237+
{
238+
.mask = BIT(2),
239+
.num_adr = ARRAY_SIZE(cs35l56_2_r_adr),
240+
.adr_d = cs35l56_2_r_adr,
241+
},
242+
{
243+
.mask = BIT(3),
244+
.num_adr = ARRAY_SIZE(cs35l56_3_l_adr),
245+
.adr_d = cs35l56_3_l_adr,
246+
},
247+
{}
248+
};
249+
250+
static const struct snd_soc_acpi_link_adr arl_cs42l43_l0_cs35l56_2_l23[] = {
251+
{
252+
.mask = BIT(0),
253+
.num_adr = ARRAY_SIZE(cs42l43_0_adr),
254+
.adr_d = cs42l43_0_adr,
255+
},
256+
{
257+
.mask = BIT(2),
258+
.num_adr = ARRAY_SIZE(cs35l56_2_r1_adr),
259+
.adr_d = cs35l56_2_r1_adr,
260+
},
261+
{
262+
.mask = BIT(3),
263+
.num_adr = ARRAY_SIZE(cs35l56_3_l1_adr),
264+
.adr_d = cs35l56_3_l1_adr,
265+
},
266+
{}
267+
};
268+
80269
static const struct snd_soc_acpi_link_adr arl_rvp[] = {
81270
{
82271
.mask = BIT(0),
@@ -127,12 +316,42 @@ EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_arl_machines);
127316

128317
/* this table is used when there is no I2S codec present */
129318
struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_sdw_machines[] = {
319+
{
320+
.link_mask = BIT(0) | BIT(2) | BIT(3),
321+
.links = arl_cs42l43_l0_cs35l56_l23,
322+
.drv_name = "sof_sdw",
323+
.sof_tplg_filename = "sof-arl-cs42l43-l0-cs35l56-l23.tplg",
324+
},
325+
{
326+
.link_mask = BIT(0) | BIT(2) | BIT(3),
327+
.links = arl_cs42l43_l0_cs35l56_2_l23,
328+
.drv_name = "sof_sdw",
329+
.sof_tplg_filename = "sof-arl-cs42l43-l0-cs35l56-l23.tplg",
330+
},
331+
{
332+
.link_mask = BIT(0) | BIT(2),
333+
.links = arl_cs42l43_l0_cs35l56_l2,
334+
.drv_name = "sof_sdw",
335+
.sof_tplg_filename = "sof-arl-cs42l43-l0-cs35l56-l2.tplg",
336+
},
130337
{
131338
.link_mask = BIT(0),
132339
.links = arl_cs42l43_l0,
133340
.drv_name = "sof_sdw",
134341
.sof_tplg_filename = "sof-arl-cs42l43-l0.tplg",
135342
},
343+
{
344+
.link_mask = BIT(2),
345+
.links = arl_cs42l43_l2,
346+
.drv_name = "sof_sdw",
347+
.sof_tplg_filename = "sof-arl-cs42l43-l2.tplg",
348+
},
349+
{
350+
.link_mask = BIT(2) | BIT(3),
351+
.links = arl_cs42l43_l2_cs35l56_l3,
352+
.drv_name = "sof_sdw",
353+
.sof_tplg_filename = "sof-arl-cs42l43-l2-cs35l56-l3.tplg",
354+
},
136355
{
137356
.link_mask = 0x1, /* link0 required */
138357
.links = arl_rvp,

0 commit comments

Comments
 (0)