All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: soc-acpi: add SoundWire config for ASUS P5405CAA
@ 2026-09-11  9:10 Antonio Di Lorenzo
  2026-09-11  9:29 ` Cezary Rojewski
  2026-09-11 11:31 ` Liao, Bard
  0 siblings, 2 replies; 3+ messages in thread
From: Antonio Di Lorenzo @ 2026-09-11  9:10 UTC (permalink / raw)
  To: Cezary Rojewski, Mark Brown
  Cc: Liam Girdwood, Peter Ujfalusi, Bard Liao, Kai Vehmanen,
	Pierre-Louis Bossart, linux-sound, Antonio Di Lorenzo

The ASUS ExpertBook P5 P5405CAA uses two TAS2783 speaker
amplifiers on SoundWire link 1 and an RT721 codec on link 3.

Add the corresponding SoundWire ADR devices and link description
so the sof_sdw machine driver can select the correct configuration.

RT721 AIF1 is used for the headset jack and AIF3 for the DMIC,
while AIF2 is unused when external speaker amplifiers are present.

Use function topology selection for this configuration.

Signed-off-by: Antonio Di Lorenzo <antoniodilorenzonap@gmail.com>
---
 .../intel/common/soc-acpi-intel-ptl-match.c   | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/sound/soc/intel/common/soc-acpi-intel-ptl-match.c b/sound/soc/intel/common/soc-acpi-intel-ptl-match.c
index 756bbf82a326..1035d61f65e9 100644
--- a/sound/soc/intel/common/soc-acpi-intel-ptl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-ptl-match.c
@@ -109,6 +109,23 @@ static const struct snd_soc_acpi_endpoint jack_dmic_endpoints[] = {
 	},
 };
 
+static const struct snd_soc_acpi_endpoint rt721_jack_dmic_endpoints[] = {
+	/* Jack Endpoint (AIF1) */
+	{
+		.num = 0,
+		.aggregated = 0,
+		.group_position = 0,
+		.group_id = 0,
+	},
+	/* DMIC Endpoint (AIF3); AIF2 is unused with external speaker amps */
+	{
+		.num = 2,
+		.aggregated = 0,
+		.group_position = 0,
+		.group_id = 0,
+	},
+};
+
 static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints[] = {
 	/* Jack Endpoint */
 	{
@@ -301,6 +318,46 @@ static const struct snd_soc_acpi_adr_device rt1320_3_group2_adr[] = {
 	}
 };
 
+/* TAS2783 stereo speaker pair on SoundWire link 1. */
+static const struct snd_soc_acpi_adr_device tas2783_1_adr[] = {
+	{
+		.adr = 0x00013c0102000001ull,
+		.num_endpoints = 1,
+		.endpoints = &spk_l_endpoint,
+		.name_prefix = "tas2783-1",
+	},
+	{
+		.adr = 0x0001390102000001ull,
+		.num_endpoints = 1,
+		.endpoints = &spk_r_endpoint,
+		.name_prefix = "tas2783-2",
+	},
+};
+
+static const struct snd_soc_acpi_adr_device rt721_3_adr[] = {
+	{
+		.adr = 0x000330025d072101ull,
+		.num_endpoints = ARRAY_SIZE(rt721_jack_dmic_endpoints),
+		.endpoints = rt721_jack_dmic_endpoints,
+		.name_prefix = "rt721",
+	},
+};
+
+/* ASUS ExpertBook P5 P5405CAA */
+static const struct snd_soc_acpi_link_adr ptl_tas2783_l1_rt721_l3[] = {
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(tas2783_1_adr),
+		.adr_d = tas2783_1_adr,
+	},
+	{
+		.mask = BIT(3),
+		.num_adr = ARRAY_SIZE(rt721_3_adr),
+		.adr_d = rt721_3_adr,
+	},
+	{}
+};
+
 static const struct snd_soc_acpi_link_adr ptl_cs42l43_agg_l3_cs35l56_l2[] = {
 	{
 		.mask = BIT(3),
@@ -487,6 +544,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
 		.sof_tplg_filename = "sof-ptl-rt713-l3-rt1320-l1.tplg",
 		.get_function_tplg_files = sof_sdw_get_tplg_files,
 	},
+	{
+		.link_mask = BIT(1) | BIT(3),
+		.links = ptl_tas2783_l1_rt721_l3,
+		.drv_name = "sof_sdw",
+		/* Function topologies only; no monolithic fallback. */
+		.sof_tplg_filename = "sof-ptl-dummy.tplg",
+		.get_function_tplg_files = sof_sdw_get_tplg_files,
+	},
 	{
 		.link_mask = BIT(0) | BIT(2) | BIT(3),
 		.links = ptl_rt722_l0_rt1320_l23,
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-11 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11  9:10 [PATCH] ASoC: Intel: soc-acpi: add SoundWire config for ASUS P5405CAA Antonio Di Lorenzo
2026-09-11  9:29 ` Cezary Rojewski
2026-09-11 11:31 ` Liao, Bard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.