From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FC71155A5D for ; Sun, 19 Jul 2026 00:53:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784422418; cv=none; b=Bd90YlGxbQ76e/90zjLvGwdF30Lfft3+yY5mDDhVxiXKxKtCgnXD3OU7/m9DEh6zdxoy4ROisyeigskQXpnv/U1mjOtLNTtTVbZDM8yfaXTm7VuxzoQdM7RWIQLj/c/2e+jf9zQFccBgFMJaULLdTq60c5EjzhK2IETUuAOz7qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784422418; c=relaxed/simple; bh=DRtESRSAX/QtMhn0NE8GkXeAQoxffdhhbHkq2Wf9yj4=; h=Message-ID:Date:MIME-Version:To:Cc:Subject:From:Content-Type; b=mTDEzK8EpREOf9sJ6PnRi1D2y22eDPWWdiBPVP+abl60ytmma2S8wkU3cX4+swdRZ3BYq2B7PdlPg7DS8lQTwOUh7wje8FFZJuwYsgsx8yBleRwGlWNXi1HYc1cO4rV7VccDj1k/5RYzC08DZ5ylDsm7fFLMlFlSm34kDb0eicU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b6WRhmUV; arc=none smtp.client-ip=209.85.128.49 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.b="b6WRhmUV" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-493f6de72faso18613785e9.0 for ; Sat, 18 Jul 2026 17:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784422416; x=1785027216; darn=vger.kernel.org; h=content-transfer-encoding:content-type:from:content-language :subject:cc:to:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=5Dh1soKEQySXKjgc6fGCPYB0LOrI9izAQteLhFhZz+U=; b=b6WRhmUVoiLdsrm1Ju8bh5bhI+TV17QkovPrGaX2abfJ0jytC7IbSdrc7R8eyBivjN R0q6ocImJ2PhgIMROB4oJBWy+tEtoRIxoR012nzjTVM9HY1aEWFsX6llrQ0aobzVhSGO ge0Vug0NCmrSELFalAqO+iLZVKlhVzRGcbGS5Vsdub3t3TcA2iBgN3qmlqju5LkZ+t5s H1xq5ZC55WpmdZOkE/lwey36Q5+OBRggOegnA7KH9pasbIHrJ+te3fA7dxBv0+ud4s49 hdDqVFHNWlJtHOFBdkXTarXP4RKNy8QX1HdrSFgP/xoSCHOzq/xoiTcl5680oY7fR/Yn Yzew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784422416; x=1785027216; h=content-transfer-encoding:content-type:from:content-language :subject:cc:to:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=5Dh1soKEQySXKjgc6fGCPYB0LOrI9izAQteLhFhZz+U=; b=mPBWTchESmEBjh41IJUEWYwDtR4W0urpiR6ilFauDB2SmuyKbsYkU+DdAKzlCd8S5n RJsOa9pHctoJj9bUAkQIxgYDvAPkzgrm+5HIjh0phA+OplGGjFMXBwwN8CJbEkW4dcSc ATEcJhmp2qKVW1ElL39nHACY3PQOKhk37KI15HWN0E5tyRkERhXf+sz0u3+t6Fi3UMQ+ xO2xZhFTJgjpYrWOsdGT/1DQZQ0ntPArsiUX1XIBk8dk6Brpt5st+uvYJYmzz6tSL2oj RqfvXPoYCYOwd7LFWFQ5p0jLjF4+qXPb4UftHabEA4WHTzcFcNX2NnxWvhzbUTRKnAML N1bQ== X-Forwarded-Encrypted: i=1; AHgh+Rr3/EVRyij87oYTOqIeFblDc8LTVkvkIcptA0MHTZCuWxGgRefFaPrKOrpmpKg2sc45hcm5fz02uAseFZ4=@vger.kernel.org X-Gm-Message-State: AOJu0YxjC8EQJMpcnwi3kY8e9fH1wKs+S6TNhUP0J7MLNjK45aO9v4Uw OuA7ErMK/Q20JW1dY1by2/xhi69k29F4PLgxP+ttD6Po+WapM2vFiNYd X-Gm-Gg: AfdE7ckkgU8NlCOoT/i2jsO34aXuo36YlhjZQmg8nFUdjJNzPwubZL8ZkM75iUwRcU3 CwE8IeMva7C94rRk+9JJVi0GCRlce0Z7wJdQKBp4x+EkQDXMTGg/STXbHraVMJMQjPz9YWLGnm4 R3l955dVK3+3bnLe6TSXvk9xsZV6rKtwb6U0DJcUqJJ8AQE6xBOTssCk1zAjHSrnD+MqyJRULQi aA0VOe8CdSbLMhRffLF+RnPlVJa4ykPAEggb2dRiRI1ghpN9OIkuoEtCn/PpR7hCEA9urWExNYZ iPAiWxPrG70s2Au1iakZhNiZjGT9ghehllG6ly2gGLzX7WlwPp/x1kToyETSXXJ5YOD6EfB2zK/ 4vwKuIkhZgLU9gJqaWiYlBgZ+P/RB9pE3moVrFGj7sNj5f4G8RITACmOfOohWKP6xVQWmyWaTEb 7//DhCSyrgvWHHgkBgwHo2vy1AYeZfgDMvdCnRQSW/KSuluCKvLuX/LA== X-Received: by 2002:a05:600c:e54a:20b0:495:4b40:88af with SMTP id 5b1f17b1804b1-4954b408964mr52683805e9.8.1784422415530; Sat, 18 Jul 2026 17:53:35 -0700 (PDT) Received: from ?IPV6:2a01:e0a:f07:9aa0:b05e:a34a:d47b:7849? ([2a01:e0a:f07:9aa0:b05e:a34a:d47b:7849]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4954a2a2504sm177093605e9.2.2026.07.18.17.53.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Jul 2026 17:53:35 -0700 (PDT) Message-ID: <29e8c08b-9475-4aba-bce0-6d4a45a26d3b@gmail.com> Date: Sun, 19 Jul 2026 02:53:34 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: linux-sound@vger.kernel.org Cc: Shenghao Ding , Kevin Lu , Baojun Xu , Mark Brown , Liam Girdwood , Vijendar Mukunda , Vinod Koul , Bard Liao , Pierre-Louis Bossart , linux-kernel@vger.kernel.org Subject: ASoC: tas2783-sdw: no stereo channel split for two mono amps -> mono output (AMD ACP SoundWire, ASUS ProArt PX13) Content-Language: en-US From: Antoine Monnet Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On an ASUS ProArt PX13 (HN7306) with two mono TAS2783 SoundWire smart-amps on a single AMD ACP SoundWire link, playback is effectively mono: only one amp produces sound and it plays the *left* channel out of the *right* speaker; the right channel and the other (left) speaker are silent. Both amps enumerate, load firmware, and stream without any error. Environment ----------- Machine : ASUS ProArt PX13, HN7306 (Ryzen AI Max, "Strix Halo") Distro : Debian 13 (trixie) Kernel : 7.0.13+deb13-amd64 (Debian 7.0.13-1~bpo13+1); code identical in 7.1.3 ACP : 0000:c4:00.5 [1022:15e2] rev 70, subsystem ASUSTeK [1043:1714], driver snd_pci_ps Amps : 2x TAS2783, SoundWire link 1, slaves 0x8 and 0xB (sdw:0:1:0102:0000:01:8, sdw:0:1:0102:0000:01:b) Note on the build: Debian ships sound/soc/codecs/tas2783-sdw.c but does not set CONFIG_SND_SOC_TAS2783_SDW, so this is the unmodified in-tree driver built as an out-of-tree module (DKMS). The relevant code is unchanged in current mainline (verified against 7.1.3). Analysis -------- In tas_sdw_hw_params() the driver does: snd_sdw_params_to_config(substream, params, &stream_config, &port_config); if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) port_config.num = 1; else port_config.num = 2; sdw_stream_add_slave(sdw_peripheral, &stream_config, &port_config, 1, sdw_stream); snd_sdw_params_to_config() sets port_config.ch_mask to cover all stream channels (0x3 for a 2-channel stream). This runs per-amp, so *both* mono amps are added to the stream with ch_mask = 0x3 and neither is told which channel to reproduce. There is no per-amp channel assignment anywhere in the driver (the only other ch_mask use is the port-prep write of whatever mask was handed in). The result on this board is mono out of a single amp. Diagnosis on the hardware (per-amp mute + isolated-channel tests) confirmed: only one amp (tas2783-2, the right speaker) outputs, playing the left channel; the other amp (left speaker) is silent regardless of content; no "without fw" or port/prepare errors on either slave. Fix --- Assign a single SoundWire channel per amp, e.g. right after snd_sdw_params_to_config(): if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && params_channels(params) == 2) { switch (tas_dev->sdw_peripheral->id.unique_id) { case 0x8: port_config.ch_mask = 0x1; break; /* left */ case 0xB: port_config.ch_mask = 0x2; break; /* right */ } } With this the two speakers are correctly driven: speaker-test -Dpipewire -c2 -s1 -> left speaker speaker-test -Dpipewire -c2 -s2 -> right speaker The unique_id -> L/R mapping is board-specific, so a proper fix should derive the per-amp channel assignment from firmware/ACPI (or a machine quirk table) rather than hard-coded SoundWire addresses. Filing this so the driver grows a real mechanism for multi-amp channel mapping. Reproduce --------- 1. Boot; internal speakers play but only one speaker is audible. 2. speaker-test -Dpipewire -c2 -s1 -> wrong/only-one speaker speaker-test -Dpipewire -c2 -s2 -> silent 3. With the per-amp ch_mask patch above, both speakers work. Happy to test patches on this hardware. Thanks, Antoine