From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796149653; b=sh6/ukXHpfd3SRLtZr9pBpGVvJOZtyimbkB9K+yKdWi/bf96PhTA41MBZdG/mFwxoraE bdENj9jZMyKqUmzZBSyinR//SLEWfr1e7+4FPl2XL1x9+DvtHxzPXKNRXwOCYhBxu0Zj1 +ZLf+a1loCT0RaqvT6I4MHoOMbtgRW8bQnveSy/FibRaU1AGj9hwmm2ZJhmgRJpi7beHs yEwmOAUIsBQVILYnd0lfXBOyEjJM24hUhJbZ5G8S4/8UTNZiX94Agldyh0DcR7XDLmC6w uKqyv34lEJMw90hhtMGlUP/xdUMxN59BKGguuURidupzO7DbHmUstOpomnEca3s6l4Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796149653; 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:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=KqwWjhY2tfVIYXkDeSzK+8nZ8Kr7LDB0Se0TuCxm4Eg=; b=fMt2P/QkSlhdmOVIRT606dQgoN5IBOSoeklvuOTbBQEktdKvssTKW+Gj9rXsZioZtiaR eKBEYWIohaoj2+LRtVVEs4xsLoejvcMTRo1gXAUmSKCoiLd6rkl27SLmka0BF/AWAkpzR riRU6rXn5fheLmfDXcN2WUWhGicpH3k4Y5LnIWhrQKpde9d6cDjyljZxsuclzN5tkZorc aYtyPjBuqFCMpBQK1KOElhQiINDofknOm5EXBX2igEqM4W3npvPtzdyqbLhzYUrcgfETV K74mCD0bl8GN6tiFp+CVQy0m7vuttmKjJgmL20CDvE86N+m2A5+TbZot8zYk5/R6//A== 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=gBagf7Vk; arc=none smtp.remote-ip=209.85.221.45 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 E598A606A31A for ; Tue, 1 Dec 2026 18:27:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E598A606A31A 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=gBagf7Vk Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-4c4b8e58cfeso2009472f8f.3 for ; Tue, 01 Dec 2026 10:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796149651; x=1796754451; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=KqwWjhY2tfVIYXkDeSzK+8nZ8Kr7LDB0Se0TuCxm4Eg=; b=gBagf7Vkby26CdUULINS2QltH/F7AHrBSJ9Z9ihbPedYm5ef6IT5FEfPGLVY5g7EhW pSHekOKhBXfdHXyvJAC4zy9DlbYIVnvh8gRPQOPdTWxhh3CDeyWMMpooAJH2vH7lvnU1 22sKnaY5e1juH3fmBNjrtwSARzGos0KPIh+qRkAE5FybNP17eoFqH96W95EKyxiObW0+ 0F6UFmLncNENLLJQTjdHFhIQx/urdzYguPzweqdWT9yX1imMFWcNJZzltctZXfNeHUZd Xs58f9MLCvkv4lBdIGNrCkK7jvpanVsN0K3eVQ8QpOKuDh6kVafIf8GusVCazNKnGUud LrWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796149651; x=1796754451; h=content-transfer-encoding:mime-version:references:in-reply-to :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=KqwWjhY2tfVIYXkDeSzK+8nZ8Kr7LDB0Se0TuCxm4Eg=; b=GgHQOpWAhQT3PIfxxAo3U0wK8gULS/YmBjdZVw6R74QdxyykDDkUeUS2oMestGyWqT xhZ9SfL/zv0QVJD1KPzAmEV8wSdLjipU+GQsAd2ZgQvPvAfod0ifKqvgrllltQPXKP9a Y2e7Wc0jDDGV7u4urVRUgjTTaq5jeC6f8TojQL4YdkzPDhaUywjXgKr1oUZMd2KiGOqT XwEokDbzovhQopNBiYakqeJ/Mib4PEpzdTtfvrpU/nvhp8Vx8+ViufT+tHs4FabC+Bv9 G/nWwkxgtifOxAw8YpyDvSO6Ty9LNbtk7G50VTgVXeHv0txXGptno8lu0H1beOZE5bPr x+RA== X-Forwarded-Encrypted: i=1; AL+hErGW7AXQ7uimmrGRZhK1BJEw+Ccsm7CX3R60lk8nHWPrYy9ESt4y3ewHFRJW7g7eH3Cq62OeLDrhCCE0xg==@lists.linux.dev X-Gm-Message-State: APuU4Z/VCyYjf0GdEnbiUwcfe8BoAeJRb0AI23PDYyEcv57VM+p5Lvz0 MjvDfwzc17ovLq1b3UDXWPpgYcD8eY6QGnYVZDOoVhBGHcbmCzx1wMro X-Gm-Gg: AZFdTZcxFZ16NRQfZnk0pl8AdW+GJdqCXnqzliIkqgOWKBB4oi8EGUSyeBXTtJqygdQ kBi6Jroip/SRKjUG1OPFSkDXAGjPVlrhMt/3IWghVYCA6DeosBuH5ilCmdItwQSxkAkmwrFT8zi lQyjJFOegRRrX6gOHE7D/vEZDKGoc3Ta2X8NKg+roWe/1a7TK4B0qadYmc2CsOGO5HNDpFeLZks 7QKs87+WdIU4YMhU04eJx73IBuMvKiTNUPGH5cUqi+9qvV/r9KL6jKBncpnHTkGFfrcDtOpCXct PEbaG0ILGP8z1qHEKqrm4I4AwRlC5hLKmxm1rLTB5fncpQ0Sy8utjp1n1fLcAl5n0mCsAuDXpri krq0fzpUl8E52gXST9QPwnXU9JVMoDN5XngWtkpTC9j+KSR5anrUkTyatWYebTWvHeNY8s25JDA F/ue+xLjclR733u7Nv7HrwfiuF4OguCpyXm/mNPvlJyScRjqW5J8Y8qwqcUuP7hJFuuUJ06kx3p zgP/OEwpxbLTB0IjFSmeB3ck5im5ZD8IF7DId5xu5LCNvkfV7JpP04omgtg9EoMhM9w7TsHBtwK wKc1dwY/9PNc3KdOG8GiuKxJNbcIwYcNjMGhIzanaDecUhmI4UK4wn0Vlv4Nshj+wDYK0yysINA 0pwxtDq5122G/CsG0tFBBoOqJ9JomO2Gys5WDTb7ebMpXMNdXDZhoPgNeuTf4GKrG/ue4mQfkWz /dgMmr5sdKTR02McllI2v0MQZ1JsssdV/U+eZOPqeGmokNbQI0MF1O6+fIwmVqBwOY1sM/2n+z1 +4PusZSuQscT0Vxkls= X-Received: by 2002:a05:6000:26ca:b0:4a6:4687:2ce9 with SMTP id ffacd0b85a97d-4abad5ac73dmr73641502f8f.4.1796149651041; Tue, 01 Dec 2026 10:27:31 -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-4ab69bf680fsm82893145f8f.14.2026.12.01.10.27.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 10:27:30 -0800 (PST) From: Lee Mann To: Mark Brown , Liam Girdwood , linux-sound@vger.kernel.org Cc: Baojun Xu , Shenghao Ding , Niranjan H Y , Thorsten Leemhuis , regressions@lists.linux.dev, Antoine Monnet , Andrey Golovko , Pierre-Louis Bossart , Matthew Schwartz , linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: tas2783-sdw: restore the stereo split when no SDCA function data Date: Tue, 1 Dec 2026 18:27:12 +0000 Message-ID: <20261201182712.11948-1-leepaulmann@gmail.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <3a7685b52ad14928828ff36f717b9440@ti.com> References: <3a7685b52ad14928828ff36f717b9440@ti.com> 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, give each amp a single channel from its machine-assigned prefix, as before f42fbd560cd8. When the function data is present, keep the full mask and let the init table select the channel, so platforms that parse the table are unchanged. Tested on the PX13 on v7.3.5 with the v7.4-rc5 driver plus this patch, speaker-test -c2 -t wav: stock ACPI (function not parsed, split path): left and right correct SDCA function parsed (via the out-of-tree fallback from SOF PR #5904, init table applied, full mask): 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 --- Baojun, your boards parse the SmartAmp function, so the init table selects the channel and the split broke them. The PX13 ACPI does not ("function type only supported as DisCo constant"), so without the split nothing selects the right channel. A plain revert would break your boards again; this keeps the split only for the unparsed case. I can send the PX13 ACPI tables if still useful. AI note: written with Claude Code; I reviewed, built and tested it. sound/soc/codecs/tas2783-sdw.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c index 3f21700..45b45cb 100644 --- a/sound/soc/codecs/tas2783-sdw.c +++ b/sound/soc/codecs/tas2783-sdw.c @@ -995,6 +995,26 @@ 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. snd_sdw_params_to_config() + * hands every codec the full mask for playback, so the pair would render + * the same channel. In that case claim a single channel per amp, keyed + * off the machine-assigned prefix (soc_sdw_ti_amp.c names the amps + * tas2783-1..4). When the function data is present, the init table + * selects the channel and the full mask must be kept. + */ + if (!tas_dev->sa_func_data && + substream->stream == SNDRV_PCM_STREAM_PLAYBACK && + params_channels(params) == 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); + } + /* port 1 for playback */ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) port_config.num = 1; -- 2.56.0