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=JlCUzhkn6J4P5spRD4yVtT4lsXVvABgFtFvaakcY19dKUVnyrsoBea2EcRM4gObPd0QT sGfxgLvM+CWbTPmUfIECHR3yoKdx+a/ywwgmBTpOqbi5eO7sX+5HZcNtAEFUkNru6m+vT bvIUL1BRo87mUzUASQKzmkN+r/Ldo0wp/SXkkWK7tqE/ZtHI7fwV0slDBuyB2tyywXa/J bndfVFOHipK8bgM96eRmpzsWa987esuGna/8o3x058mi4oCCtyo6yHId8nPm/kRj+kcVd C6uEAb2xsNZaOtckcep32aOLVBbiHmr0hSNKF0ohyKwur2e9hVLJdbkemSPpqSzFf/w== 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=b3ERUz3qbpVeZ4lvp/euKYhhQDHrE9BD5PCUw+zCO0WBGTF2kCzDIan+Bft41y4PPgtN XYJDbeIq3DGb8kngmUF4y7x0EMFRg8RLleKSJckXZf74ar6dikAp9dPzWOUL3mZ1UbLCw 3ez/6UY/xAUvb46toGYaIaVrcPsyIQc05mSKcL4dHw4/u+YfqQugtt2luV5mea2m7GEu6 diXTZETq3OhWT4ZseL6dRea9BaC0Hbz8I2OBzm3MPWE9I9uKDIEAOHu7Inb7pJmpVMo9A 1XLkPXJc5RVB17yu+b4LcgnmUBf2V7bC/WJhyCisptTMlnIssBvX0232EUosjC9wAVA== 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.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 E5A6E606A322 for ; Tue, 1 Dec 2026 18:27:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E5A6E606A322 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-f45.google.com with SMTP id ffacd0b85a97d-48e20ed3b9dso10831080f8f.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=yiQdT0p+u1PX6yVmdcUgwzwZ0A35T1boCbz5ONbJ28zUnSfPZrdDcFCDgSZVit1DnH mV2Pkc2mlKeASJ1CePuqcVFucVCU7jBD0lB2c+016cf8nNbhWSH3A88pmyZmdWAqtNcl g8fE6bKkYfKUZ4Ue3YzeYOvUTk+/Ol5Z08SvN54WMHdK03K/x5d7jTdCSav90G9DAiLF XsKZHOXPJRsQIG0BMylNqSeZC28FcpAaYM+QFnDHv2Q1kOHcWJDleRsKRDAfgIpOUqBl 2V4IYAQ2MYeepiwaWw4bk0uWqZLJWOoAI8WSwJzBW+GX0tqt8/u6MgJ4BKTXl91EQ1tN xb4w== X-Forwarded-Encrypted: i=1; AL+hErHyQCD1CugUOxj83/bkdenryd43lmDaTZWtYAYFbkisOauux1n/3s6KCzVM6AWst6eG/3V4i8aXZ8dM/II=@vger.kernel.org X-Gm-Message-State: APuU4Z/ekLwafnKnLC/R7INlZStg3hoFivoGlfhgZNkr4iqHZnDy0sV5 BB2mEN3lr1+Kubti8AHq9Jdb+8RjnAHwBsV4u5XbQm2V1t9kD3u5tqdu X-Gm-Gg: AZFdTZcfAeY5TwMyh0f8nEcSdsgactUV2N/XxpkfTJah7NQkUHxVkbtp/zG8hp4wCdd UgmSkxNAB1Ln/eVnw7KzjUnKJ9MjUdwvC56sJ+TRlj3Zxlg/mkZXKEN2HgckeH3Rfvgs8AJF6TW GKJLlDny/GG8ZO3p4s0lNUSnvAYJ+BWYiJo244IPbfyPHHXI/YUY4w4Qa5e/F10QO9VhEAqpHhT Gh8ho+paVaQih4xXWQ0BIY9cwJPUnKG12tARMl3/dAY9d95wTS0+DJjnhYnlID4gnKD9LoUomYH EU5tJvfq0g3glPPTj687G7z4bOoafg1QM/XnqyexqCs0SO7QqKdPflTO9h6kL8WjxQrf6IjKOHB W6jWRxcqEe8712wuPTqW2mw4kP0TLEjbsywhXu6Sw7W9VSIkED36ipyDdYsa6j3//vGkRMFEyDB Dk0lj/QMAC/JjWyxKBkB/Rq42kWUQVNrVD9K/YkF2wJ3bJgpkpTty2HITq5aAgCfXsmWkErpbgD ZK6afwbRAg6vgamN0TB5AxLmdCcgcFYvziAPUK+5gR+1HGBdYwhsWGkkNz27C7N0/QDdOqgcIp/ jYhvGbuW/c2gnT6hlqGVEQPhyIBxR0ugXmzj9ewZ3GdDpxNpA6tih3qX8XNnwWUqLDrxk3eA2qz 9JmBs2P7T4gDREzmPX2TXJDJpimzcVVmT8TpgnwCu+t/ro4NBAb/og1hm7ViqE1cVfGfeC0/1cw 4l9Pxw/ZmQfGLvVxzSYOyc//OEkudNwNrqBnn84tv/FUdv3kZfAnrgm1dxVFwGpcdwVoESqLtiQ z1mdNt2bcZzv18RDMA= 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-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, 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