From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796336316; b=Ik2ZtHNsf9oRvptC/LtZp5ySilp24uZWhbuZfwLBCu2YmJQyBYH4+3RskyiSptSjipfS yhemm95ao+wqATCFxsX+jqAya6HFL0f77XJ8BGW2TEFf9tWLqjLCmDGMtLukDM3avl+k0 OViMYZaH07NqFT1I4ur4FvrujltrsBX1CBs6uuCpZrCS5S3cDelegysT0ZEleTpAEkFQI nhOUZ/E3LCNrn3GyPiaIOTBuSZ67wbMZK58EuQgykiYTjpAwSCdQuYmgm0CMtJsLVh/Lb v8Sa8f7AixVojbEiBb4JfAAobno+kkeJp5tZDA+UXrI+XtnHf7bEVPfhFWHiN8uR8sw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796336316; 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=P1KQS+EWRiHtUk/7ICGq/XSEFeEkHiulQ55VBTQ2o9W8AEDsNqXlPHR3XutFJO2u5jLV hMwawm6OMWp/rmDAI5Z9TWafpfFiZSjLF2+mfnFlTMuPnTGzJJFMi1X+Yjch3KfPTQWFA 2zIIawGySV7oCjQNel3yhE+CdANqwlhC6KRUJt4lLdfMNZ5yVbnlHdHOvFn3zvjsKW4SZ kKnAJbfCgEGIo7TM/Dt8TcqeXvHfmBRsw8TXMrcYtgemLH/8BOw1A9V/o8DSDVa50pdKq G3blPKmSTuIqK8GVy/rJHPxowOtewnwvZBA6b9rPf4RYhpJblM3EKUpZf/uvG+XNeCw== 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.54 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 B2FB1606A32D for ; Thu, 3 Dec 2026 22:18:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B2FB1606A32D 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-f54.google.com with SMTP id 5b1f17b1804b1-4a5177d78c7so2743995e9.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=JjaPy3+eo5T3D9OAYAAzIJleDrCkbfIEtvNUJsJIKiSj7BZvHHzO1RZzdI8Y4+byuW CwVnnS4g64+BU92oJy14ddkmy25x5DBEAHrb/Gpd+e7eUaNYZGJ3U8pqPT+byUKlu5LQ cm07adYn09QSjz6pOPeB76qXO3GDdC/mLN7R1ovGJP+fMYa6EnPqvZKH8p/F4Y0immvw NmNpNpB91LD1Z+tGD9kNgsWsYuQnu5Da75TSF9XUpEmWI5VEjYedvrWmtq16+e4spc4j pWmtlrRNJ0RC52oU73SwYsa5UoQq+QbyotmlLWGiZJDNZoUSQnSL0wY8WD4ziU6nabQ6 yiYw== X-Forwarded-Encrypted: i=1; AL+hErHMSLCcsBvZ2mlb7mgYbrg2ysQS5Fl87t9sexGK3XhAp88gG1VdOgo9mOMn5KhRaisHtrp1r7ZdRhu9ANc=@vger.kernel.org X-Gm-Message-State: APuU4Z8q2bFMOiUBJpfzrupKf+sZYS/r5C3Ua+70uJZLfm92uLy6641w 22wn7ldYc+EylFMjsMUtYWHxztlCru3F3NeqDrl4/UhHW8QLGb9Wt/BT X-Gm-Gg: AZFdTZesoHmZvcoY8FVI905qo5di/ejjzaov8OfK/FLmbLyozRBtsDFlgVDwdkLwkDz EXAz4fby1y+XUyiY/Ulq0p3IpPwPEsOEg9CL7M5NGWZ1q6G5N2cbGomrqy2olw7yDbBYMRAN8ld cVrPWA6Dt/xgORKfEF4cfUm95CLiDC2dwAwG87ZpxJYAR2UiuoumkedxjUuvmns3TqViRdh/52B zUvgsSgpzb2dW087ma+IobTwuuy7aVn60WQLSTahMqn3rqO6lg41AUtNEdcga1FasRv/GJq4tCZ A/beOpRRAYMS3XrpAU6QaHL84lPGDn/c9zG9+minLwL1RAefEqOPMtlzs0vtdsrx6VpASID5AkG eFRfv/7hqQPUMMqDaqB8gHo2L0VV5G8samH/6uJPWia6070esFKcpWqStfM4EoOs9fBM1YHKCsW H7bYxjywUjH2eRjiplv1Zb8gbvUxlwfuYP4YcxCVfViBnFi1PRcy1gMoSSR5dUmjKF42+ezVene pTeu7jtc9Njvx/ShewKASBLb50JIhMmfTMWlCpSVzEKYay4sYv4B6pJqPs9UE1dbwAG4oiphFZr ZkdeD41DNvKNBMrbVUZlieJCWuxVGtU1Oluy/chBFY0iPVH3k/Nk7MfwNzs7wtK9D5UHIrleGez jWEqCMliADJ1knRgFJiupRyBppSI/Lw2VMefe8b/D5wQf08ynEpSbfcrDXtaN2zE6sLIbStu4sa rBIoY87S/41kithwBYkQ7ueLzUyTYZyNv8+FcudGVTrJ/eFfLoRFAzZDVjcfx/IdwNQ3plyz3El MTyLqRMPEwQXxz9f+g= 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-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 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