From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796223349; b=gyIFYC5gZAOM1t85hjxQbcV4bHyuGLWNFKumA7k/O7uRkfOfQNPgMOWQSr1DEOAyn80Z 6aGGVIAu5LBIA4gNeVtb6Y5MDMRNz8oZaWT+Mw/Aabjt6W6oSq75ATYQj9REi3RypF2ZM JrHyUqKgBBoym9TYy9Irt1cah32qaDiOi1unY+nvj5n4JMI6QtLSc8ay6IH5Cq3tALlnk k1W6cpMluVhoovbgOM2noJRvZMMZng2LShxbLPn73lgTPbuAeSD9PP4B96kwYk/Bo9X7u Gk0iFbLEPBTq5q3XRThMUGoqPl0pAhFiUR3myhsxjRyMQP1n5OqNR899abnIE0QhyTA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796223349; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=LKLCDUTkF/JWaarwnklRZW5w/2NNICAoxsVZFwNuEjA=; b=YvF11k3LixZgx+/bj2m7U8En2ZErefmoDLKA4UUEwXrxvmBqvD9RtMLnGoJ51Oy8vZ5m nfxKxi0bUn8xGNbeBbwI0JueJdaX8MxKqvlRH0K2RV5K50knkHDSnZ5tP2+C9D4GT2VBY byWNgg40IrPG4SHZskGOpuLRT6brfpppAUKnJByXB0fI8geSHNLHcvbzRAM8VDEpwDa1P Cb2Pi3P1wvb/ZX8vL5jSYMnAh9ES5b9vo1KK/mTVmJPCjAsBdFI5E3JDhfJXbBLM3PLJq OlhvTsLto9XTkzjyRLE45MIEYv2VyncXHPk36kTf8xft2Rt/rK5+5m+qODUExVTcZJg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=OTVAWm5p; arc=none smtp.remote-ip=209.85.221.47 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F2F2606A327 for ; Wed, 2 Dec 2026 14:55:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6F2F2606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=OTVAWm5p Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-4c84abcb549so2326676f8f.1 for ; Wed, 02 Dec 2026 06:55:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796223348; x=1796828148; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=LKLCDUTkF/JWaarwnklRZW5w/2NNICAoxsVZFwNuEjA=; b=OTVAWm5peu1/rwzYU5oqh7s4k3mPjeCqP14PKIezp/57GRvGXJcQpO9PK8M1cxWDVh NobO82JDDRiorsZ4h2/3lTU0aFxH8c6rNTWGQjdyLP1KCKizkwMI61jbtod0rDNFOz6Y Lv//3LZU2X9D0ovVGXGrWz+CCKcgPNT1W+8/YWC28SIPoLSTkLn4pzJlPBk+rbO2zGLn mLJ89je4DVjYo0baLiphruTZSJzTEHCNzxqa0umPHfFuj9dxRJJFWv4mXnttP3iUjbTL UJDyf+IbcpGsxJ+VwwHZd49GdPWJ/ZUEEXV8ipUC06tKbub0tgXbgMndIA6ItonlMEsW ipYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796223348; x=1796828148; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=LKLCDUTkF/JWaarwnklRZW5w/2NNICAoxsVZFwNuEjA=; b=xgE4NX5LvwvyA9qNjaYT/csM+vI7CSkUZ1PBROwSd5ycHWcDphO/uWGUa9V510Vs3y 2ooIHhNNfkPdr/3stdsepdM2cUaG/fdt7mGjb5y+Eh80p1p68kWhhWexa+hrITuJxlU5 y5PKgG3+24ncgDM78Xn+WRuOX8b3xSrPIRvuW+8fRPXB4iCduelrbF/gbSAu/F8pQehk ukAgdsW6maukv764EYwnVUt5f1EBJHrxDebVrDDRqLlpL8wphf6Pye4rtRy+a4wQZolO B/2nwYS4ARkNRl6f67Xnt1vpil3RmJb3TZApYflVGHYCDuN4Uj+Q771cxA3t9h5RU1Dd wOyQ== X-Forwarded-Encrypted: i=1; AL+hErET7Ni130IZC2Y4+Ro+7fjmW4C2CU1t3UrxhDU+Dwr6CX9VmyXgB7WTmFIm5WtgaXFaQWOxxA1zq29Jmuo=@vger.kernel.org X-Gm-Message-State: APuU4Z8o1+rvkdqAB7gGbSvHTj3K+Zz45nz8r5Fi90M9EtM48i9i+pLJ Uw27FXL8+zPN6jKX3uTlL2qSJJ6GIhP7aBc8dAzHg2mCly7fI8kMV31L93M0UwVpAb0= X-Gm-Gg: AZFdTZcR1iZfdXIx1e2EWzUM7MVziFT9IgEzrbMCJ9+1g8+PHw+tT+9SyqQlc17eFpD 6BbLI8aJqQtNhAUsCSxNtcX9nBLwOBWAGfbrdoaHvgnfAMjuDsm4AjmDeyjheC39b6Uknw51i7q B3AQVeTDM1om/YJ+jaToAAzMYLH9XiuHA1RqU5zCGBCyqQ85QSXnf3XJlLoHukvMx+kYkWOTXKg mmVltMu36F6vJPc7Dg2NS5jRJaqwD8zdTKOutv8FckubFILH0SujGCmN7tl7748TJjOE5KzpJxP RoFDQY+/vYwTgU41OKC/IugbSjyf/LoM9KC+Ma/jpcK0DdaeiBvGd9XDF3Lvu35ISIKWFPm4w7s FB5ts161WhYScWnsy1TzW5DhcT5wJr3IoexihfpGHM8tgpQHn7KCfU3e8aaiijSGeRver4laEOI sZB5ckqiUve3maJq53jJkMhd1wACa4d+Oi03VhXgSsl6ssKldD8XhJLHwh+4vf89hfilvwb/dCk u9Byl6p1liJ0UJ2VNJu+pKiHgTi3T0Za8aeKJc0ocQyb9r8ehwcR43m2SZ3aVcJS3ZDMlzGOvY/ qaeaeQXXjPctN2WLMZ0eidqIhvN678kmeNqiaaUrE3XB494Rb7JTSpcpZhjxcbjc9Y3Y3Z9YP7g T5frhDCSWScgmRBc/i1x1obH92N5Q+9vxKbODdHraZddVGe0HsURoyCTcTi5Vg7IT8YYuEwsWzL FTlAyLmJLU1A3GgAed/I4QjEiofVxV/3p+L8nxLxGsNJmsV0gRmDFRKYha7Ei4GPEc5BAN8epue xSru2SeE4liJVhl3okN X-Received: by 2002:a05:600c:870b:b0:4bb:c3b3:13c3 with SMTP id 5b1f17b1804b1-4bbc3b31449mr193315425e9.32.1796223347456; Wed, 02 Dec 2026 06:55:47 -0800 (PST) Received: from px13.tail3a7e86.ts.net (91-201-160-62.ip4.as24916.net. [91.201.160.62]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb88442693sm1016912345e9.1.2026.12.02.06.55.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 06:55:47 -0800 (PST) From: Lee Mann To: Mark Brown , Liam Girdwood , linux-sound@vger.kernel.org Cc: Baojun Xu , Shenghao Ding , Niranjan H Y , Thorsten Leemhuis , regressions@lists.linux.dev, Antoine Monnet , Andrey Golovko , Pierre-Louis Bossart , Matthew Schwartz , linux-kernel@vger.kernel.org Subject: [PATCH RESEND] ASoC: tas2783-sdw: restore the stereo split when no SDCA function data Date: Wed, 2 Dec 2026 14:55:40 +0000 Message-ID: <20261202145540.121442-1-leepaulmann@gmail.com> X-Mailer: git-send-email 2.56.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- Resent as a new thread; the first copy went in reply to the v7 thread (https://lore.kernel.org/all/3a7685b52ad14928828ff36f717b9440@ti.com/). No changes. 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