Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Richard Acayan" <mailingradian@gmail.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v6 07/15] ASoC: qdsp6: q6afe: add internal mi2s support
Date: Thu, 30 Jul 2026 18:21:58 +0000	[thread overview]
Message-ID: <20260730182158.DA6921F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730174353.108023-8-mailingradian@gmail.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] q6afe_dai_prepare() unconditionally fails for LPI_MI2S DAIs due to missing switch cases.
- [High] of_q6afe_parse_dai_data() skips parsing 'qcom,sd-lines' for LPI_MI2S DAIs.
- [High] Missing DAPM widgets and routes for LPI_MI2S DAIs in q6afe-dai.c.
--

--- Patch [7]: [PATCH v6 07/15] ASoC: qdsp6: q6afe: add internal mi2s support ---
commit 29b5c067f4b9a1db3d8b82e2cd046a58a12a3c4e
Author: Richard Acayan <mailingradian@gmail.com>

ASoC: qdsp6: q6afe: add internal mi2s support

This commit adds port mappings for internal MI2S ports found on the
Snapdragon 660. It updates the port_maps array and q6afe_port_get_from_id()
to support LPI_MI2S RX and TX ports.

> diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
> index 40237267fda05..1d68a80e8e0c0 100644
> --- a/sound/soc/qcom/qdsp6/q6afe.c
> +++ b/sound/soc/qcom/qdsp6/q6afe.c
[ ... ]
> @@ -931,6 +945,34 @@ static struct afe_port_map port_maps[AFE_PORT_MAX] = {
>  	[RX_CODEC_DMA_RX_7] = { AFE_PORT_ID_RX_CODEC_DMA_RX_7,
>  				RX_CODEC_DMA_RX_7, 1, 1},
>  	[USB_RX] = { AFE_PORT_ID_USB_RX, USB_RX, 1, 1},
> +	[LPI_MI2S_RX_0] = { AFE_PORT_ID_INT0_MI2S_RX,
> +				LPI_MI2S_RX_0, 1, 1},

[Severity: High]
Does this code also require updates to sound/soc/qcom/qdsp6/q6afe-dai.c to
function correctly?

Looking at q6afe_dai_prepare(), LPI_MI2S ports are missing from the switch
statement:

sound/soc/qcom/qdsp6/q6afe-dai.c:q6afe_dai_prepare() {
    switch (dai->id) {
    ...
    case SENARY_MI2S_RX ... SENARY_MI2S_TX:
    case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:
    case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
        rc = q6afe_i2s_port_prepare(dai_data->port[dai->id],
                                   &dai_data->port_config[dai->id].i2s_cfg);
        ...
        break;
    ...
    default:
        return -EINVAL;
    }
}

Will this cause ALSA stream preparation to fail unconditionally with -EINVAL
for these new DAIs?

> +	[LPI_MI2S_TX_0] = { AFE_PORT_ID_INT0_MI2S_TX,
> +				LPI_MI2S_TX_0, 0, 1},

[Severity: High]
Additionally, it appears of_q6afe_parse_dai_data() skips parsing the
"qcom,sd-lines" devicetree property for LPI_MI2S DAIs because they are omitted
from its switch statement:

sound/soc/qcom/qdsp6/q6afe-dai.c:of_q6afe_parse_dai_data() {
    switch (id) {
    /* MI2S specific properties */
    case SENARY_MI2S_RX ... SENARY_MI2S_TX:
    case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:
    case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
        priv = &data->priv[id];
        ret = of_property_read_variable_u32_array(node,
                                        "qcom,sd-lines",
                                        lines, 0,
                                        Q6AFE_MAX_MI2S_LINES);
    ...
}

Could this cause sd_line_mask to remain 0 and lead to q6afe_i2s_port_prepare()
returning -EINVAL when trying to use these lines?

> +	[LPI_MI2S_RX_1] = { AFE_PORT_ID_INT1_MI2S_RX,
> +				LPI_MI2S_RX_1, 1, 1},

[Severity: High]
Finally, q6afe_dai_widgets[] in sound/soc/qcom/qdsp6/q6afe-dai.c lacks
SND_SOC_DAPM_AIF_IN and SND_SOC_DAPM_AIF_OUT entries for LPI_MI2S_RX_0 through
LPI_MI2S_TX_6.

Without these DAPM widgets, can the new DAIs be properly connected to audio
frontends or powered via DAPM?

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

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

Thread overview: 27+ 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
2026-07-30 22:49   ` Srinivas Kandagatla
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 [this message]
2026-07-30 22:51   ` Srinivas Kandagatla
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 22:55   ` Srinivas Kandagatla
2026-07-30 17:43 ` [PATCH v6 09/15] ASoC: qdsp6: q6routing: add lpi " Richard Acayan
2026-07-30 22:57   ` Srinivas Kandagatla
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=20260730182158.DA6921F000E9@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