From: sashiko-bot@kernel.org
To: "Harendra Gautam" <harendra.gautam@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v7 04/10] ASoC: qcom: Add QAIF CPU DAI ops, regmap, DT parsing and platform init
Date: Wed, 23 Sep 2026 07:02:01 +0000 [thread overview]
Message-ID: <20260923070201.813801F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260923-b4-qaif-shikra-audio-v7-4-d5b6f056568e@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] soc: qcom: qaif: stream clocks left enabled during system suspend
--
commit 9b2ed711801920b93b0556d83c037043032dc672
Author: Harendra Gautam <harendra.gautam@oss.qualcomm.com>
Subject: ASoC: qcom: Add QAIF CPU DAI ops, regmap, DT parsing and platform init
This commit adds the QAIF CPU DAI driver to support Qualcomm audio interface
paths. It implements CIF and AIF DAI operations, MMIO regmap setup, DT
parsing, clock management, and platform registration.
> diff --git a/sound/soc/qcom/qaif-cpu.c b/sound/soc/qcom/qaif-cpu.c
> new file mode 100644
> index 0000000000000..e1868dc95cf4f
> --- /dev/null
> +++ b/sound/soc/qcom/qaif-cpu.c
[ ... ]
> +static int qaif_aif_cpu_daiops_startup(struct snd_pcm_substream *substream,
> + struct snd_soc_dai *dai)
> +{
> + struct qaif_drv_data *drvdata = snd_soc_dai_get_drvdata(dai);
> + const struct qaif_variant *v = drvdata->variant;
> + int idx, ret;
> +
> + idx = v->get_dma_idx(dai->driver->id);
> + if (idx < 0) {
> + dev_err(dai->dev, "Invalid DMA index: %d\n", idx);
> + return -EINVAL;
> + }
> +
> + ret = clk_prepare_enable(drvdata->aud_dma_clk);
> + if (ret) {
> + dev_err(dai->dev, "error enabling aud_dma clk: %d\n", ret);
> + return ret;
> + }
> +
> + ret = clk_prepare_enable(drvdata->aud_dma_mem_clk);
> + if (ret) {
> + dev_err(dai->dev, "error enabling aud_dma_mem clk: %d\n", ret);
> + clk_disable_unprepare(drvdata->aud_dma_clk);
> + return ret;
> + }
> +
> + ret = clk_prepare_enable(drvdata->mi2s_bit_clk[idx]);
> + if (ret) {
> + dev_err(dai->dev, "error enabling mi2s bit clk: %d\n", ret);
> + clk_disable_unprepare(drvdata->aud_dma_mem_clk);
> + clk_disable_unprepare(drvdata->aud_dma_clk);
> + }
> + return ret;
> +}
[ ... ]
> +static int qaif_aif_cpu_daiops_trigger(struct snd_pcm_substream *substream,
> + int cmd, struct snd_soc_dai *dai)
> +{
[ ... ]
> + switch (cmd) {
> + case SNDRV_PCM_TRIGGER_START:
> + case SNDRV_PCM_TRIGGER_RESUME:
> + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
> + ret = regmap_update_bits(drvdata->audio_qaif_map,
> + QAIF_AUD_INTF_CTL_REG(idx), enable_bit, enable_bit);
> + if (ret)
> + dev_err(dai->dev, "error setting AIF enable bit: %d\n", ret);
> + return ret;
> + case SNDRV_PCM_TRIGGER_STOP:
> + case SNDRV_PCM_TRIGGER_SUSPEND:
> + case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
> + ret = regmap_update_bits(drvdata->audio_qaif_map,
> + QAIF_AUD_INTF_CTL_REG(idx), enable_bit, 0);
> + if (ret)
> + dev_err(dai->dev, "error clearing AIF enable bit: %d\n", ret);
> + return ret;
[ ... ]
> +static int asoc_qcom_qaif_runtime_suspend(struct device *dev)
> +{
> + struct qaif_drv_data *drvdata = dev_get_drvdata(dev);
> +
> + clk_bulk_disable_unprepare(drvdata->num_clks, drvdata->clks);
[Severity: Medium]
Will this leave stream-specific clocks enabled during system suspend if an
audio stream is active?
When an audio stream is active, qaif_aif_cpu_daiops_startup() explicitly
prepares and enables aud_dma_clk, aud_dma_mem_clk, and mi2s_bit_clk.
If a user initiates system suspend while the stream is active, ASoC issues
SNDRV_PCM_TRIGGER_SUSPEND to halt the stream but does not call
qaif_aif_cpu_daiops_shutdown(). The qaif_aif_cpu_daiops_trigger() callback
handles the suspend trigger but does not disable these stream-specific clocks.
Furthermore, pm_runtime_force_suspend() calls asoc_qcom_qaif_runtime_suspend(),
which only disables the bulk clocks (drvdata->clks).
Could this result in the stream-specific AP clock votes remaining asserted,
potentially blocking the system power manager (RPM/RPMh) from entering deep
sleep (S3)?
> + return 0;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923-b4-qaif-shikra-audio-v7-0-d5b6f056568e@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-09-23 7:02 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 [this message]
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
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=20260923070201.813801F00893@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