mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Shawn Guo <shengchao.guo@oss.qualcomm.com>,
	Srinivas Kandagatla <srini@kernel.org>,
	Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Mohit Sharma <mohit.sharma@oss.qualcomm.com>,
	Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>,
	Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] ASoC: qcom: qdsp6: Fix audio after an ADSP restart
Date: Tue, 1 Dec 2026 17:34:43 +0000	[thread overview]
Message-ID: <52d7d6ab-bb67-48b3-ae13-8805f7ad7442@oss.qualcomm.com> (raw)
In-Reply-To: <20261130075333.43354-1-shengchao.guo@oss.qualcomm.com>

On 11/30/26 7:53 AM, Shawn Guo wrote:
> On Qualcomm Nord, audio does not come back after an ADSP restart
> (echo stop/start > /sys/class/remoteproc/remoteproc0/state). There are
> two separate problems:
> 
Thanks Shawn for the patchset,

I tried it on my Glymur CRD, i get errors, are you not hitting similar
errors? Are you using any other patches along with this series?

root@qemuarm64:/sys/class/remoteproc/remoteproc1# echo stop>state
[   71.732839] qcom-sm8650-lpass-lpi-pinctrl 7760000.pinctrl:
__pm_clk_enable: failed to enable clk 0000000050f780eb, error -5
[   71.732862] wcd9378 sdw:3:0:0217:0110:00:3: IRQ sync failed to
resume: -16
[   71.732872] qcom-sm8650-lpass-lpi-pinctrl 7760000.pinctrl:
__pm_clk_enable: failed to enable clk 0000000050f780eb, error -5
[   71.732881] wcd9378 sdw:3:0:0217:0110:00:3: IRQ sync failed to
resume: -16
[   71.845564] remoteproc remoteproc1: stopped remote processor adsp
root@qemuarm64:/sys/class/remoteproc/remoteproc1#
root@qemuarm64:/sys/class/remoteproc/remoteproc1#
root@qemuarm64:/sys/class/remoteproc/remoteproc1# echo start>state
[   78.314896] remoteproc remoteproc1: powering up adsp
[   78.317251] remoteproc remoteproc1: Booting fw image
qcom/glymur/adsp.mbn, size 19781592
root@qemuarm64:/sys/class/remoteproc/remoteproc1# [   78.736970]
remoteproc remoteproc1: remote processor adsp is now up
[   78.737837] failed to announce new service
[   78.737843] failed while handling packet from 5:-2
[   78.758165] qcom,fastrpc
6800000.remoteproc:glink-edge.fastrpcglink-apps-dsp.-1.-1: reserved
memory is beyond device's set DMA address range
[   78.758218] qcom,fastrpc
6800000.remoteproc:glink-edge.fastrpcglink-apps-dsp.-1.-1: assigned
reserved memory node adsp-rpc-remote-heap
[   78.758405] platform
6800000.remoteproc:glink-edge:fastrpc:compute-cb@3: Adding to iommu group 36
[   78.759481] platform
6800000.remoteproc:glink-edge:fastrpc:compute-cb@4: Adding to iommu group 37
[   78.760363] platform
6800000.remoteproc:glink-edge:fastrpc:compute-cb@5: Adding to iommu group 38
[   78.761047] platform
6800000.remoteproc:glink-edge:fastrpc:compute-cb@6: Adding to iommu group 39
[   78.761748] platform
6800000.remoteproc:glink-edge:fastrpc:compute-cb@7: Adding to iommu group 40
[   78.762390] platform
6800000.remoteproc:glink-edge:fastrpc:compute-cb@8: Adding to iommu group 41
[   78.772502] PDR: Indication received from msm/adsp/audio_pd, state:
0x1fffffff, trans-id: 1
[   78.772557] qcom,apr 6800000.remoteproc:glink-edge.adsp_apps.-1.-1:
Adding APR/GPR dev: gprsvc:service:2:1

root@qemuarm64:/sys/class/remoteproc/remoteproc1#




>  - The sound card takes 5 seconds to come back. The q6apm GPR service
>    probes about 0.5 ms after remoteproc reports the DSP up, which is
>    too early for SPF. SPF drops the command without replying, and
>    apm_probe() waits out the 5 second command timeout before the card
>    can bind. If the card binds earlier than that, its shared memory map
>    times out and the card fails to come up.
> 
>  - Once the card is back, playback fails:
> 
>      pcm1681 0-004c: Failed to enable sck: -6
> 
>    The q6prm clock controller is a child of the q6prm GPR device, so it
>    is unregistered when the DSP stops. Its consumers stay bound, and
>    their clk handles are left pointing at clk_nodrv_ops. In addition,
>    the DSP forgets every clock request and vote when it stops, so
>    clocks that consumers held prepared across the restart are no
>    longer running.
> 
> Patch 1 polls SPF with a short per-command timeout before q6apm
> registers its component.
> 
> Patch 2 makes q6dsp-lpass-clocks track prepared clocks, and adds
> q6dsp_clock_dsp_down()/q6dsp_clock_dsp_up() so the DSP service driver
> can mark them lost and request them again. On its own, it does not
> change behaviour.
> 
> Patch 3 makes q6prm keep the clock controller device across DSP
> restarts, parented to the remoteproc platform device, and calls the
> new helpers from its probe and remove functions. No DT or binding
> changes are needed.
> 
> Changes for v2:
> - Rebase on next-20261127
> - Patch 3: Explain in the commit message why correcting the fw_devlink
>   supplier of the clock consumers does not help (Srini)
> - Link to v1: https://lore.kernel.org/all/20261115032027.414953-1-shengchao.guo@oss.qualcomm.com/
> 
> Shawn Guo (3):
>   ASoC: qcom: q6apm: Wait for SPF to be ready before registering
>   ASoC: qcom: q6dsp-lpass-clocks: Restore clocks after a DSP restart
>   ASoC: qcom: q6prm: Keep the clock controller across DSP restarts
> 
>  sound/soc/qcom/Kconfig                    |   1 +
>  sound/soc/qcom/qdsp6/q6apm.c              |  50 +++++-
>  sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c | 147 ++++++++++++++---
>  sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.h |   2 +
>  sound/soc/qcom/qdsp6/q6prm.c              | 190 ++++++++++++++++++++--
>  5 files changed, 350 insertions(+), 40 deletions(-)
> 


      parent reply	other threads:[~2026-12-01 17:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  7:53 Shawn Guo
2026-11-30  7:53 ` [PATCH v2 1/3] ASoC: qcom: q6apm: Wait for SPF to be ready before registering Shawn Guo
2026-11-30  7:53 ` [PATCH v2 2/3] ASoC: qcom: q6dsp-lpass-clocks: Restore clocks after a DSP restart Shawn Guo
2026-11-30  7:53 ` [PATCH v2 3/3] ASoC: qcom: q6prm: Keep the clock controller across DSP restarts Shawn Guo
2026-12-01 10:55 ` [PATCH v2 0/3] ASoC: qcom: qdsp6: Fix audio after an ADSP restart Ajay Kumar Nandam
2026-12-01 17:34 ` Srinivas Kandagatla [this message]

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=52d7d6ab-bb67-48b3-ae13-8805f7ad7442@oss.qualcomm.com \
    --to=srinivas.kandagatla@oss.qualcomm.com \
    --cc=ajay.nandam@oss.qualcomm.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mohit.sharma@oss.qualcomm.com \
    --cc=perex@perex.cz \
    --cc=prasad.kumpatla@oss.qualcomm.com \
    --cc=shengchao.guo@oss.qualcomm.com \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    /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

all inboxes | Powered by JetHome®