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=1796387599; b=cvEeFje9J8mmsGixaSrNU4xleTpjQ2vDRYWUwJ04kJLEXgR80YMGfp+BgzcT72Nxow4e gGdvnDoe361PWvSVYffH3+ZgAds5ji1ebFH7Co5QM0LihYwhG55cd+bK/xM29fZl96Fae 8m8YZdnYcWylpr+FS0fbaz0RUQ51GHFYY9ND4i3izqN4VdQ6jw/3b02p1YUGcx7hTZjOJ vYk79Xc6LP/1QWVZQI9m4IZfaWB9NjbgDfX5+vFvmePn5lEgUCoMw94jJM4ybdsn8aFvF 0xN281VBuKwmKfH3zWf1cDTJgRULgXH/DrfqM9bSaRlx+yNIkvtiabyKQIOOXby6pZg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387599; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=w2+j2HRXB9CpHHcDLtxGSAzSgNVuq7DCxYrO9UbsSQQ=; b=o5gaOZV7BWfH3+BEQucjbCTbDsF8SBCw5Cl2t3htU3/Ykt68z+/AFXRKgcLsTOw3uzXc WY/AhR71gufsJfnve8SIZO23cKi+8W+sDNSsOjxNvAm0cWlPFgH5Z69D794yHY4p1YXWo eZgTxL55XRkuYnOplF7VBmRNOWfnRfrLgGlf2bUSL1QVbxqXRHxSipLy9HzEl+96DJEy3 POBxzsD0+eH2XOdpfub3fOql3Mx1B/Hkwwu/IkB3VunoDvFBNh8ED7WxPTVCcNVha+K8r sbeNin508CAoE3VR8I5HiCuPzvK7v5vETWA9+8KZJdtXlh9ZT1EnwrBu+NkwpIkQYSg== 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=Y1azIRwk; 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 A415A606A322; Fri, 4 Dec 2026 12:33:19 +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=Y1azIRwk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D1821F000C2; Fri, 4 Dec 2026 12:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796387599; bh=w2+j2HRXB9CpHHcDLtxGSAzSgNVuq7DCxYrO9UbsSQQ=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Y1azIRwkERhcv/zmEwjfYwPiKuBviQLUasspoUJLeZDZCNfDNOMD1GYI/oFwe7j1a KyyB0zTo2/esS4d1YZO8MOO6lzs39Mei3YNxGFYSjoBBsq5wOTZLnmTIVnm8103moP j/qBYFNnc85VNRikSb5SieNNi6sFTeYkMZg2ciGOazpRevvD9NiPrZgw00YZ7EXvqu JDKrvYQkMY6pvl70nDWM2JVgF8fCatHxe8GwVfuVOs1lyXSZBH4PvUNxhPbxgSZt/K aGqh1aHpX9cX55klbYA5TWT+ymurm1dX4a84jNI180gUvg9RdNhCIyMS0tGlhbF28n aCdMlqKed/TGQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v5 07/24] ASoC: codecs: wsa883x: add VI sense capture DAI 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-8-srinivas.kandagatla@oss.qualcomm.com> References: <20261204113101.1141644-1-srinivas.kandagatla@oss.qualcomm.com> <20261204113101.1141644-8-srinivas.kandagatla@oss.qualcomm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 12:33:18 +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] ASoC: wsa883x: wsa883x_vi_hw_params() ignores port_enable[VISENSE] - [Medium] ASoC: wsa883x: wsa883x_bus_config() ignores sdw_write() return value - [Low] ASoC: dt-bindings: qcom,wsa883x: #sound-dai-cells const 0 blocks VI DAI - [Low] ASoC: wsa883x: VI capture DAI rate_max 352800 masks 384000 Hz rate -- commit 54b0b64fce8c3a9ee9f1ba2ef2f6b69f8d602b09 Author: Ravi Hothi ASoC: codecs: wsa883x: add VI sense capture DAI This commit moves the WSA883x VISENSE port to a SoundWire source port, adds a separate VI capture DAI with its own stream runtime and ops, and installs a bus_config handler to program SCP_HOST_CLK_DIV2. > diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c > index 64391d654a08b..6de669288d6aa 100644 > --- a/sound/soc/codecs/wsa883x.c > +++ b/sound/soc/codecs/wsa883x.c [ ... ] > @@ -1125,8 +1133,16 @@ static int wsa883x_port_prep(struct sdw_slave *sla= ve, > return 0; > } > =20 > +static int wsa883x_bus_config(struct sdw_slave *slave, > + struct sdw_bus_params *params) > +{ > + sdw_write(slave, SWRS_SCP_HOST_CLK_DIV2_CTL_BANK(params->next_bank), 0x= 01); > + return 0; > +} [Severity: Medium] Should wsa883x_bus_config() return the status of sdw_write() instead of unconditionally returning 0? sdw_notify_config() checks the return value of bus_config() to abort stream configuration before the bank switch. Discarding a SoundWire write failure here allows the bank switch to proceed with the amplifier's bus clock divider unprogrammed. [ ... ] > @@ -1335,6 +1351,25 @@ static const struct snd_soc_component_driver wsa88= 3x_component_drv =3D { > .num_dapm_routes =3D ARRAY_SIZE(wsa883x_audio_map), > }; > =20 > +static int wsa883x_vi_hw_params(struct snd_pcm_substream *substream, > + struct snd_pcm_hw_params *params, > + struct snd_soc_dai *dai) > +{ > + struct wsa883x_priv *wsa883x =3D dev_get_drvdata(dai->dev); > + > + wsa883x->vi_port_config =3D wsa883x_pconfig[WSA883X_PORT_VISENSE]; > + wsa883x->vi_sconfig.frame_rate =3D params_rate(params); > + /* VISENSE carries the V and I sense pair */ > + wsa883x->vi_sconfig.ch_count =3D 2; > + wsa883x->vi_sconfig.bps =3D 1; > + wsa883x->vi_sconfig.type =3D SDW_STREAM_PDM; > + wsa883x->vi_sconfig.direction =3D SDW_DATA_DIR_TX; > + > + return sdw_stream_add_slave(wsa883x->slave, &wsa883x->vi_sconfig, > + &wsa883x->vi_port_config, 1, > + wsa883x->vi_sruntime); > +} > + > static int wsa883x_hw_params(struct snd_pcm_substream *substream, > struct snd_pcm_hw_params *params, > struct snd_soc_dai *dai) > @@ -1344,6 +1379,9 @@ static int wsa883x_hw_params(struct snd_pcm_substre= am *substream, > =20 > wsa883x->active_ports =3D 0; > for (i =3D 0; i < WSA883X_MAX_SWR_PORTS; i++) { > + /* VISENSE is driven by the separate VI capture DAI */ > + if (i =3D=3D WSA883X_PORT_VISENSE) > + continue; > if (!wsa883x->port_enable[i]) > continue; [Severity: Medium] Does wsa883x_vi_hw_params() need to check wsa883x->port_enable[WSA883X_PORT_VISENSE] before registering the slave? With wsa883x_hw_params() skipping WSA883X_PORT_VISENSE, nothing reads port_enable[WSA883X_PORT_VISENSE] anymore, leaving the "VISENSE Switch" mixer control a no-op. Calling sdw_stream_add_slave() unconditionally also transitions vi_sruntime->state out of SDW_STREAM_ALLOCATED, defeating the VI-off skip in qcom_snd_sdw_prepare() even when VI feedback is disabled. [ ... ] > @@ -1423,6 +1473,19 @@ static struct snd_soc_dai_driver wsa883x_dais[] = =3D { > }, > .ops =3D &wsa883x_dai_ops, > }, > + { > + .name =3D "VI", > + .capture =3D { > + .stream_name =3D "VI Capture", > + .rates =3D WSA883X_RATES | WSA883X_FRAC_RATES, > + .formats =3D WSA883X_FORMATS, > + .rate_min =3D 8000, > + .rate_max =3D 352800, [Severity: Low] Should .rate_max be 384000 here to match WSA883X_RATES? WSA883X_RATES includes SNDRV_PCM_RATE_384000, so capping .rate_max at 352800 causes soc_pcm_hw_update_rate() to clamp the maximum rate and mask out 384 kHz. > + .channels_min =3D 1, > + .channels_max =3D 2, > + }, > + .ops =3D &wsa883x_vi_dai_ops, > + }, [Severity: Low] Does Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml also need an update to allow #sound-dai-cells =3D <1>? The binding currently enforces #sound-dai-cells: const: 0, which prevents schema-valid Device Trees from addressing this second DAI at index 1. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204113101.1141= 644-1-srinivas.kandagatla@oss.qualcomm.com?part=3D7