All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Srinivas Kandagatla" <srinivas.kandagatla@oss.qualcomm.com>
Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 22/24] arm64: dts: qcom: glymur-crd: add WSA speaker protection VI feedback
Date: Tue, 01 Dec 2026 13:31:02 +0000	[thread overview]
Message-ID: <sashiko-outbox-243403@kernel.org> (raw)
In-Reply-To: <20261201124753.196748-23-srinivas.kandagatla@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] arm64: dts: qcom: glymur-crd: duplicate swr capture DAIs
  corrupt m_rt_count
- [Low] arm64: dts: qcom: glymur-crd wsa-dai-link sound-dai exceeds
  binding maxItems
--

commit 477126efe46745458e2d4fe969c058eb7b3b6fc3
Author: Ravi Hothi <ravi.hothi@oss.qualcomm.com>

arm64: dts: qcom: glymur-crd: add WSA speaker protection VI feedback

This commit adds the WSA8845 speaker V/I sense capture DAIs, SoundWire VI
ports, and WSA macro VI capture DAIs to the WSA Playback DAI link on
Glymur-CRD, and updates the speaker nodes to use #sound-dai-cells = <1>.

> diff --git a/arch/arm64/boot/dts/qcom/glymur-crd.dtsi b/arch/arm64/boot/dts/qcom/glymur-crd.dtsi
> index 58158b51fe295..93bee2a97e548 100644
> --- a/arch/arm64/boot/dts/qcom/glymur-crd.dtsi
> +++ b/arch/arm64/boot/dts/qcom/glymur-crd.dtsi
> @@ -257,10 +257,16 @@ cpu {
>  			};
>  
>  			codec {
> -				sound-dai = <&left_woofer>, <&left_tweeter>,
> +				sound-dai = <&left_woofer 0>, <&left_tweeter 0>,
>  					    <&swr0 0>, <&lpass_wsamacro 0>,
> -					    <&right_woofer>, <&right_tweeter>,
> -					    <&swr3 0>, <&lpass_wsa2macro 0>;
> +					    <&left_woofer 1>, <&left_tweeter 1>,
> +					    <&swr0 12>, <&swr0 13>,
> +					    <&lpass_wsamacro 2>,
> +					    <&right_woofer 0>, <&right_tweeter 0>,
> +					    <&swr3 0>, <&lpass_wsa2macro 0>,
> +					    <&right_woofer 1>, <&right_tweeter 1>,
> +					    <&swr3 12>, <&swr3 13>,
> +					    <&lpass_wsa2macro 2>;
>  			};

[Severity: Medium]
Should each SoundWire controller only list a single capture DAI on this link
instead of both <&swr0 12>, <&swr0 13> and <&swr3 12>, <&swr3 13>?

qcom_snd_sdw_setup_dir() attaches a single capture sdw_stream_runtime to
every capture codec DAI on the link, and a single call to
qcom_swrm_hw_params() -> qcom_swrm_stream_alloc_ports() already iterates all
slave runtimes on ctrl->bus and maps both master ports via slave->m_port_map
(just as <&swr0 0> and <&swr3 0> do for playback).

Listing two capture DAIs per SoundWire master controller runs
qcom_swrm_hw_params() -> sdw_stream_add_master() twice per bus on the same
capture stream:

drivers/soundwire/stream.c:sdw_stream_add_master() {
    ...
	if (!sdw_master_port_allocated(m_rt)) {
		ret = sdw_master_port_alloc(m_rt, num_ports);
		if (ret)
			goto alloc_error;

		stream->m_rt_count++;
	}
    ...
}

When VISENSE Switch is disabled on a bus, wsa884x_vi_hw_params() adds no
slave ports, so num_ports is 0 and m_rt->port_list stays empty.  The second
DAI on that bus (<&swr0 13> or <&swr3 13>) sees
!sdw_master_port_allocated(m_rt) still true and increments
stream->m_rt_count a second time for the same m_rt, while
sdw_stream_remove_master() in qcom_swrm_hw_free() only decrements it once.
When VISENSE Switch is enabled on only one bus (or after a
hw_params/hw_free cycle with VISENSE disabled on at least one bus),
stream->m_rt_count reaches 3 (>= bus->hw_sync_min_links), causing
sdw_bank_switch() -> sdw_transfer_defer() to fail playback prepare with
-ENOTSUPP.

[Severity: Low]
Does expanding wsa-dai-link/codec/sound-dai to 18 entries break
dtbs_check?  Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
(which validates qcom,glymur-sndcard) currently caps codec/sound-dai at
maxItems: 8.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261201124753.196748-1-srinivas.kandagatla@oss.qualcomm.com?part=22

  reply	other threads:[~2026-12-01 13:31 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 12:47 [PATCH v4 00/24] ASoC: qcom: AudioReach Active speaker protection for WSA88xx Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 01/24] ASoC: soc-core: bump MAX_DEFAULT_CH_MAP_SIZE to 18 Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 02/24] ASoC: soc-pcm: add multi_direction_codecs link flag Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 03/24] ASoC: soc-dai: export snd_soc_dai_stream_valid Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 04/24] ASoC: qcom: sdw: add per-direction stream runtimes for multi_direction links Srinivas Kandagatla
2026-12-01 13:19   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 05/24] ASoC: dt-bindings: qcom,wsa8840: allow one sound DAI cell Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 06/24] ASoC: codecs: wsa884x: add VI sense capture DAI Srinivas Kandagatla
2026-12-01 13:03   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 07/24] ASoC: codecs: wsa883x: " Srinivas Kandagatla
2026-12-01 13:03   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 08/24] ASoC: codecs: wsa884x: register the die temperature as a thermal zone Srinivas Kandagatla
2026-12-01 13:13   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 09/24] ASoC: qcom: audioreach: add control link support to graphs Srinivas Kandagatla
2026-12-01 13:09   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 10/24] ASoC: qcom: audioreach: run VI module in calibration mode with per-speaker events Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 11/24] ASoC: qcom: q6apm-dai: add S32_LE format support Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 12/24] ASoC: qcom: audioreach: cache VI calibration results per speaker Srinivas Kandagatla
2026-12-01 13:10   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 13/24] ASoC: qcom: audioreach: add speaker protection calibration trigger infrastructure Srinivas Kandagatla
2026-12-01 13:12   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 14/24] ASoC: qcom: audioreach: send cached R0/T0 to the VI module in normal mode Srinivas Kandagatla
2026-12-01 13:16   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 15/24] ASoC: qcom: audioreach: send static cfg blobs to speaker protection modules Srinivas Kandagatla
2026-12-01 13:16   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 16/24] ASoC: qcom: audioreach: add speaker protection mixer controls Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 17/24] ASoC: qcom: audioreach: pin SPEAKER_PROTECTION_VI media format Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 18/24] ASoC: qcom: audioreach: add live speaker temperature (T0) readback Srinivas Kandagatla
2026-12-01 13:23   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 19/24] ASoC: qcom: audioreach: add speaker protection calibration state control Srinivas Kandagatla
2026-12-01 13:27   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 20/24] ASoC: qcom: x1e80100: carry WSA VI feedback on the WSA Playback BE link Srinivas Kandagatla
2026-12-01 12:47 ` [PATCH v4 21/24] ASoC: qcom: x1e80100: register WSA speaker thermal zones for speaker protection Srinivas Kandagatla
2026-12-01 13:24   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 22/24] arm64: dts: qcom: glymur-crd: add WSA speaker protection VI feedback Srinivas Kandagatla
2026-12-01 13:31   ` sashiko-bot [this message]
2026-12-01 12:47 ` [PATCH v4 23/24] arm64: dts: qcom: mahua-t14s: " Srinivas Kandagatla
2026-12-01 13:30   ` sashiko-bot
2026-12-01 12:47 ` [PATCH v4 24/24] arm64: dts: qcom: x1e78100-t14s: " Srinivas Kandagatla
2026-12-01 13:27   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-243403@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=srinivas.kandagatla@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.