summaryrefslogtreecommitdiff
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2020-06-10 19:15:59 +0300
committerDaniel Baluta <daniel.baluta@nxp.com>2020-06-11 16:50:22 +0300
commit95ae3b68a0e1d115246665f80ddfc7691f9c2f83 (patch)
tree493dc4af9332f5f1df248c6941ed4909af355977 /sound/soc/sof
parent6de95177888509d564975699ba51f7515d28af1f (diff)
MLK-24263-6 ASOC: SOF: Do not boot the DSP when no user requested it
SOF core will not call device specific System suspend if the DSP is not booted (this is mostly because the way PCI handles PM, which before system suspend it activates the devices calling runtime resume). So, in case we use OF we need to make sure that a simple system suspend/resume cycle where the DSP is already off will not turn on the DSP. This part was completely re-written in the upstream kernel, and this change is just a summary of the changes in upstream. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/pm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c
index 128680b09c20..789ed6a28ed7 100644
--- a/sound/soc/sof/pm.c
+++ b/sound/soc/sof/pm.c
@@ -290,6 +290,9 @@ static int sof_resume(struct device *dev, bool runtime_resume)
return ret;
}
+ if (!runtime_resume && pm_runtime_suspended(sdev->dev))
+ return 0;
+
sdev->fw_state = SOF_FW_BOOT_PREPARE;
/* load the firmware */