ASoC: tas2783-sdw: no stereo channel split for two mono amps -> mono output (AMD ACP SoundWire, ASUS ProArt PX13)

From: Antoine Monnet

Date: Sat Jul 18 2026 - 20:53:46 EST


Hi,

On an ASUS ProArt PX13 (HN7306) with two mono TAS2783 SoundWire smart-amps on a
single AMD ACP SoundWire link, playback is effectively mono: only one amp
produces sound and it plays the *left* channel out of the *right* speaker; the
right channel and the other (left) speaker are silent. Both amps enumerate,
load firmware, and stream without any error.

Environment
-----------
Machine : ASUS ProArt PX13, HN7306 (Ryzen AI Max, "Strix Halo")
Distro : Debian 13 (trixie)
Kernel : 7.0.13+deb13-amd64 (Debian 7.0.13-1~bpo13+1); code identical in 7.1.3
ACP : 0000:c4:00.5 [1022:15e2] rev 70, subsystem ASUSTeK [1043:1714],
driver snd_pci_ps
Amps : 2x TAS2783, SoundWire link 1, slaves 0x8 and 0xB
(sdw:0:1:0102:0000:01:8, sdw:0:1:0102:0000:01:b)

Note on the build: Debian ships sound/soc/codecs/tas2783-sdw.c but does not set
CONFIG_SND_SOC_TAS2783_SDW, so this is the unmodified in-tree driver built as an
out-of-tree module (DKMS). The relevant code is unchanged in current mainline
(verified against 7.1.3).

Analysis
--------
In tas_sdw_hw_params() the driver does:

snd_sdw_params_to_config(substream, params, &stream_config, &port_config);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
port_config.num = 1;
else
port_config.num = 2;
sdw_stream_add_slave(sdw_peripheral, &stream_config, &port_config, 1,
sdw_stream);

snd_sdw_params_to_config() sets port_config.ch_mask to cover all stream channels
(0x3 for a 2-channel stream). This runs per-amp, so *both* mono amps are added
to the stream with ch_mask = 0x3 and neither is told which channel to reproduce.
There is no per-amp channel assignment anywhere in the driver (the only other
ch_mask use is the port-prep write of whatever mask was handed in). The result
on this board is mono out of a single amp.

Diagnosis on the hardware (per-amp mute + isolated-channel tests) confirmed:
only one amp (tas2783-2, the right speaker) outputs, playing the left channel;
the other amp (left speaker) is silent regardless of content; no "without fw"
or port/prepare errors on either slave.

Fix
---
Assign a single SoundWire channel per amp, e.g. right after
snd_sdw_params_to_config():

if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
params_channels(params) == 2) {
switch (tas_dev->sdw_peripheral->id.unique_id) {
case 0x8: port_config.ch_mask = 0x1; break; /* left */
case 0xB: port_config.ch_mask = 0x2; break; /* right */
}
}

With this the two speakers are correctly driven:
speaker-test -Dpipewire -c2 -s1 -> left speaker
speaker-test -Dpipewire -c2 -s2 -> right speaker

The unique_id -> L/R mapping is board-specific, so a proper fix should derive
the per-amp channel assignment from firmware/ACPI (or a machine quirk table)
rather than hard-coded SoundWire addresses. Filing this so the driver grows a
real mechanism for multi-amp channel mapping.

Reproduce
---------
1. Boot; internal speakers play but only one speaker is audible.
2. speaker-test -Dpipewire -c2 -s1 -> wrong/only-one speaker
speaker-test -Dpipewire -c2 -s2 -> silent
3. With the per-amp ch_mask patch above, both speakers work.

Happy to test patches on this hardware.

Thanks,
Antoine