From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796394252; b=x/kXuSNvxyPsLkNPN0txTPOGJTd3U1KqgYuFyWgdp7KRygAgTF3GwyV9mtxKGPHelV01 kOEInj8o5stzbYGpDmqjryppWefPXskB1aVjEqtfQ8PQS1ZzF3h7nxV+k/RIq4UdpDWJe Wr9KoqrS/bDC+o9s6xSMtpSKgyzYLcyu8pn5aDxQTGHGcMEVgONbZlRln7YBvURM9uX/x 6IMnMZOHuymzBzaLuwQT/YFvYFv1rp7RM61vHle4K29fh7JjxwP+AYIXCXxAwQs+OZoKh 0smmLNoOhFBzr3YzAdh1aBYBaI9wiCIvQe+9Oikugn8jxgZOPpxc0W2XwbdHbmsOwdg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796394252; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=zvxsWHxionV85U3E8eaUuDUvGhtGVzRee09fI/8xgJs=; b=v7eQgw4l6ls43AUMaO5WN3/uk6VwsMrl4KspJd24pDxlBjWaR7GPoHuA5yJsfm801b3W iQlgiwRwe+k2a8Jc7ijDSUYiWqknsAMVBaB5C0zkLIM9gKtxAT27Ni1WU3Z8kgYZKJgEv fP0eHrcALKzFOurFQNlTnTukrKBkCym6dKHCfzisT4STlvbXeDYiWygEtg+DTrDfM12qV A8D6AwqY2t/7ZiC1L85h1dckWwx9axFGmzwsJnGSGK8g1TO9J4LTKg9H/RDJCcu1sQ/Cl scK2BCWXIJGJe6OARQbwzWKi+c+krE1XHVsgmUkxzibo1ITiAucABITrILfKw1x9BVw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BIaow1fZ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33EA9606A322; Fri, 4 Dec 2026 14:24:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BIaow1fZ Received: by smtp.kernel.org (Postfix) with ESMTPSA id A14271F000CE; Fri, 4 Dec 2026 14:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796394251; bh=zvxsWHxionV85U3E8eaUuDUvGhtGVzRee09fI/8xgJs=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=BIaow1fZ3G4wbS/ljfWuMuvP3cK+3Sn+12IrHgNGn0jrWs/f9kp/RvRUi109u7eXJ Psv7H2Z/fq5aNeP3Enn5syWNnnA5QmGP9buEBkm9O7IiJyIlcszYt8do3KeVsIY0ra p6tweAhtRDHrw5DaN8LvxAbQWfFREXwRHhcO+21np2p7RwQA9gzu/OmlxXO2W3sgXR NxIDQgmIcUIBgPz6XfSBzGN0JwdOzGHhiWTN8sY1IY81hsIFub0bnwVA+CODU4rP1u d/7DmRaRMucy1bIMXcNcHCUOpTKu0Hnz0YArX3Z94hfR4baWojYyE/fDjYfQx2KSO3 g+1CldmvLEhPg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v5 24/24] arm64: dts: qcom: x1e78100-t14s: add WSA speaker protection VI feedback Reply-To: sashiko-reviews@lists.linux.dev To: "Srinivas Kandagatla" Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261204113101.1141644-25-srinivas.kandagatla@oss.qualcomm.com> References: <20261204113101.1141644-1-srinivas.kandagatla@oss.qualcomm.com> <20261204113101.1141644-25-srinivas.kandagatla@oss.qualcomm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 14:24:11 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [Medium] arm64: dts: qcom: x1e78100-t14s: duplicate swr0 capture DAIs leak m_rt_count - [Medium] ASoC: qcom: sdw: VI stream left in SDW_STREAM_RELEASED breaks prepare after hw_free - [Low] arm64: dts: qcom: x1e78100-t14s: wsa-dai-link codec sound-dai exceeds maxItems - [Low] arm64: dts: qcom: x1e78100-t14s: off-by-one swr0 VI DAI indices -- commit fbe15e25019853415d9375e16b2bb7773629c92a Author: Srinivas Kandagatla arm64: dts: qcom: x1e78100-t14s: add WSA speaker protection VI feedback This commit wires up the WSA8845 speaker V/I sense DAIs, SoundWire VI capture ports, and WSA macro VI capture DAI on the WSA Playback link in the ThinkPad T14s Gen 6 devicetree, and sets #sound-dai-cells to 1 on both speaker nodes. > diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi = b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi > index 93c7e3a02041c..2242bbe59d94e 100644 > --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi > +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi > @@ -478,7 +478,11 @@ cpu { > }; > =20 > codec { > - sound-dai =3D <&left_spkr>, <&right_spkr>, <&swr0 0>, <&lpass_wsamac= ro 0>; > + sound-dai =3D <&left_spkr 0>, <&right_spkr 0>, > + <&swr0 0>, <&lpass_wsamacro 0>, > + <&left_spkr 1>, <&right_spkr 1>, > + <&swr0 10>, <&swr0 11>, > + <&lpass_wsamacro 2>; > }; > =20 > platform { [Severity: Medium] Can listing two swr0 capture DAIs on wsa-dai-link leak stream->m_rt_count? qcom_swrm_stream_alloc_ports() already iterates all slaves on ctrl->bus and allocates every mapped master port in one sdw_stream_add_master() call, which is why playback only lists <&swr0 0>. With both <&swr0 10> and <&swr0 11>, qcom_swrm_hw_params() calls sdw_stream_add_master() twice per hw_params on the same capture stream. When VISENSE Switch is off (the boot default), both calls pass num_ports =3D 0 and leave m_rt->port_list empty: drivers/soundwire/stream.c:sdw_stream_add_master() { ... if (!sdw_master_port_allocated(m_rt)) { ret =3D sdw_master_port_alloc(m_rt, num_ports); if (ret) goto alloc_error; stream->m_rt_count++; } ... } Both calls increment stream->m_rt_count for the same m_rt, while qcom_swrm_hw_free() decrements it once, leaking +1 per hw_params/hw_free cycle on an open PCM. Once m_rt_count reaches hw_sync_min_links (3 on qcom,soundwire-v2.0.0), preparing the stream after enabling VI sense enters the multi_link path in sdw_bank_switch() -> sdw_transfer_defer() and fails with -ENOTSUPP because qcom_swrm_ops lacks xfer_msg_defer, breaking WSA playback. Using a single swr0 capture DAI avoids the duplicate master registration. [Severity: Low] Are the swr0 VI DAI indices off by one here? In hamoa.dtsi, swr0 has 9 DOUT ports and 4 DIN ports, and qcom_swrm_get_port_config() maps 0-based index i to 1-based master port i + 1. Without .of_xlate_dai_name on qcom_swrm_dai_component, snd_soc_get_dlc() resolves the sound-dai cell as a 0-based DAI index. Passing the 1-based port numbers from qcom,port-mapping as <&swr0 10> and <&swr0 11> binds SDW Pin10 (port 11) and SDW Pin11 (unconfigured port 12) while omitting SDW Pin9 (port 10), instead of 0-based indices 9 and 10. While qcom.c currently reads the hardware port numbers from slave->m_port_map[], this mixes 0-based and 1-based indexing in the devicetree ABI and binds an unconfigured port's DAI. [Severity: Low] Does expanding sound-dai to nine entries break dtbs_check? The sound node uses compatible =3D "qcom,x1e80100-sndcard", whose binding in Documentation/devicetree/bindings/sound/qcom,sm8250.yaml constrains codec sound-dai to maxItems: 8. Either dropping the duplicate swr0 capture DAI or updating maxItems in the binding is needed for dtbs_check to pass on x1e78100-lenovo-thinkpad-t14s.dtb and x1e78100-lenovo-thinkpad-t14s-oled.dtb. [Severity: Medium] Will enabling multi_direction_codecs on wsa-dai-link break prepare after hw_free when VISENSE is off? With <&left_spkr 1> and <&right_spkr 1> added, x1e80100_add_be_ops() sets multi_direction_codecs on WSA_CODEC_DMA_RX_0. When hw_free runs on an open playback substream with VISENSE off, qcom_swrm_hw_free() -> sdw_stream_remove_master() moves the capture stream to SDW_STREAM_RELEASED. On a subsequent hw_params with VISENSE still disabled, wsa884x_vi_hw_params() returns early without adding a slave and sdw_stream_add_master() leaves stream->state at SDW_STREAM_RELEASED: sound/soc/qcom/sdw.c:qcom_snd_sdw_prepare() { ... if (sr_opp && sr_opp->state !=3D SDW_STREAM_ALLOCATED) { ret =3D qcom_snd_sdw_prepare_dir(rtd, substream->stream ^ 1); ... } Because qcom_snd_sdw_prepare() only skips SDW_STREAM_ALLOCATED, it calls sdw_prepare_stream() on the released capture stream, which fails with -EINVAL and tears down playback until the PCM is closed and reopened. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204113101.1141= 644-1-srinivas.kandagatla@oss.qualcomm.com?part=3D24