From: Lee Mann <leepaulmann@gmail.com>
To: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-sound@vger.kernel.org
Cc: Baojun Xu <baojun.xu@ti.com>,
Shenghao Ding <shenghao-ding@ti.com>,
Niranjan H Y <niranjan.hy@ti.com>,
Thorsten Leemhuis <regressions@leemhuis.info>,
regressions@lists.linux.dev,
Antoine Monnet <antoine@montane.tech>,
Andrey Golovko <andrey.golovko@gmail.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Matthew Schwartz <matthew.schwartz@linux.dev>,
linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: tas2783-sdw: restore the stereo split when no SDCA function data
Date: Tue, 1 Dec 2026 18:27:12 +0000 [thread overview]
Message-ID: <20261201182712.11948-1-leepaulmann@gmail.com> (raw)
In-Reply-To: <3a7685b52ad14928828ff36f717b9440@ti.com>
Commit f42fbd560cd8 ("ASoC: tas2783-sdw: add firmware download status
check") removed the per-amp channel mask from tas_sdw_hw_params(), on
the basis that the channel is selected by the SDCA init table from
ACPI DisCo.
That only holds when the SmartAmp function is parsed. On the ASUS
ProArt PX13 (HN7306EA, two TAS2783 on SoundWire link 1) the ACPI
declares the function type without a DisCo constant, so
sdca_parse_function() fails, sa_func_data stays NULL and the init
table is never written. Both amps keep ClusterIndex 0x01 from
tas2783_init_seq and, with the full playback mask, the right speaker
is silent.
Restore the split for that case only: when sa_func_data is NULL, give
each amp a single channel from its machine-assigned prefix, as before
f42fbd560cd8. When the function data is present, keep the full mask
and let the init table select the channel, so platforms that parse
the table are unchanged.
Tested on the PX13 on v7.3.5 with the v7.4-rc5 driver plus this patch,
speaker-test -c2 -t wav:
stock ACPI (function not parsed, split path): left and right correct
SDCA function parsed (via the out-of-tree fallback from SOF PR #5904,
init table applied, full mask): left and right correct
Fixes: f42fbd560cd8 ("ASoC: tas2783-sdw: add firmware download status check")
Closes: https://lore.kernel.org/all/20261107212552.10990-1-leepaulmann@gmail.com/
Link: https://github.com/thesofproject/linux/issues/6037
Assisted-by: LLM
Signed-off-by: Lee Mann <leepaulmann@gmail.com>
---
Baojun, your boards parse the SmartAmp function, so the init table
selects the channel and the split broke them. The PX13 ACPI does not
("function type only supported as DisCo constant"), so without the
split nothing selects the right channel. A plain revert would break
your boards again; this keeps the split only for the unparsed case.
I can send the PX13 ACPI tables if still useful.
AI note: written with Claude Code; I reviewed, built and tested it.
sound/soc/codecs/tas2783-sdw.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c
index 3f21700..45b45cb 100644
--- a/sound/soc/codecs/tas2783-sdw.c
+++ b/sound/soc/codecs/tas2783-sdw.c
@@ -995,6 +995,26 @@ static s32 tas_sdw_hw_params(struct snd_pcm_substream *substream,
snd_sdw_params_to_config(substream, params,
&stream_config, &port_config);
+ /*
+ * Without the SDCA SmartAmp function data from ACPI DisCo, the per-amp
+ * init table that selects each amp's channel is never written and both
+ * amps keep the ClusterIndex from tas2783_init_seq. snd_sdw_params_to_config()
+ * hands every codec the full mask for playback, so the pair would render
+ * the same channel. In that case claim a single channel per amp, keyed
+ * off the machine-assigned prefix (soc_sdw_ti_amp.c names the amps
+ * tas2783-1..4). When the function data is present, the init table
+ * selects the channel and the full mask must be kept.
+ */
+ if (!tas_dev->sa_func_data &&
+ substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
+ params_channels(params) == 2 && component->name_prefix) {
+ const char *idx_str = strrchr(component->name_prefix, '-');
+ unsigned long idx;
+
+ if (idx_str && !kstrtoul(idx_str + 1, 10, &idx) && idx)
+ port_config.ch_mask = (idx & 1) ? BIT(0) : BIT(1);
+ }
+
/* port 1 for playback */
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
port_config.num = 1;
--
2.56.0
prev parent reply other threads:[~2026-12-01 18:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 11:19 [PATCH v7] ASoC: tas2783-sdw: add firmware download status check Baojun Xu
2026-09-21 12:31 ` Mark Brown
2026-11-07 21:25 ` Lee Mann
2026-11-09 17:03 ` Lee Mann
2026-11-13 12:07 ` Thorsten Leemhuis
2026-11-13 12:43 ` Lee Mann
2026-11-23 11:24 ` Thorsten Leemhuis
2026-11-23 14:11 ` Mark Brown
2026-11-23 15:42 ` [EXTERNAL] " Xu, Baojun
2026-11-23 17:53 ` Mark Brown
2026-11-30 16:36 ` Thorsten Leemhuis
2026-12-01 9:51 ` Xu, Baojun
2026-12-01 10:01 ` Thorsten Leemhuis
2026-12-01 18:27 ` Lee Mann [this message]
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=20261201182712.11948-1-leepaulmann@gmail.com \
--to=leepaulmann@gmail.com \
--cc=andrey.golovko@gmail.com \
--cc=antoine@montane.tech \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=matthew.schwartz@linux.dev \
--cc=niranjan.hy@ti.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
--cc=shenghao-ding@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox