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=LN/V2fHZKAKVfhdO4jVnxPexEokA/2Seio3RnS63pqCpeCm0ZQ8oPtSFE+tSi+ou0SDr lMRAjhRXQ2bolknDbE3r8GbtgBLL8uLMGNiWcJLjk/uxHZD5TG9B+qiqqnmNPnv5lyVWH lgwQ4zN6FTA+3Co/0kSBBJ/P+4z6WsTH+UiOGyC6ZHIwmnm42EhFvGIvMGoB0Nzpy2Hhq k9x5orDLjTddtFZNNP2Wgti/LcYUN0s2E2wm3Ds8TFK1eOnfwEY0JbxuCSpJEFx5LC7u+ 1YVqq/ehwwjGvsFHRnG+iEYyIiF9u3YqWpcRO3yXw0TX4wY41bM3kXZ+LqKHPv0K4iw== 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=ec7xz7KjriQgUQIWZJXMSjs7P58Lj98OtVazoynPdifaaCXz6eordTYpUnvLDd7jmjeJ WaJZkEmarvAWwkOnIZAmJMHoP7LpXhma5INNDfrTPCGBo7EQ/ZEEc/miBt/xHX9NJHCZl 0mEUnvzUUTdAQp2LAUR0dHnk4V9ccrZUy4OJjmM5BGbMXPmfRw49BI6ELjFlQ1a2F+lt1 O/WlEQU+X5n8HzO/h8swBfy8PxYtMD6rgqPYNItog6hHKZZTieCLCqzYysN2ls2OK8VDK cmiQIPPRXu+hhxLgTqPCiBwCBBZMfrddt5j0fA9RyFeeQLnVEyYDMdD2IC0MqOStHbg== 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.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 D0BB8606A687 for ; Thu, 3 Dec 2026 13:49:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D0BB8606A687 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-f47.google.com with SMTP id ffacd0b85a97d-491f34b4e0fso6398504f8f.2 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=mr9P+65rbfo6gGJbKc8F6iBB22jLunQFWPcwZKCR4Nk1j16Ej7+oLmBFTCzDj/+YPi 28NQC2yMIIeQqITvvtX7rlfjl0I2YHUBpfHiHl41EhwbPJcNgQ3E7y86Ydp+jkeNxtGG ouNLtQj3/rkgO3cI7Ow4jlPOrJ07Fmwoch1bphNQtDkUPPsdJ8r0t1pPKtveEtv32Nr0 ncBNRqLVtKT8bV2W1u95XZ++kV76XhcbCfzZ+d6bDU7FT9cusm5azN8xsd1k9mj7P26U ZixL3oc9gXMJiIWpzkhlZ+RJXpW2a+eZemkZwyJxhyzlx8LPLi6LwKq/tYKi/wCE4kj/ dlDw== X-Forwarded-Encrypted: i=1; AL+hErHV1Tk88sMWu/GWO8d4Ic/JEJSd081bx/ioQ5EWhKsbsihZZN3aQMb65buLPr9xBJCh2FUrh4KMg7JIRWk=@vger.kernel.org X-Gm-Message-State: APuU4Z9DQ1JuPsxPAv+HS36QinNtch+Gtz+rahLJaDMhKVEwFQPH/HpA Yg5uyf9tPqGwLyaK/DD/UBB2zekdsllDuzZr/jFPUOrnT+O5A/pwtkkq X-Gm-Gg: AZFdTZcwMCeF56cdEbDpqeuhAUj8SUZlHYX6f8xNtbb+Ahpgc1gMbUCMtSRChN1CaxK PNZ3KkF7T7chsSkIZF9cdTniEP9vpYp+o+BO1cqJhBb3HgzWzyPV6fMfUNkKvkmzQfQ2PJ7PXTl st/S/vRJihhWu7LqIAxlBvu6VCmPQfJ0DRuPTGXTlSsBonLlcrmZXgc1yEeq9++rXgDgxPTmVxg qwFgyeU1OafQ33LPIXzMijKJHICoUipf9cqD03fMBeSnn5+xamSkUX/7DeRElzp5oy4oaaLiG6T iBc2ReUUWSxe/GU9kgscfGsB0pdJmZ0qHo3/8Wf5eBLkalr+ZRswL4RJ55Mq8Uhz1ajNcC8ua0M 8Xa+B8J/jh2hK6VV5lBLMsPFPwoP48Yx0h6xtj7CiT0EkRA1Fcl3GnXXAm1rdhJtUWBAc7S8ARd iVbgIEKLYxZ6Rv2yA+8VsTgTpV+ZTo9OdaF1+TuBgkFdhSyivXmnXyte4NotsU7WvjJlWQsvwXA N1se+sRbcHWK+VmW4/JlEwPQSh/zujcTcCbg77TkPhoruZaL1XkvL+d6DcE0tiVGyqE+gHwJyTg JbCRqceWYdZ//fj+GoVoiGR02ZG7KE05bFUDs0GZZ3zmadBe9raXx7ydYTOQ4AsnrYdVQi8vUJv KiwM+5QeZDmiL4EdnY159Yi/nMafavgzlEwstb2/AMiTCCBig1WEUJc3KXFT64SZKI/KwMh7Qpf R6wCTXba65K+iDOazzf/bNLzdpHhejdFyPIAoVaSoZ05XRu1TsilEfer5Skpk8+QJHKnMT1TZ0W DTiklNcf1OWyyP2RkvN4Z9Rs/DRdkts9Dj1oMfv 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-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 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