Skip to content

Commit a7ebb02

Browse files
bardliaobroonie
authored andcommitted
ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13 support
Add rt713_vb on SoundWire link 2 and rt1320 on SoundWire link 1 and 3 configuration support. Signed-off-by: Bard Liao <[email protected]> Reviewed-by: Liam Girdwood <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 124d534 commit a7ebb02

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

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

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ static const struct snd_soc_acpi_endpoint single_endpoint = {
3636
.group_id = 0,
3737
};
3838

39+
static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
40+
.num = 0,
41+
.aggregated = 1,
42+
.group_position = 0,
43+
.group_id = 1,
44+
};
45+
3946
static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
4047
.num = 0,
4148
.aggregated = 1,
@@ -68,6 +75,23 @@ static const struct snd_soc_acpi_endpoint rt_mf_endpoints[] = {
6875
},
6976
};
7077

78+
static const struct snd_soc_acpi_endpoint jack_dmic_endpoints[] = {
79+
/* Jack Endpoint */
80+
{
81+
.num = 0,
82+
.aggregated = 0,
83+
.group_position = 0,
84+
.group_id = 0,
85+
},
86+
/* DMIC Endpoint */
87+
{
88+
.num = 1,
89+
.aggregated = 0,
90+
.group_position = 0,
91+
.group_id = 0,
92+
},
93+
};
94+
7195
static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints_endpoints[] = {
7296
/* Jack Endpoint */
7397
{
@@ -110,6 +134,15 @@ static const struct snd_soc_acpi_adr_device rt712_vb_2_group1_adr[] = {
110134
}
111135
};
112136

137+
static const struct snd_soc_acpi_adr_device rt713_vb_2_adr[] = {
138+
{
139+
.adr = 0x000230025d071301ull,
140+
.num_endpoints = ARRAY_SIZE(jack_dmic_endpoints),
141+
.endpoints = jack_dmic_endpoints,
142+
.name_prefix = "rt713"
143+
}
144+
};
145+
113146
static const struct snd_soc_acpi_adr_device rt721_3_single_adr[] = {
114147
{
115148
.adr = 0x000330025d072101ull,
@@ -164,6 +197,24 @@ static const struct snd_soc_acpi_adr_device rt1320_1_group1_adr[] = {
164197
}
165198
};
166199

200+
static const struct snd_soc_acpi_adr_device rt1320_1_group2_adr[] = {
201+
{
202+
.adr = 0x000130025D132001ull,
203+
.num_endpoints = 1,
204+
.endpoints = &spk_l_endpoint,
205+
.name_prefix = "rt1320-1"
206+
}
207+
};
208+
209+
static const struct snd_soc_acpi_adr_device rt1320_3_group2_adr[] = {
210+
{
211+
.adr = 0x000330025D132001ull,
212+
.num_endpoints = 1,
213+
.endpoints = &spk_r_endpoint,
214+
.name_prefix = "rt1320-2"
215+
}
216+
};
217+
167218
static const struct snd_soc_acpi_link_adr ptl_rt722_only[] = {
168219
{
169220
.mask = BIT(0),
@@ -200,6 +251,25 @@ static const struct snd_soc_acpi_link_adr ptl_rvp[] = {
200251
{}
201252
};
202253

254+
static const struct snd_soc_acpi_link_adr lnl_sdw_rt713_vb_l2_rt1320_l13[] = {
255+
{
256+
.mask = BIT(2),
257+
.num_adr = ARRAY_SIZE(rt713_vb_2_adr),
258+
.adr_d = rt713_vb_2_adr,
259+
},
260+
{
261+
.mask = BIT(1),
262+
.num_adr = ARRAY_SIZE(rt1320_1_group2_adr),
263+
.adr_d = rt1320_1_group2_adr,
264+
},
265+
{
266+
.mask = BIT(3),
267+
.num_adr = ARRAY_SIZE(rt1320_3_group2_adr),
268+
.adr_d = rt1320_3_group2_adr,
269+
},
270+
{}
271+
};
272+
203273
static const struct snd_soc_acpi_link_adr lnl_sdw_rt712_vb_l2_rt1320_l1[] = {
204274
{
205275
.mask = BIT(2),
@@ -272,6 +342,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
272342
.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
273343
.sof_tplg_filename = "sof-lnl-rt712-l2-rt1320-l1.tplg"
274344
},
345+
{
346+
.link_mask = BIT(1) | BIT(2) | BIT(3),
347+
.links = lnl_sdw_rt713_vb_l2_rt1320_l13,
348+
.drv_name = "sof_sdw",
349+
.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
350+
.sof_tplg_filename = "sof-lnl-rt713-l2-rt1320-l13.tplg"
351+
},
275352
{},
276353
};
277354
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_ptl_sdw_machines);

0 commit comments

Comments
 (0)