Re: [PATCH RESEND] ASoC: tas2783-sdw: restore the stereo split when no SDCA function data
From: Mark Brown
Date: Thu Dec 03 2026 - 08:30:50 EST
> 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.
> + if (!tas_dev->sa_func_data &&
> + substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
> + params_channels(params) == 2 && component->name_prefix) {
Does this handle cases like tas2783_2_adr in amd-acp70-acpi-match.c
correctly? That has four devices on one link. Though if they're broken
already perhaps we should just apply this and then do any fixes they
need incrementally.
> + 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);
Do we need to update stream_config.ch_count as well?
--
Mark Brown <broonie@xxxxxxxxxx>