summaryrefslogtreecommitdiff
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2020-06-10 19:58:22 +0300
committerDaniel Baluta <daniel.baluta@nxp.com>2020-06-11 16:50:22 +0300
commitf7b437ebaa48611ff54893e61aa3ca88eb2360c4 (patch)
tree69398f4679a932fbcc88a5518f8f392023019c47 /sound/soc/sof
parent95ae3b68a0e1d115246665f80ddfc7691f9c2f83 (diff)
MLK-24263-7 ASoC: SOF: Activate runtime PM with SOF OF device
SOF boots the DSP at probe and keeps it up all the time. With this change, after booting if no one is using the DSP the SOF core will turn off the DSP to save power. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/sof-of-dev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index d02e2133ebcd..befa35ba492f 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -58,7 +58,11 @@ static void sof_of_probe_complete(struct device *dev)
/* allow runtime_pm */
pm_runtime_set_autosuspend_delay(dev, SND_SOF_SUSPEND_DELAY_MS);
pm_runtime_use_autosuspend(dev);
+ pm_runtime_set_active(dev);
pm_runtime_enable(dev);
+
+ pm_runtime_mark_last_busy(dev);
+ pm_runtime_put_autosuspend(dev);
}
int sof_of_parse(struct platform_device *pdev)