From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.48 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796305749; b=DfmZkmyFcdqbFNUG/YOMKRUahxMrxeuBYrNuveFcXES98tsgwPPQ2kADU7QtiTAK//1M 8ONscV3aERYtIinCP8ncxj0sl/riIjHlQQ1QfIUatmqktIetwHS2xgJ5k1tBdxgvOmt7D aCYtBJKfawJHiR9jcA8ZcWihv0ojTRcOI5BKENEWxC3Ox4WQC9mHP7qctW3HRIQPB3mSB w+K/dS8tCEIS25upOTYoQCcHWTYq/43E4ziSkXXxIaIHE2Ab3+agI+M0t0ImouteWe3BP HkqFg5ZoWXk2oMPEBKRU1FibSAu7Kq4qRx2ijT8R9ymmppxgzP4RhumbbQQOUmwzdWg== 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=Ryj5HZ5GTIu1RW/IIaZ5+rIZb68OH8/GkWKk64M8HggpPH6AABaoeqQb1J+N3tFUPv0H zNQiiZhF/rM66ER6wKbC0L2rZwy57yBerOjeb7K9aKHghiTP2Orgdt3FJiZaRF2pkfanG 1PrNP6p2P8E/zh+LkIovxhzCaEyPBKW4GKb78A4gWiv8y/mI0krUZraOgU58dk/GZTFgC BkTN/xILlW3ljss9JPbyR/a4rebMWDoovSJZG0Fix87BGiRxcFWE7plwcFzOAOYVOCfDH 2/e5l5S47S6is1XlC7Qt7aPlMleU8CR+lpHj2ntmObl5aN21B8Dii2wmL/Sey33Vy3Q== 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=jm9O9U6V; arc=none smtp.remote-ip=209.85.221.48 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 CD6ED606A681 for ; Thu, 3 Dec 2026 13:49:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CD6ED606A681 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=jm9O9U6V Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-4a357b1c649so8118274f8f.3 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=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=HCnEJnrTLpUWECXrteeVQOh9lndDRX0SE5dbC4UmpEk=; b=jm9O9U6VTatsVAkJiI+WbB70lzPEv6/o6rksbpNnZR4zZpo8Zan1tWiKqjPzDBnUE2 FS2oHmKbabcey3mCEUbxYG1CqhJQEJ/BUNc4W0hoyCk/MFaUnBtQprZfw1ul4KO/Esa+ BeRVzLkU6Yo85pXtBGDa9arZl028fU/jOnAFtDPcTk20sU8rW+HbWs9OlOhXXrnK0WEf P18Lh38V715BmCSXADNMOPJYMXGbCmmdW4UcOZpQVit0w5gstnSrM93ijm6VKNHXR5Uq +N9etZh0oxo0GvZycdpWOPWih7/GJbj0Fqe9ICBsT3QqBjUC2rkrsGVhnghjeHzpZmAb 27tg== 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=FCXt0LnJ81NNaXNldApm+1CP+x/KTQDMrOxMHn9Syh4qxpFwrrA7W+7btjv/rIU0bs 6tI4ugd43aEDRSPs6Hv4eFWH1iiZrJcv2T3iLzKgPIQVAJ36WgGQ+gekWh2uX2mbmc4D c7Eqlgn7l3p+M3mPwVaYTwzemxoPQp878j7lTFE9hGv8FFEAJeVLfWb4xxOIZQpVUkzy JBrj2W7+gX1EVY5I1vb3coGqOaqtK9I+Lwq4Qhujyjjase949/eoKIpmwuMtvsMIs4pN di5CCjBl2eVKlrtQTHBRCM9TdEm8cwOJciSRsWHjgq6C9phM0E4zBfYQAn6RWsEs4jqO FLaQ== X-Forwarded-Encrypted: i=1; AL+hErG8ohQWVtvhqna0Vj5RlyVbZ0DYWhW7VRSoziAm0mvZDUoURy599Zz9IGq14zUe3vhE62gVDKhAD5inRA==@vger.kernel.org X-Gm-Message-State: APuU4Z8dLlUgbUGIIdtUhY/hTZQz5SHrQFBSeCpavbiSSDG8cjmKgSad VE+iYPcCEs05xAnY+irwDOraHLE0lgPc9ZV1MD9IycfcVsh07QVMgr+n X-Gm-Gg: AZFdTZdUl8y+5ZbmIL4dTuPoE44/UdU0QWpGB9j/R7Yc870Nc1fwTQ8dL47jS1LcqLK ApULF/ptrw1xqaEB80H+8DRK7LwH8/Yv7CVFkt++fwJiQZfKSmWSL5dBFJQs8oLJXShsgXuVdW+ qqx6+ovsUq8TScWLvO5Rp+P1+I0yA0Kdl0ZIfRwdFfaioqV9RBethAMej9cWoop+ao3hmfAtYSl maZAfeZ/Y/bh7xQqsvv9BainoEv11nGLhaoLIVfptAJcUnu4Vb/QoL7ESYfhXKnubIvg72fWg7H fMbQLDvpAvuYhtzRD3SlQ958jHlTUW37MdE7itkFz5I1x+9xWq05M6INZTSikGKZAHo2pn3f6Sg h314hVd2ptHpemfoKcD7wkP8jHKgnDp4BhU3vlGJEji2pDxUhWQQNXeBDU8Bbk6erZVaph5gFR9 dmbbBKnQncrpRp9nBPpENa3yMYUVkP74BKubWG6VXlTb/1WK8SyPR58tXFd2EGK7jMdRQhaX8QR DdFOaVVBzUk/SPWBWRIsHd8D5Udd0lImgFw1Aj5pjVdNB3//JeLqSRqUSKsL3dh4Cjd73Rji3yw h857eb43HKy9rZr+/DFDTTpGrtst8ySM3b3gSNmImOKwnBJahUz9gf40qdZdRJ2Bc3Bp3SujsEM l4yofMsytJHARCZxyR0IA8VAx0qdQP6enXjd7wtccCzhIc4Os+rNEH9cSwPiaXRy7QU89yg1wgj H/UqtZF7bKuCHeDE3a7PBvqio35sErkY0QdzL1wwN1ssvSADPz2UvX4/X+QOqPxzdEdI7mEDDq+ ZoAF+ksSgPqYSAn4bGhVcK7of4AuvQLRe+0d2WR 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: 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 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