From 95ae3b68a0e1d115246665f80ddfc7691f9c2f83 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Wed, 10 Jun 2020 19:15:59 +0300 Subject: [PATCH] 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 --- sound/soc/sof/pm.c | 3 +++ 1 file changed, 3 insertions(+) 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 */