From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796149653; b=RM6DU36/mVPERmkMmI/Gr985L/y1IRJsKLHYTDxC584wBATZKbghhmqeZ/VqTCI9Q4jV s4f+UMG/GoISHmxNeOlRPsM4pKIYMC5PLftjarCi5ee3+dC5NQ8eeQ6I6McxegoC978h1 eBhyUwl0RXWZt1mQVWu8Mne9HxhhHpcz0PMABHWv14F1BvuWnsHhsM1MB1oC2kyMsbyGt QIyFL59pirgtolw3zcjw2rWXC+ktpHxImlpbMWHsTVVLe1MuTAdgA7smInoOTQ+GLknBw i06lrihjgSc/5sTElDZvhayWg+Lb1ueGWae+drjRSon9KwVrvXOGMLAwNdYowAL0EXw== 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=Op2YoiG1m1h7mJ7UNMhTzUi+bLY7rIFpY4504ngrb8NqYLKMYCDVhfGaHsubjc6MUtc0 WX4+d44wHVog8ABbXGTK2oV7F/iquLN+PVWLy93Z4WY3r9WeAA3T/R1/qF9oiRI11ZHQd fQu9mVoRHTFpUcD7ShIBK2HlVlYRm60k17QBPMju09K4f7uYmuDCo4FAIEwQV4Emmklv9 amCTSLYnRHn9Cdx34u9lADMmg634L3KrPO+ZogvK+vOusoElDQpctIuOhx0IuwKaoRzG+ QKlAPKRpaZaGeJJO4V6ufJOoB4XDiSkmIas9se0FKeRFoaKjXgAQDvjrZlzyRg5rLXQ== 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=NzADgLU6; arc=none smtp.remote-ip=209.85.221.44 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 E59B7606A320 for ; Tue, 1 Dec 2026 18:27:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E59B7606A320 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=NzADgLU6 Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-48e20ed3b9dso10831081f8f.2 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=vger.kernel.org; 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=NzADgLU6kJTII+Ip18twKs9nZtLMRPBBoBaVAg12pcj6qVMNoZEw+EUJGdA+JHdJeB 6JOlY2lLI0OoRWuB2VlJkT+jbm8gqmb10LNPRKvLD0YeSjZSHrhunDQTRX6BjU1xg7Qy GulJAITcnYUOwRCU+rcqXuRVi83BPFnIj/l5moY4GcwcxH9LT5qz80HbfMxjem30gmah b32rAt7dqaH4ZbYCU59cJqazgiIrMlXVVkomLW+OCnw0i0kTDesxuf1H14xYf1G9Eio9 dn+pszZZyg3xr3isbIetYNdS8ToKhrvTxA/cfCUwSkyPlrFZzEBVoq6cH6yZRiM0wwwH Qi6Q== 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=MElA8KDt/1NwbZ8If40m2finjnUePaXVatPiTUuM53mrIk7u5itEdCxjStJh0PYQuh zVgVd7MwsflZItRte8CywvXBJ7hxIaGd0dphOr/sDnVOXsim4k8pGM71t08Aq6pjl0Ss YXtPECOVvwwV5CGVZda6ewz55AJLXiIn5LVT9Hk4hEacJ13gsKXD2pkd5QgJcESaKZ02 ra7DJqGvZN+gk2ye2ekIUpmP6O8UpYPSinydN4RjHSd3g/UQZOR/NtK9Oo5rq3lLyCn7 ZN/kV+8eDnOEHgdEa+L3J/9QGITaV6YpXboTm14Ra3NwdkG9Vej8ycZf9Y4loIxbedKs 9zWQ== X-Forwarded-Encrypted: i=1; AL+hErEe6pTifFEyx3zkL398Y8aWM2yWMV4kB6lSShMlMztRnkNk+/X/PhDNdonBToG2/HZz0opnSnIoBQjbgQ==@vger.kernel.org X-Gm-Message-State: APuU4Z8dwhaJJ29jOp++Bn1OdeA3itJmEVZUrQ+V41nDPfq0bhLyhiKA 2IS5RKJ3na+p0E/+WtIDuVldk6yQ5U3FDMLzmgVMxpv306ruL4UFhTdF X-Gm-Gg: AZFdTZfiPGroHFZn1TCMbu11Y8/JffNHfCY9NyKf3IzwqUrtvdNMlgj+b2IsyTHe0Fm gcRoOZmfWwbnI0JteuDZORcaRf/2ZU4lDbgQAtdDukmFWGDoRnV6gtYqor1geI2ydQk3Lcjix1q N5MAF1VO3mSswO9rvJov4PZETn+om4UwMdJTNMnRPaFhXukiAPtN6BgfSltWK9DUmuQ8BP1aD30 8GTdAPIBJzv7+r3Y11duE5zLmY6qHkfKfVT3acdcWIH6c5aSKdalLTaNfJlwveQezS+2Yr6GjnC yY+U9HAzuYvynv8BcWNiv+mDK2A9R+Scl0kBI5ox0De+SQbjDe+Yng8xfyy4hsnYvFnS+E1LMAV wphITu1DrbmHGJ9rKy3GJRoEltCgk4YFj+dk9oYH1KUpr15h1NwDofPA3pehoyHwPY5FK942Q/n z7gJhu+r7SNYatFKgONKmqQZY5Rc+OQYC+2tm+7UsjVfsggU79StlUhKxYGzjM0NpIN3NHX2L5J S17mgEzKJ4u800PEJgll5HkW7AVOWkzYAJOyhRQ8Qkw3VywrHIqeUS79PHwlXwNXODkU75ytc8c f/IcmRhQU91v5APYt1Wecd8hRTCpLUNs13d8axZ0eynmbrgiW3s6pcnOubM5UPl6prKc8baYdgy AWFGPmUMjODCM0ZbY31pURwuWdrj0UPl2Pkslb91gqDLqqoKIyezEUAqrabyOhWgN3MGQZx2vNB p97RvnuCU4ory3MVjaFKj7UI3IfsgS7yfo38LqImPBEpmIPVSOprKx0y/KIF6U+dA3JQOOKxsVR AFJrlOPgXeXv0Ozdkw= 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: 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, 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