From: sashiko-bot@kernel.org
To: "Harendra Gautam" <harendra.gautam@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 09/10] ASoC: qcom: Add Shikra QAIF support
Date: Wed, 23 Sep 2026 07:09:29 +0000 [thread overview]
Message-ID: <20260923070929.CFE3E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923-b4-qaif-shikra-audio-v7-9-d5b6f056568e@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Logic error in shikra_qaif_get_dma_idx due to contiguous DAI ID assumption
- [Low] Build failure due to undefined AIF_* constants
--
commit 8d479b4be68dbcc2201e8313200c13e70d03bca1
Author: Harendra Gautam <harendra.gautam@oss.qualcomm.com>
ASoC: qcom: Add Shikra QAIF support
Add the Shikra variant data for the Qualcomm Audio Interface driver so
the common QAIF code can bind to the Shikra QAIF device and expose the
SoC-specific DAIs. This commit provides the Shikra DMA-to-DAI mappings,
layout, clock names, DAI driver data, and PM hooks required by QAIF.
> diff --git a/sound/soc/qcom/qaif-shikra.c b/sound/soc/qcom/qaif-shikra.c
> new file mode 100644
> index 0000000000000..0d5c2baade28f
> --- /dev/null
> +++ b/sound/soc/qcom/qaif-shikra.c
> @@ -0,0 +1,447 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> + *
> + * qaif-shikra.c -- ALSA SoC CPU-Platform DAI driver for QTi QAIF
> + */
> +
> +#include <linux/module.h>
> +#include <linux/pm.h>
> +#include <sound/pcm.h>
> +#include <sound/soc.h>
> +#include "qaif.h"
> +
> +static const struct qaif_dmaidx_dai_map shikra_mi2s_dma_dai_map[] = {
> + { AIF_MI2S_RX_0, QAIF_DMA_IDX0 },
[Severity: Low]
Are the AIF_MI2S_RX_0, AIF_TDM_RX_0, and similar constants defined anywhere
in the kernel tree?
It appears their definitions might be missing, which could cause an immediate
compilation failure when building this newly added file.
[ ... ]
> +static int shikra_qaif_get_dma_idx(unsigned int dai_id)
> +{
> + const struct qaif_dmaidx_dai_map *map;
> + int i, size;
> +
> + if (dai_id >= AIF_MI2S_RX_0 && dai_id <= AIF_MI2S_TX_12) {
[Severity: Medium]
Could this condition incorrectly classify non-MI2S ports if they fall
between the RX and TX ranges?
This logic assumes that AIF_MI2S_RX_0 through AIF_MI2S_TX_12 form a
contiguous block of IDs. However, in the shared header,
qaif_is_aif_mi2s_port() treats the RX and TX ranges as distinct:
sound/soc/qcom/qaif.h:qaif_is_aif_mi2s_port() {
...
return (dai_id >= AIF_MI2S_RX_0 && dai_id <= AIF_MI2S_RX_12) ||
(dai_id >= AIF_MI2S_TX_0 && dai_id <= AIF_MI2S_TX_12);
}
If the underlying enum places other IDs (such as TDM ports) in between
the MI2S RX and TX ranges, this function could misclassify them as MI2S
ports, fail to find them in shikra_mi2s_dma_dai_map, and return -EINVAL.
> + map = shikra_mi2s_dma_dai_map;
> + size = ARRAY_SIZE(shikra_mi2s_dma_dai_map);
> + } else if (dai_id >= AIF_TDM_RX_0 && dai_id <= AIF_TDM_TX_12) {
> + map = shikra_tdm_dma_dai_map;
> + size = ARRAY_SIZE(shikra_tdm_dma_dai_map);
> + } else {
> + map = shikra_cif_dma_dai_map;
> + size = ARRAY_SIZE(shikra_cif_dma_dai_map);
> + }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923-b4-qaif-shikra-audio-v7-0-d5b6f056568e@oss.qualcomm.com?part=9
next prev parent reply other threads:[~2026-09-23 7:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 6:48 [PATCH v7 00/10] ASoC: qcom: Add QAIF driver for Shikra audio platform Harendra Gautam
2026-09-23 6:48 ` [PATCH v7 01/10] ASoC: dt-bindings: qcom,shikra-qaif-cpu: Add binding Harendra Gautam
2026-09-23 6:59 ` sashiko-bot
2026-09-23 6:48 ` [PATCH v7 02/10] ASoC: qcom: Add QAIF shared data structures and variant interface Harendra Gautam
2026-09-23 6:59 ` sashiko-bot
2026-09-23 9:29 ` Mark Brown
2026-09-28 9:11 ` Harendra Gautam
2026-09-23 6:48 ` [PATCH v7 03/10] ASoC: qcom: Add QAIF hardware register map Harendra Gautam
2026-09-23 7:00 ` sashiko-bot
2026-09-23 6:48 ` [PATCH v7 04/10] ASoC: qcom: Add QAIF CPU DAI ops, regmap, DT parsing and platform init Harendra Gautam
2026-09-23 7:02 ` sashiko-bot
2026-09-23 9:41 ` Mark Brown
2026-09-28 9:38 ` Harendra Gautam
2026-09-28 12:17 ` Harendra Gautam
2026-09-23 6:48 ` [PATCH v7 05/10] ASoC: soc-core: Add snd_soc_of_xlate_dai_name() generic helper Harendra Gautam
2026-09-23 7:00 ` sashiko-bot
2026-09-23 6:48 ` [PATCH v7 06/10] ASoC: qcom: Switch lpass-cpu and qaif-cpu to snd_soc_of_xlate_dai_name() Harendra Gautam
2026-09-24 10:32 ` Ajay Kumar Nandam
2026-09-23 6:48 ` [PATCH v7 07/10] ASoC: qcom: Add QAIF PCM operations Harendra Gautam
2026-09-23 7:03 ` sashiko-bot
2026-09-23 9:45 ` Mark Brown
2026-09-28 9:06 ` Harendra Gautam
2026-09-23 6:48 ` [PATCH v7 08/10] ASoC: qcom: Add QAIF IRQ handling and platform register Harendra Gautam
2026-09-23 7:04 ` sashiko-bot
2026-09-23 6:48 ` [PATCH v7 09/10] ASoC: qcom: Add Shikra QAIF support Harendra Gautam
2026-09-23 7:09 ` sashiko-bot [this message]
2026-09-23 6:48 ` [PATCH v7 10/10] MAINTAINERS: Add Qualcomm QAIF driver entry Harendra Gautam
2026-09-23 9:27 ` [PATCH v7 00/10] ASoC: qcom: Add QAIF driver for Shikra audio platform Mark Brown
2026-09-28 5:44 ` Harendra Gautam
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=20260923070929.CFE3E1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=harendra.gautam@oss.qualcomm.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