From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Ravi Hothi <ravi.hothi@oss.qualcomm.com>,
Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Cc: linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
mohammad.rafi.shaik@oss.qualcomm.com,
ajay.nandam@oss.qualcomm.com, stable@vger.kernel.org
Subject: Re: [PATCH v1] ASoC: qcom: qdsp6: Fix q6apm remove ordering during ADSP stop and start
Date: Wed, 4 Mar 2026 13:11:07 +0000 [thread overview]
Message-ID: <968169e5-59c4-476b-b656-cc10049dcfdc@oss.qualcomm.com> (raw)
In-Reply-To: <20260227144534.278568-1-ravi.hothi@oss.qualcomm.com>
Thanks Ravi for fixing this,
On 2/27/26 2:45 PM, Ravi Hothi wrote:
> During ADSP stop and start, the kernel crashes due to the order in which
> ASoC components are removed.
>
> On ADSP stop, the q6apm-audio .remove callback unloads topology and removes
> PCM runtimes during ASoC teardown. This deletes the RTDs that contain the
> q6apm DAI components before their removal pass runs, leaving those
> components still linked to the card and causing crashes on the next rebind.
>
> Fix this by ensuring that all dependent (child) components are removed
> first, and the q6apm component is removed last.
>
> [ 48.105720] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000d0
> [ 48.114763] Mem abort info:...
...
this has been an issue for a long time, hopefully with this patch, we
can get the card rebind working audioreach with all the lpass codecs.
> Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ravi Hothi <ravi.hothi@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
--srini
> ---
> sound/soc/qcom/qdsp6/q6apm-dai.c | 1 +
> sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 1 +
> sound/soc/qcom/qdsp6/q6apm.c | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
> index de3bdac3e791..168c166c960d 100644
> --- a/sound/soc/qcom/qdsp6/q6apm-dai.c
> +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
> @@ -838,6 +838,7 @@ static const struct snd_soc_component_driver q6apm_fe_dai_component = {
> .ack = q6apm_dai_ack,
> .compress_ops = &q6apm_dai_compress_ops,
> .use_dai_pcm_id = true,
> + .remove_order = SND_SOC_COMP_ORDER_EARLY,
> };
>
> static int q6apm_dai_probe(struct platform_device *pdev)
> diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
> index 528756f1332b..5be37eeea329 100644
> --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
> +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
> @@ -278,6 +278,7 @@ static const struct snd_soc_component_driver q6apm_lpass_dai_component = {
> .of_xlate_dai_name = q6dsp_audio_ports_of_xlate_dai_name,
> .be_pcm_base = AUDIOREACH_BE_PCM_BASE,
> .use_dai_pcm_id = true,
> + .remove_order = SND_SOC_COMP_ORDER_FIRST,
> };
>
> static int q6apm_lpass_dai_dev_probe(struct platform_device *pdev)
> diff --git a/sound/soc/qcom/qdsp6/q6apm.c b/sound/soc/qcom/qdsp6/q6apm.c
> index 44841fde3856..970b08c89bb3 100644
> --- a/sound/soc/qcom/qdsp6/q6apm.c
> +++ b/sound/soc/qcom/qdsp6/q6apm.c
> @@ -715,6 +715,7 @@ static const struct snd_soc_component_driver q6apm_audio_component = {
> .name = APM_AUDIO_DRV_NAME,
> .probe = q6apm_audio_probe,
> .remove = q6apm_audio_remove,
> + .remove_order = SND_SOC_COMP_ORDER_LAST,
> };
>
> static int apm_probe(gpr_device_t *gdev)
next prev parent reply other threads:[~2026-03-04 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 14:45 [PATCH v1] ASoC: qcom: qdsp6: Fix q6apm remove ordering during ADSP stop and start Ravi Hothi
2026-03-04 13:11 ` Srinivas Kandagatla [this message]
2026-03-09 15:12 ` Mark Brown
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=968169e5-59c4-476b-b656-cc10049dcfdc@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=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=ravi.hothi@oss.qualcomm.com \
--cc=srini@kernel.org \
--cc=stable@vger.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