Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Richard Acayan" <mailingradian@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 06/15] ASoC: qdsp6: q6dsp-lpass-ports: add support for lpi mi2s ports 5-6
Date: Thu, 30 Jul 2026 18:15:49 +0000	[thread overview]
Message-ID: <20260730181550.0BF001F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730174353.108023-7-mailingradian@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The newly added LPI MI2S DAIs lack corresponding backend AFE port mappings and configuration handlers, causing DAI probe and stream preparation to unconditionally fail on AFE-based systems like SDM660.
--

--- Patch [6]: [PATCH v6 06/15] ASoC: qdsp6: q6dsp-lpass-ports: add support for lpi mi2s ports 5-6 ---
commit d2dcc25c1d269d302ba0498e0de038f74d01d735
Author: Richard Acayan <mailingradian@gmail.com>

ASoC: qdsp6: q6dsp-lpass-ports: add support for lpi mi2s ports 5-6

This commit adds the extra LPI MI2S ports used for internal MI2S on SDM660.

Link: https://android.googlesource.com/kernel/msm-extra/+/530cffa4cc977a348753831b163eb9d3302b954a/asoc/msm-dai-q6-v2.c#4597

> diff --git a/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c b/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c
> index e5cd82f77b552..c3d8116ad5035 100644
> --- a/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c
> +++ b/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c
> @@ -553,11 +553,15 @@ static struct snd_soc_dai_driver q6dsp_audio_fe_dais[] = {
>  	Q6AFE_MI2S_RX_DAI("LPI RX2", LPI_MI2S_RX_2),
>  	Q6AFE_MI2S_RX_DAI("LPI RX3", LPI_MI2S_RX_3),
>  	Q6AFE_MI2S_RX_DAI("LPI RX4", LPI_MI2S_RX_4),
> +	Q6AFE_MI2S_RX_DAI("LPI RX5", LPI_MI2S_RX_5),
> +	Q6AFE_MI2S_RX_DAI("LPI RX6", LPI_MI2S_RX_6),
>  	Q6AFE_MI2S_TX_DAI("LPI TX0", LPI_MI2S_TX_0),
>  	Q6AFE_MI2S_TX_DAI("LPI TX1", LPI_MI2S_TX_1),
>  	Q6AFE_MI2S_TX_DAI("LPI TX2", LPI_MI2S_TX_2),
>  	Q6AFE_MI2S_TX_DAI("LPI TX3", LPI_MI2S_TX_3),
>  	Q6AFE_MI2S_TX_DAI("LPI TX4", LPI_MI2S_TX_4),
> +	Q6AFE_MI2S_TX_DAI("LPI TX5", LPI_MI2S_TX_5),
> +	Q6AFE_MI2S_TX_DAI("LPI TX6", LPI_MI2S_TX_6),

[Severity: High]
Will these new ports fail to probe and prepare because they are missing
backend AFE port mappings and configuration handlers?

When the machine driver binds to the LPI MI2S DAIs, q6afe_port_get_from_id()
looks up the port mapping in the static port_maps array in
sound/soc/qcom/qdsp6/q6afe.c.

Because the new LPI_MI2S ports are missing from the port_maps array, the
port_id used for the lookup will be 0 (uninitialized). This causes the
switch statement in q6afe_port_get_from_id() to fall through to the default
error case and return -EINVAL:

sound/soc/qcom/qdsp6/q6afe.c:q6afe_port_get_from_id() {
    ...
    switch (port_id) {
    ...
    default:
        dev_err(dev, "AFE port id not supported %d\n", port_id);
        return ERR_PTR(-EINVAL);
    }
}

Furthermore, q6afe_dai_prepare() and of_q6afe_parse_dai_data() in
sound/soc/qcom/qdsp6/q6afe-dai.c also lack switch cases for the new
ports, which guarantees they will fall back to their default error paths.

Should these ports also be added to the port_maps array and the relevant
switch statements in q6afe.c and q6afe-dai.c?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260730174353.108023-1-mailingradian@gmail.com?part=6

  reply	other threads:[~2026-07-30 18:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 17:43 [PATCH v6 00/15] SDM660 sound card and internal MI2S support Richard Acayan
2026-07-30 17:43 ` [PATCH v6 01/15] ASoC: dt-bindings: qcom,sm8250: add compatible for sdm660 Richard Acayan
2026-07-30 17:43 ` [PATCH v6 02/15] ASoC: dt-bindings: qcom: q6dsp: add support for lpi mi2s ports 5-6 Richard Acayan
2026-07-30 17:43 ` [PATCH v6 03/15] ASoC: dt-bindings: pm8916-wcd-analog-codec: Document pm8950/pm8953 Richard Acayan
2026-07-30 17:43 ` [PATCH v6 04/15] ASoC: dt-bindings: pm8916-analog-codec: Add PM660L compatible Richard Acayan
2026-07-30 17:43 ` [PATCH v6 05/15] ASoC: dt-bindings: msm8916-digital-codec: Add SDM660 compatible Richard Acayan
2026-07-30 17:43 ` [PATCH v6 06/15] ASoC: qdsp6: q6dsp-lpass-ports: add support for lpi mi2s ports 5-6 Richard Acayan
2026-07-30 18:15   ` sashiko-bot [this message]
2026-07-30 17:43 ` [PATCH v6 07/15] ASoC: qdsp6: q6afe: add internal mi2s support Richard Acayan
2026-07-30 18:21   ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 08/15] ASoC: qdsp6: q6afe-dai: " Richard Acayan
2026-07-30 18:06   ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 09/15] ASoC: qdsp6: q6routing: add lpi " Richard Acayan
2026-07-30 17:43 ` [PATCH v6 10/15] ASoC: qdsp6: common: support headphone jacks connected to lpi mi2s Richard Acayan
2026-07-30 17:43 ` [PATCH v6 11/15] ASoC: qcom: sm8250: add support for LPI_MI2S_RX_0 and LPI_MI2S_TX_3 Richard Acayan
2026-07-30 18:02   ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 12/15] ASoC: qcom: sm8250: add SDM660 compatible Richard Acayan
2026-07-30 17:43 ` [PATCH v6 13/15] ASoC: msm8916-wcd-analog: add pm8950 codec Richard Acayan
2026-07-30 17:59   ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 14/15] ASoC: msm8916-wcd-analog: add pm8953 codec Richard Acayan
2026-07-30 18:03   ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 15/15] ASoC: msm8916-wcd-analog: add quirk for cajon 2.0 Richard Acayan
2026-07-30 18:03   ` 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=20260730181550.0BF001F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=mailingradian@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox