[PATCH 05/28] alsa: pcm: Remove the qos request only if active
James Calligeros
jcalligeros99 at gmail.com
Sat Sep 19 21:53:44 PDT 2026
From: Hector Martin <marcan at marcan.st>
Fixes warning:
[ 8.502802] ------------[ cut here ]------------
[ 8.503445] cpu_latency_qos_remove_request called for unknown object
[ 8.504269] WARNING: CPU: 5 PID: 2790 at kernel/power/qos.c:322 cpu_latency_qos_remove_request+0x48/0x98
[ 8.505499] CPU: 5 PID: 2790 Comm: wireplumber Tainted: G W 6.5.0-asahi-00708-gb9b88240f7ae #2291
[ 8.506777] Hardware name: Apple MacBook Air (13-inch, M2, 2022) (DT)
<snip regs>
[ 8.519099] Call trace:
[ 8.519402] cpu_latency_qos_remove_request+0x48/0x98
[ 8.520027] snd_pcm_ioctl+0x86c/0x182c
[ 8.520519] __arm64_sys_ioctl+0xf8/0xbd0
[ 8.521020] invoke_syscall.constprop.0+0x78/0xc8
[ 8.521604] do_el0_svc+0x58/0x154
[ 8.522026] el0_svc+0x34/0xe4
[ 8.522409] el0t_64_sync_handler+0x120/0x12c
[ 8.522951] el0t_64_sync+0x190/0x194
[ 8.523408] ---[ end trace 0000000000000000 ]---
Fixes: 5371a79be97c ("sound: Call cpu_latency_qos_*() instead of pm_qos_*()")
Signed-off-by: Hector Martin <marcan at marcan.st>
Signed-off-by: James Calligeros <jcalligeros99 at gmail.com>
---
sound/core/pcm_native.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 6d32c12fb79b..88c83e5fd6cf 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -971,8 +971,9 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream)
goto unlock;
result = do_hw_free(substream);
snd_pcm_set_state(substream, SNDRV_PCM_STATE_OPEN);
- cpu_latency_qos_remove_request(&substream->latency_pm_qos_req);
- unlock:
+ if (cpu_latency_qos_request_active(&substream->latency_pm_qos_req))
+ cpu_latency_qos_remove_request(&substream->latency_pm_qos_req);
+unlock:
snd_pcm_buffer_access_unlock(runtime);
return result;
}
--
2.55.0
More information about the linux-arm-kernel
mailing list