All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Di Lorenzo <antoniodilorenzonap@gmail.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>,
	Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	linux-sound@vger.kernel.org,
	Antonio Di Lorenzo <antoniodilorenzonap@gmail.com>
Subject: [PATCH] ASoC: Intel: soc-acpi: add SoundWire config for ASUS P5405CAA
Date: Fri, 11 Sep 2026 11:10:35 +0200	[thread overview]
Message-ID: <20260911091035.221224-1-antoniodilorenzonap@gmail.com> (raw)

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


             reply	other threads:[~2026-09-11  9:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11  9:10 Antonio Di Lorenzo [this message]
2026-09-11  9:29 ` [PATCH] ASoC: Intel: soc-acpi: add SoundWire config for ASUS P5405CAA Cezary Rojewski
2026-09-11 11:31 ` Liao, Bard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260911091035.221224-1-antoniodilorenzonap@gmail.com \
    --to=antoniodilorenzonap@gmail.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.