diff options
author | Mark Brown <broonie@kernel.org> | 2023-01-18 15:33:51 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-01-18 15:33:51 +0000 |
commit | 309d401452b96f23abe2572d290c51c548d9f728 (patch) | |
tree | 28aae1adcf60a890dcf17c676b241db07bef98c1 /sound/soc/sof/pm.c | |
parent | 24b401f3e0b1ddd269969e68e947ab0a6f89b017 (diff) | |
parent | c1619ea22d9509cfbcf5c2c1cc65563179e9dc8e (diff) | |
download | lwn-309d401452b96f23abe2572d290c51c548d9f728.tar.gz lwn-309d401452b96f23abe2572d290c51c548d9f728.zip |
ASoC: Merge up 6.2 fixes
To resolve a conflict and support further development.
Diffstat (limited to 'sound/soc/sof/pm.c')
-rw-r--r-- | sound/soc/sof/pm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c index e7fce9e4a0d2..8d3383085d12 100644 --- a/sound/soc/sof/pm.c +++ b/sound/soc/sof/pm.c @@ -182,7 +182,7 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) const struct sof_ipc_pm_ops *pm_ops = sof_ipc_get_ops(sdev, pm); const struct sof_ipc_tplg_ops *tplg_ops = sof_ipc_get_ops(sdev, tplg); pm_message_t pm_state; - u32 target_state = 0; + u32 target_state = snd_sof_dsp_power_target(sdev); int ret; /* do nothing if dsp suspend callback is not set */ @@ -192,6 +192,9 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) if (runtime_suspend && !sof_ops(sdev)->runtime_suspend) return 0; + if (tplg_ops && tplg_ops->tear_down_all_pipelines) + tplg_ops->tear_down_all_pipelines(sdev, false); + if (sdev->fw_state != SOF_FW_BOOT_COMPLETE) goto suspend; @@ -206,7 +209,6 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) } } - target_state = snd_sof_dsp_power_target(sdev); pm_state.event = target_state; /* Skip to platform-specific suspend if DSP is entering D0 */ @@ -217,9 +219,6 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) goto suspend; } - if (tplg_ops->tear_down_all_pipelines) - tplg_ops->tear_down_all_pipelines(sdev, false); - /* suspend DMA trace */ sof_fw_trace_suspend(sdev, pm_state); |