Skip to content

Commit e411f65

Browse files
committed
ASoC: soc-acpi-intel-ptl-match: add ptl_cs42l43_agg_l3_cs35l56_l12_ghost_rt722
Some BIOS include a ghost ALC722 codec ADR while the hardware is not physically present. That's why we need to create an acpi mach table with empty endpoint. The ghost ALC722 codec with empty endpoint will be skipped by the machine driver. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Closes:#5721
1 parent d2be53a commit e411f65

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

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

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,25 @@ static const struct snd_soc_acpi_adr_device cs42l43_2_adr[] = {
211211
}
212212
};
213213

214+
static const struct snd_soc_acpi_adr_device cs42l43_3_agg_rt722_ghost_adr[] = {
215+
{
216+
.adr = 0x00033001FA424301ull,
217+
.num_endpoints = ARRAY_SIZE(cs42l43_amp_spkagg_endpoints),
218+
.endpoints = cs42l43_amp_spkagg_endpoints,
219+
.name_prefix = "cs42l43"
220+
},
221+
/*
222+
* To handle cases where the ALC722 codec is listed in the BIOS while the
223+
* hardware is not physically present.
224+
*/
225+
{
226+
.adr = 0x000330025d072201ull, /* Ghost ALC722 */
227+
.num_endpoints = 0,
228+
.endpoints = NULL,
229+
.name_prefix = "ghost"
230+
}
231+
};
232+
214233
static const struct snd_soc_acpi_adr_device cs42l43_3_agg_adr[] = {
215234
{
216235
.adr = 0x00033001FA424301ull,
@@ -235,6 +254,36 @@ static const struct snd_soc_acpi_adr_device cs35l56_2_lr_adr[] = {
235254
}
236255
};
237256

257+
static const struct snd_soc_acpi_adr_device cs35l56_2_2amp_adr[] = {
258+
{
259+
.adr = 0x00023001fa355601ull,
260+
.num_endpoints = 1,
261+
.endpoints = &spk_1_endpoint,
262+
.name_prefix = "AMP1"
263+
},
264+
{
265+
.adr = 0x00023101fa355601ull,
266+
.num_endpoints = 1,
267+
.endpoints = &spk_2_endpoint,
268+
.name_prefix = "AMP2"
269+
}
270+
};
271+
272+
static const struct snd_soc_acpi_adr_device cs35l56_1_2amp_adr[] = {
273+
{
274+
.adr = 0x00013201fa355601ull,
275+
.num_endpoints = 1,
276+
.endpoints = &spk_3_endpoint,
277+
.name_prefix = "AMP3"
278+
},
279+
{
280+
.adr = 0x00013301fa355601ull,
281+
.num_endpoints = 1,
282+
.endpoints = &spk_4_endpoint,
283+
.name_prefix = "AMP4"
284+
}
285+
};
286+
238287
static const struct snd_soc_acpi_adr_device cs35l56_1_3amp_adr[] = {
239288
{
240289
.adr = 0x00013001fa355601ull,
@@ -394,6 +443,25 @@ static const struct snd_soc_acpi_adr_device rt1320_3_group2_adr[] = {
394443
}
395444
};
396445

446+
static const struct snd_soc_acpi_link_adr ptl_cs42l43_agg_l3_cs35l56_l12_ghost_rt722[] = {
447+
{
448+
.mask = BIT(3),
449+
.num_adr = ARRAY_SIZE(cs42l43_3_agg_rt722_ghost_adr),
450+
.adr_d = cs42l43_3_agg_rt722_ghost_adr,
451+
},
452+
{
453+
.mask = BIT(2),
454+
.num_adr = ARRAY_SIZE(cs35l56_2_2amp_adr),
455+
.adr_d = cs35l56_2_2amp_adr,
456+
},
457+
{
458+
.mask = BIT(1),
459+
.num_adr = ARRAY_SIZE(cs35l56_1_2amp_adr),
460+
.adr_d = cs35l56_1_2amp_adr,
461+
},
462+
{}
463+
};
464+
397465
static const struct snd_soc_acpi_link_adr ptl_cs42l43_agg_l3_cs35l56_l2[] = {
398466
{
399467
.mask = BIT(3),
@@ -584,6 +652,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
584652
.drv_name = "sof_sdw",
585653
.sof_tplg_filename = "sof-ptl-cs42l43-l2-cs35l56x6-l13.tplg",
586654
},
655+
{
656+
.link_mask = BIT(1) | BIT(2) | BIT(3),
657+
.links = ptl_cs42l43_agg_l3_cs35l56_l12_ghost_rt722,
658+
.drv_name = "sof_sdw",
659+
.sof_tplg_filename = "sof-ptl-cs42l43-agg-l3-cs35l56-l12.tplg",
660+
},
587661
{
588662
.link_mask = BIT(0) | BIT(2) | BIT(3),
589663
.links = ptl_rt722_l0_rt1320_l23,

0 commit comments

Comments
 (0)