From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796336315; b=Q95hMgWN887Ku2fSCVbHQs4R1HNpueUswf0m0QC32EcfiN8HnTWxoGMG1imx/hjA6jDX JV7qEXA2YDL7eYkWGqfOFSUSe8FMmNQZLPxy/ziKx8urgLbCQfTN3bfiSUR0tTh9phEnn K0xYL846j2/Pu4mWf75ndZCOd2GmpnwnoltFGd6sfrMEkNte9nw1vHFWeXHH5AuVKeWMW YmTYPTuiM6HhEvQW6iGHGtH1ySpNUKF6xakP0VSq3MMbkFKsrMfD5FfpgylBNfjSaA2W8 +bCqiooIFi8QaXLotetZhqqEU/iJPGb+Ri3s63BzVhtD25CWdejb660VoTvPeL3Oc7g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796336315; 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=cIRT9kv79QFxwAeGTj/jp5gTUrBSmtJj9F0hoj1fDQE=; b=VnzrovGbPHy3sc4mnRzOCy/7iOy53rvwR5Y3DKQVaWyp3t5rVMUKGbPVsajry0M+iHoa TOXo24XmpA1R8mKcbJOe/ti26bbw8PgYQowPR5eKaVVYFM0isbCZhjHpfZlBtIOad+835 lqXVok3doNl7d02PaydzAmA/DnSz8zARRsZa+8JKpVYUnoWxzsI9kU1jQavsQ6zZFCAaC FWeYpqWCSnBzTM2jV0kWWx3XWND3Uf46LqFbL+bwARLgTukrYiHA5PysgC255v86gQemt dWcNyLsPa/2vauvj256gaU/JmsWmrivAQogiJHzv8TNKsBcs7/3l6mQkbfPedRosoIA== 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=MmLjMAOQ; arc=none smtp.remote-ip=209.85.128.53 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 8E8EA606A322 for ; Thu, 3 Dec 2026 22:18:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8E8EA606A322 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=MmLjMAOQ Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4a5177d78c7so2744005e9.2 for ; Thu, 03 Dec 2026 14:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796336314; x=1796941114; 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=cIRT9kv79QFxwAeGTj/jp5gTUrBSmtJj9F0hoj1fDQE=; b=MmLjMAOQ0FA1NLZdRQKzpPp2Asjmgxc33Fjm39LSG6xtJQKGa4VkbH9I5R6L2kyxDO GLntmEvp6KxCvR/N8k4WS6mB9TVO079lJYDzd6YZq7Mdr5aIozcv3yC+vXFQiq+3n9Gr /lDUbfjdHNXusVmBYIMZs/r1o5IaX3zAjkcBPC7sMdK2wdU/ow571HsdpkIF3gD3NPXx OS2rR/sZ3oG+UuDJD6C/T77uLoZ070SE+gTiHx/ZaX/OEeTb8bvt8CGT/c+cgNBoJWab AJsGqVBGKm9h0iloaobBl1A9mB9kGMCJv6r4+fCapBWR8CJPV6uqQbISP3VmcvU1g4e8 vLNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796336314; x=1796941114; 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=cIRT9kv79QFxwAeGTj/jp5gTUrBSmtJj9F0hoj1fDQE=; b=DBDQokS87+GAs2g5cuGuLl+JCCe+s2qYSswVB/vzAMJxArG3yJ9ask69F0aZ8uJcml BdDYxEGOrpNIkQPacFhXwiAI+7zWBBu7bb1+2MrFdaqHmBJbG3vONEjswLuRJdhzmMED pp7uK1dPtCKwIGq3QD6VFpe2xjX/XiwSoA+JLfxsFDNDnnlw/itXap/Ht8mGaDYrd2Rt I6IWCHduYruPAmWtWw5JM3SX5UYgU4qP42FuMA6tr/gMGJy0J2vrT3CuNt1/Lkf4je1x 3oaLzgCclVS4PWiobqO2D/c0xTF6/CItpgqrhFwl7BWHE1ulfDW8qUy3XmsyPdLKR1Ot T+2w== X-Forwarded-Encrypted: i=1; AL+hErGmyoo0USz0TDWyD43b0d4FB4Iv4i6ec4xF9Mh03vfHU29j7Dt06NXj49jkjFvtbC8VMxIQmoFNzSDPwA==@vger.kernel.org X-Gm-Message-State: APuU4Z+aeqaeo5PmDt+VJAcSJYNmHmhRjlFz7re5ksv/ptmWVqQdJPmS VyF8Z7uyMuPZIADv7a+EK6QPMtVpsxyqMRKnghNb4b9FhcKkQlkAPC1T X-Gm-Gg: AZFdTZeScy0IJKNX3oHml9I23bRs4F/B/p0qGgT8hBYJ9L28CdepLBXEelER+syXLL5 TQsnPNtTfCw0JbTbLxIUPq5nuq7wW2L9bk503e9WJeNeLliP8hxorwMiKaL3RMYEGZ5P57Zo1wH emPORkQkwFPVtMZkzJ6SWXTrGqgrdWs8qSE1p1gtPhPvZBLnSPmy8M9e9CJddpmP7DtuErmf85v bBxNlNVXHFsNmycVvR/nXE0pCL/8oWLrElWAh3h5faDZgONIvkxMjdVErVaePyp3GJLsOCtnkRP YS0YiZYUQ7jgzGJXixOPdswPyEB/7RGABzGCxqosO+2CuiAff+OXNA2faRx9Bl4o2HZ0ibLRnbP Up7sX+Wx+LKIG+uE20gLUSkfC/nTnJjVIDarIcYFNgtIeHCTue3d4UuKsCSN/Hr+aHdQ22tNhgI jGAhsSGWtQtdrEaKHUKyOcvX7h02g/VQav89M2uC+8zp1Yvg31meVghjytmmB3p9Y6bXMF9tpqz nfpWSQfaD2pTvLHmGiChWFZ/HzycNTAYM+oVpH9QZJQV08U4Su9ck4H3C6UEHijxOQ1KK32DVL0 nDNiIZY96MvuLoTViGr3rR5UVtkCoOBD75U7XDW3OxeKv1V64FLUqvj5t3fxkfnwKMquuN1pkPJ nNvK233gaIP8Oiitd39nifGGA6BpwhYosBoVHFw/+yxjdeVq2T+vp+E0I0AACY8LScML1zJPgd/ WCDKo63KtBL5yEAFr8HTaQJXXlrgS/awO1T5YVBnfKk6waRaOcORilsiIkQadsaRdgrTSPC8arz 8mdvzazOhnXxdX+dXY= X-Received: by 2002:a05:600c:3487:b0:4bb:6752:8413 with SMTP id 5b1f17b1804b1-4bbeb8512d4mr728485e9.8.1796336313963; Thu, 03 Dec 2026 14:18:33 -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-4bbea29f9fesm7590045e9.10.2026.12.03.14.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 14:18:33 -0800 (PST) From: Lee Mann To: Mark Brown , Liam Girdwood , linux-sound@vger.kernel.org Cc: Baojun Xu , Shenghao Ding , Niranjan H Y , Waldemar Hamm , Thorsten Leemhuis , regressions@lists.linux.dev, Antoine Monnet , Andrey Golovko , Pierre-Louis Bossart , Matthew Schwartz , linux-kernel@vger.kernel.org Subject: [PATCH v3] ASoC: tas2783-sdw: restore the stereo split when no SDCA function data Date: Thu, 3 Dec 2026 22:18:26 +0000 Message-ID: <20261203221826.32755-1-leepaulmann@gmail.com> X-Mailer: git-send-email 2.56.1 X-Mailing-List: linux-sound@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 the PPU21 Posture Number (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 and the link has one amp per channel, give each amp a single channel, as before f42fbd560cd8, and set ch_count to match the mask. sdw_compute_slave_ports() then places the amps in consecutive slots in link order. Links with more amps than channels, such as the four-amp tas2783_2_adr boards, keep the full mask: there the split pushes amps 3 and 4 past the two-channel payload. Platforms where the init table is applied are unchanged. Tested on the PX13 on v7.3.7 with the v7.4-rc5 driver plus this patch, speaker-test -c2 -t wav: left and right correct (v2; v3 changes only the comment and changelog). 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 --- v3: comment and changelog only, no code change (sashiko-bot review): - PPU21 control 0x10 written by tas2783_init_seq is Posture Number, not ClusterIndex - the slot each amp takes comes from its order on the link; the mask only sets how many channels it takes v2: https://lore.kernel.org/all/?q=s%3A%22PATCH+v2%22+s%3A%22restore+the+stereo+split%22 - only split when the link has two amps (Mark: four-amp tas2783_2_adr; Waldemar Hamm's report from a four-amp HP board shows amps 3/4 silent with the split and correct stereo with the full mask) - set stream_config.ch_count to 1 to match the mask (Mark) Baojun, could you check this on your two-amp boards? I expect them to log "Found Smart Amp function", in which case nothing changes there. AI note: written with Claude Code; I reviewed, built and tested it. sound/soc/codecs/tas2783-sdw.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c index 3f21700..cc9a3e1 100644 --- a/sound/soc/codecs/tas2783-sdw.c +++ b/sound/soc/codecs/tas2783-sdw.c @@ -995,6 +995,31 @@ 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 is never written and both amps keep the PPU21 Posture + * Number from tas2783_init_seq, so with the full mask from + * snd_sdw_params_to_config() the pair does not render stereo. On a + * link with one amp per channel, give each amp a single channel, as + * the prefix-based split did before; sdw_compute_slave_ports() then + * places the amps in consecutive slots in link order. Links with more + * amps than channels keep the full mask, as do platforms where the + * init table is applied. + */ + if (!tas_dev->sa_func_data && + substream->stream == SNDRV_PCM_STREAM_PLAYBACK && + params_channels(params) == 2 && + snd_soc_substream_to_rtd(substream)->dai_link->num_codecs == 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); + stream_config.ch_count = 1; + } + } + /* port 1 for playback */ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) port_config.num = 1; -- 2.56.1