Skip to content

Commit 9ecba28

Browse files
macchianbardliao
authored andcommitted
ASoC: Intel: soc-acpi-intel-arl-match: Add rt722 and rt1320 support
This patch adds support for the rt722 multi-function codec and the rt1320 amplifier in the ARL board configuration. Link 0: RT722 codec with three endpoints: Headset, Speaker, and DMIC. Link 2: RT1320 amplifier. Note: The Speaker endpoint on the RT722 codec is not used. Signed-off-by: Mac Chiang <mac.chiang@intel.com>
1 parent f641ce6 commit 9ecba28

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

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

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,31 @@ static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
4444
.group_id = 1,
4545
};
4646

47+
/*
48+
* RT722 is a multi-function codec, three endpoints are created for
49+
* its headset, amp and dmic functions.
50+
*/
51+
static const struct snd_soc_acpi_endpoint rt722_endpoints[] = {
52+
{
53+
.num = 0,
54+
.aggregated = 0,
55+
.group_position = 0,
56+
.group_id = 0,
57+
},
58+
{
59+
.num = 1,
60+
.aggregated = 0,
61+
.group_position = 0,
62+
.group_id = 0,
63+
},
64+
{
65+
.num = 2,
66+
.aggregated = 0,
67+
.group_position = 0,
68+
.group_id = 0,
69+
},
70+
};
71+
4772
static const struct snd_soc_acpi_adr_device cs35l56_2_lr_adr[] = {
4873
{
4974
.adr = 0x00023001FA355601ull,
@@ -185,6 +210,24 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
185210
}
186211
};
187212

213+
static const struct snd_soc_acpi_adr_device rt722_0_single_adr[] = {
214+
{
215+
.adr = 0x000030025D072201ull,
216+
.num_endpoints = ARRAY_SIZE(rt722_endpoints),
217+
.endpoints = rt722_endpoints,
218+
.name_prefix = "rt722"
219+
}
220+
};
221+
222+
static const struct snd_soc_acpi_adr_device rt1320_2_single_adr[] = {
223+
{
224+
.adr = 0x000230025D132001ull,
225+
.num_endpoints = 1,
226+
.endpoints = &single_endpoint,
227+
.name_prefix = "rt1320-1"
228+
}
229+
};
230+
188231
static const struct snd_soc_acpi_link_adr arl_cs42l43_l0[] = {
189232
{
190233
.mask = BIT(0),
@@ -287,6 +330,20 @@ static const struct snd_soc_acpi_link_adr arl_sdca_rvp[] = {
287330
{}
288331
};
289332

333+
static const struct snd_soc_acpi_link_adr arl_rt722_l0_rt1320_l2[] = {
334+
{
335+
.mask = BIT(0),
336+
.num_adr = ARRAY_SIZE(rt722_0_single_adr),
337+
.adr_d = rt722_0_single_adr,
338+
},
339+
{
340+
.mask = BIT(2),
341+
.num_adr = ARRAY_SIZE(rt1320_2_single_adr),
342+
.adr_d = rt1320_2_single_adr,
343+
},
344+
{}
345+
};
346+
290347
static const struct snd_soc_acpi_codecs arl_essx_83x6 = {
291348
.num_codecs = 3,
292349
.codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
@@ -385,6 +442,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_sdw_machines[] = {
385442
.drv_name = "sof_sdw",
386443
.sof_tplg_filename = "sof-arl-rt711-l0.tplg",
387444
},
445+
{
446+
.link_mask = BIT(0) | BIT(2),
447+
.links = arl_rt722_l0_rt1320_l2,
448+
.drv_name = "sof_sdw",
449+
.sof_tplg_filename = "sof-arl-rt722-l0_rt1320-l2.tplg",
450+
},
388451
{},
389452
};
390453
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_arl_sdw_machines);

0 commit comments

Comments
 (0)