From: sashiko-bot@kernel.org
To: "Harendra Gautam" <harendra.gautam@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v8 07/10] ASoC: qcom: Add QAIF PCM operations
Date: Mon, 28 Sep 2026 13:07:46 +0000 [thread overview]
Message-ID: <20260928130746.89CDF1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260928-b4-qaif-shikra-audio-v8-7-ac618057fe85@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] QAIF driver fails to restore hardware registers or SHRAM state on system resume
- [Low] Mismatch between register constant naming and the register being updated (`QAIF_DMACTL_WM_5` used for `DMACFG`)
--
commit 26a7723ec5d620bcd1ab1da632a18d127c2fe623
Author: Harendra Gautam <harendra.gautam@oss.qualcomm.com>
ASoC: qcom: Add QAIF PCM operations
This commit adds the PCM platform callbacks needed to use QAIF DAIs for
playback and capture. It handles DMA buffer pre-allocation, stream
configuration, and one-time hardware initialization. It also adds support
for mmap on CIF and AIF paths.
> diff --git a/sound/soc/qcom/qaif-platform.c b/sound/soc/qcom/qaif-platform.c
> new file mode 100644
> index 0000000000000..e24c4252825e2
> --- /dev/null
> +++ b/sound/soc/qcom/qaif-platform.c
[ ... ]
> @@ -0,0 +1,464 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> + *
> + * qaif-platform.c -- ALSA SoC PCM platform driver for the Qualcomm Audio Interface (QAIF)
> + */
[ ... ]
> +static const struct snd_pcm_hardware qaif_platform_hardware = {
> + .info = SNDRV_PCM_INFO_MMAP |
> + SNDRV_PCM_INFO_MMAP_VALID |
> + SNDRV_PCM_INFO_INTERLEAVED |
> + SNDRV_PCM_INFO_PAUSE |
> + SNDRV_PCM_INFO_RESUME,
> + .formats = SNDRV_PCM_FMTBIT_S16 |
[Severity: High]
This structure advertises the hardware resume capability by setting
SNDRV_PCM_INFO_RESUME. Does this create a regression during system resume
where the hardware state is lost, because the driver does not provide the
required callbacks and state restoration logic to support it?
[ ... ]
> +static int qaif_init(struct snd_soc_component *component)
> +{
> + struct qaif_drv_data *drvdata = snd_soc_component_get_drvdata(component);
> + int ret;
> +
> + if (drvdata->qaif_hw_configured)
> + return 0;
> +
> + ret = qaif_config_shram(drvdata);
[Severity: High]
During system suspend, the hardware typically loses its SHRAM configuration
and EE mapping when the power domain collapses. Since qaif_hw_configured is
never cleared during suspend, will qaif_init() return early without
re-applying the required one-time hardware configuration on resume?
Without restoring these registers, could this lead to a regression where
the hardware remains uninitialized and fails to operate correctly after a
system sleep cycle?
[ ... ]
> +static int qaif_platform_pcmops_hw_params(struct snd_soc_component *component,
> + struct snd_pcm_substream *substream,
> + struct snd_pcm_hw_params *params)
> +{
[ ... ]
> + ret = regmap_update_bits(drvdata->audio_qaif_map,
> + qaif_dmacfg_reg(v, idx, substream->stream, dai_id),
> + QAIF_DMACFG_BURST4_BIT | QAIF_DMACFG_SHRAM_WM_MASK,
> + QAIF_DMACFG_BURST4_BIT | QAIF_DMACTL_WM_5);
> + if (ret)
> + dev_err(soc_runtime->dev, "error updating DMA CFG: %d\n", ret);
[Severity: Low]
Is the use of QAIF_DMACTL_WM_5 intentional here? It appears to be a constant
meant for a DMACTL register, but it is being supplied to a DMACFG register
operation (qaif_dmacfg_reg).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928-b4-qaif-shikra-audio-v8-0-ac618057fe85@oss.qualcomm.com?part=7
next prev parent reply other threads:[~2026-09-28 13:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 12:52 [PATCH v8 00/10] ASoC: qcom: Add QAIF driver for Shikra audio platform Harendra Gautam
2026-09-28 12:52 ` [PATCH v8 01/10] ASoC: dt-bindings: qcom,shikra-qaif-cpu: Add binding Harendra Gautam
2026-09-28 13:01 ` sashiko-bot
2026-10-06 14:16 ` Rob Herring
2026-09-28 12:52 ` [PATCH v8 02/10] ASoC: qcom: Add QAIF shared data structures and variant interface Harendra Gautam
2026-09-28 12:52 ` [PATCH v8 03/10] ASoC: qcom: Add QAIF hardware register map Harendra Gautam
2026-09-28 13:03 ` sashiko-bot
2026-09-28 12:52 ` [PATCH v8 04/10] ASoC: qcom: Add QAIF CPU DAI ops, regmap, DT parsing and platform init Harendra Gautam
2026-09-28 13:04 ` sashiko-bot
2026-09-28 12:52 ` [PATCH v8 05/10] ASoC: soc-core: Add snd_soc_of_xlate_dai_name() generic helper Harendra Gautam
2026-09-28 12:52 ` [PATCH v8 06/10] ASoC: qcom: Switch lpass-cpu and qaif-cpu to snd_soc_of_xlate_dai_name() Harendra Gautam
2026-09-28 12:52 ` [PATCH v8 07/10] ASoC: qcom: Add QAIF PCM operations Harendra Gautam
2026-09-28 13:07 ` sashiko-bot [this message]
2026-09-28 12:52 ` [PATCH v8 08/10] ASoC: qcom: Add QAIF IRQ handling and platform register Harendra Gautam
2026-09-28 13:04 ` sashiko-bot
2026-09-29 11:36 ` Ajay Kumar Nandam
2026-09-30 5:28 ` Harendra Gautam
2026-09-28 12:52 ` [PATCH v8 09/10] ASoC: qcom: Add Shikra QAIF support Harendra Gautam
2026-09-28 12:53 ` [PATCH v8 10/10] MAINTAINERS: Add Qualcomm QAIF driver entry 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=20260928130746.89CDF1F000FF@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