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=1796305749; b=W73JCn6lCietNpagL/51UZTKGP1r2OUqCre0UJt/b/90wu9POscHsTyJ3Gf0ZhXlapzm +nCUSuR/FscGejOC6ZQi1ueWRsGj+MceYGBk2Ss/Db7EwBcS15TCQVSc7FVHRlshDFDzH pMEBkOaQmKj8wTA0sQb6KOYRUK3nX7NMas+kABx+0rlchYgRIdglAgQcbA/Ah2M/UtwRy RVsZR21P8I2TgW5A0fJIbiCmd9zcea2ICwryYh5d42uPXjMPS9o/v7HETe6fUV2riSQ5I JxnucyJE1xpccrEo9muJwNqDJ3PUC7hnAOsO33tmkDUCqzyJHh9ig/kcUmUu/aduVOw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796305749; 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=HCnEJnrTLpUWECXrteeVQOh9lndDRX0SE5dbC4UmpEk=; b=nlonORNf2bRcTPw56gFJSLkyAMBFl62Ego7Ov3zZ5L1VDtAlnATCRWNF2zXWyHiaOBuG leG2beFKsHAP49Zz+nLu4JVH2uvjwVQaRETNDi2AheqUCRMBmTAMUvY3azghZikIIPMsG vfo8vMs/vw8J8HrqomOtz3W5+CwTfMNGmmB12do/IhKyd1uZSCby1XDXwhDvTLjnU/6JD H50ufiJ9nx2I13jr5DbmC8QmfS4KAuv//Vzu0QgnVd+LpzD/5Wbm0p6AFQ6Gp1RWBVCxo 7Zs/HaJmOlPazz4LylCJsdtpPZMKf0YTcT/GDe0YOLhApJnbPkapZniEbr3YrXPBffg== 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=DD3HKyk7; 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 D0BE9606A688 for ; Thu, 3 Dec 2026 13:49:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D0BE9606A688 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=DD3HKyk7 Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-48e3b22e971so7378885f8f.0 for ; Thu, 03 Dec 2026 05:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796305747; x=1796910547; darn=lists.linux.dev; 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=HCnEJnrTLpUWECXrteeVQOh9lndDRX0SE5dbC4UmpEk=; b=DD3HKyk7wvu3NN3D9CYkSl+GLR3q5x1aQPf4CJvk/G4Lx9NsHgkRndLFuFqnk0IN/F zJiANo/7qD7/htUXidL/OeFVDDTREAv5WEeAQxBSeHTAsBXuXs2e3jva/FRuhNzVd6Vc JzcZy+L0YNYad/y7YLbvgGXdMhUYFalEwrWY3NCOki3GDf2W44WcRKp4vU+RmjROye00 EHEDxEn1da3497/MLJYd47OzxyWzOaqfoAX4MUhpFZyR7ETMM+hD8zPXXDBUDxBPy916 qZUdNOlM+lkIB8FMy9j3E4rSs8ggIkdH7ylMZ5w+cTWEes7O8xaQ7KpkYd3JiTXkDi/9 2lVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796305747; x=1796910547; 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=HCnEJnrTLpUWECXrteeVQOh9lndDRX0SE5dbC4UmpEk=; b=NMulmMTsCHUGrI6b8A8j7NmDioK9NC32IJVYOQXwnyMCVdf/FCfflqT7miZTTxJlp5 HCargaQ64Yt6lvZvI9oDfDw0fF/dX7Pxzjv1IRsrhxiwY5T5WpOpTVm/R2C60lPb/XGX Ou9hLo+i2obByjo+FsjAebZHyp19BUywtxF6XUQGvCGOJPOUBQ/1rGPJeIRwnoD4NH/2 uwt5TbTbltrrIxUnwJKFEIQ//c+Rdzzo9MVLCd47Xv20VZmvmeczRkmPStEDNxEDAKbE /R0B2j0u59LxXbnb5h/ol+OyTddd0OA/g+98w45pskLZiAy27Fy7OpFR1d98p8759uMT MRhw== X-Forwarded-Encrypted: i=1; AL+hErEj7zt0o/w+b/AJZociDZ4+euRFWH0Vko28Ggnuvk7GLYwbQcZEzCxbZqpDTZBH1HKkzDrZBcpJEJ+zbg==@lists.linux.dev X-Gm-Message-State: APuU4Z/yv+nP19v+J4JLRQYoNH1g2VQtEVTE3k3U1erH3c6j0xwYWoo8 BK8xinmUzonERuoXWay9FUftF3NX8Dt91KfInbfbnfVREfBH9eLB1AXq X-Gm-Gg: AZFdTZfUlRrsAqdhWfAPnMRKx3XPq1KXTGAp6MVFpCf805Ca8WR0ba4NT9byqTldvrX 00OoAYfj4uDjFUSO/vw7UcryZMPSMtzW7i7RIXBtIsoYPgqFA/AFaWV4Trjbpi7tzQRxnRC0L9p xRLiPbhOQIx4GoRceEg1L6fQtRygRsMnysww1TXYr2DPsAroiXfvq5Nfzh1r7Fd/xfAD8p3cRLA Mn5f0UR0acx6Pr8wBfDTmZ3dS2LKcVQ31bOqvJENTud9ExQCP1tWskcbQKWatsNQSZ9AWeQetWH 46PXxomQiwe+lsDUmXGSUQlRAj0j6AExN/d7gV+XqrQY2IN8nzwdZcTkNVCuBSTU0OEld8yliQ+ 96ZaCjadZlcIoJr4hsVY/1+5zr/N6fc5M2JgbM4r2PjG6hIyjYgUasKcU6onFqlXiRLaUahoqYx XW2hw01Es4G+1HVtM3sXZ7MvPXhi+smp3GVfjozBu4bhulcHPgXpYRusz9DwAI/aIFlzXuLuKAe DLkQRbmZ/0RhpVFoNntnelgJKtOKM82prLwhSti+cBg4JQ38wELVsl/7KP8nugfYq/QkL1q9wcr GFv3RvCIkfoBIG6/OnlvCxOWck5Xlnc+flbkyactU2JUaVNdl/tnP0TK+zdKgQIuctybU2YmHCO L3bJf3T6n3aUPNRNOEtJwEnUV4MRa+QOQE6lKSfckl4AkCYKtel7tvDH+qxxeDWBaDBkVK5J6g/ OzqnSb5053TjCaLpl4nr3JRLqAUOme3tr8gFcVOu+xU1hHN1CKT2qz5xjro9E6TEqAg7+s+T4AR /jjTB06iWAe1FrMdthtP5ooMgwSY/x5Y5zLMjBA X-Received: by 2002:a05:6000:2406:b0:4af:e519:ccd1 with SMTP id ffacd0b85a97d-4afe519ced4mr82547607f8f.49.1796305746906; Thu, 03 Dec 2026 05:49:06 -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 ffacd0b85a97d-4ab658e2d1bsm86640669f8f.8.2026.12.03.05.49.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 05:49:06 -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 v2] ASoC: tas2783-sdw: restore the stereo split when no SDCA function data Date: Thu, 3 Dec 2026 13:48:57 +0000 Message-ID: <20261203134857.11614-1-leepaulmann@gmail.com> X-Mailer: git-send-email 2.56.1 X-Mailing-List: regressions@lists.linux.dev 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 and the link has one amp per channel, give each amp a single channel from its machine-assigned prefix, as before f42fbd560cd8, and set ch_count to match the mask. 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. 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 --- v2: - 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). On AMD it only sizes the port slot reservation (offsets come from the mask); the generic allocator used by Intel doesn't read it. Baojun, could you check v2 on your two-amp boards? I expect them to log "Found Smart Amp function", in which case nothing changes there. v1: https://lore.kernel.org/all/?q=s%3A%22restore+the+stereo+split%22 AI note: written with Claude Code; I reviewed, built and tested it. sound/soc/codecs/tas2783-sdw.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c index 3f21700..76280f6 100644 --- a/sound/soc/codecs/tas2783-sdw.c +++ b/sound/soc/codecs/tas2783-sdw.c @@ -995,6 +995,30 @@ 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, so with the full + * mask from snd_sdw_params_to_config() the pair renders one channel. + * With one amp per channel, give each amp its own channel, keyed off + * the machine-assigned prefix (tas2783-1 left, tas2783-2 right). + * Links with more amps than channels keep the full mask, as do + * platforms where the init table selects the channel. + */ + 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