[PATCH v2 2/2] ASoC: rockchip: rockchip_sai: Fix runtime PM state after manual resume

From: phucduc . bui

Date: Wed Jul 22 2026 - 07:59:40 EST


From: bui duc phuc <phucduc.bui@xxxxxxxxx>

Probe manually resumes the device after pm_runtime_get_noresume().
Since the PM core is bypassed, runtime_status remains RPM_SUSPENDED even
though the hardware is active. A subsequent pm_runtime_put() therefore
skips runtime_suspend(), leaving the device permanently powered and
preventing autosuspend.

Fix this by calling pm_runtime_set_active() after the manual resume
succeeds, and defer pm_runtime_enable() until after the device has been
manually resumed and marked active. Also call pm_runtime_put_noidle()
on error to drop the usage count acquired by pm_runtime_get_noresume().

Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/rockchip/rockchip_sai.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/rockchip/rockchip_sai.c b/sound/soc/rockchip/rockchip_sai.c
index 9a80e120dbda..55d17536c3b5 100644
--- a/sound/soc/rockchip/rockchip_sai.c
+++ b/sound/soc/rockchip/rockchip_sai.c
@@ -1474,11 +1474,14 @@ static int rockchip_sai_probe(struct platform_device *pdev)
*
* NB: we don't rely on _resume_and_get in case of !CONFIG_PM
*/
- devm_pm_runtime_enable(&pdev->dev);
pm_runtime_get_noresume(&pdev->dev);
ret = rockchip_sai_runtime_resume(&pdev->dev);
- if (ret)
+ if (ret) {
+ pm_runtime_put_noidle(&pdev->dev);
return dev_err_probe(&pdev->dev, ret, "Failed to resume device\n");
+ }
+ pm_runtime_set_active(&pdev->dev);
+ devm_pm_runtime_enable(&pdev->dev);

ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
if (ret) {
--
2.43.0