pm.c (83f48ad508b0539f4a1737a1a125d1b66191dbc3) pm.c (1dedbe4f223cac603e871d91133b9aa3136fbc21)
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2//
3// This file is provided under a dual BSD/GPLv2 license. When using or
4// redistributing this file, you may do so under either license.
5//
6// Copyright(c) 2018 Intel Corporation. All rights reserved.
7//
8// Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>

--- 93 unchanged lines hidden (view full) ---

102
103 /*
104 * Nothing further to be done for platforms that support the low power
105 * D0 substate. Resume trace and return when resuming from
106 * low-power D0 substate
107 */
108 if (!runtime_resume && sof_ops(sdev)->set_power_state &&
109 old_state == SOF_DSP_PM_D0) {
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2//
3// This file is provided under a dual BSD/GPLv2 license. When using or
4// redistributing this file, you may do so under either license.
5//
6// Copyright(c) 2018 Intel Corporation. All rights reserved.
7//
8// Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>

--- 93 unchanged lines hidden (view full) ---

102
103 /*
104 * Nothing further to be done for platforms that support the low power
105 * D0 substate. Resume trace and return when resuming from
106 * low-power D0 substate
107 */
108 if (!runtime_resume && sof_ops(sdev)->set_power_state &&
109 old_state == SOF_DSP_PM_D0) {
110 ret = snd_sof_trace_resume(sdev);
110 ret = sof_fw_trace_resume(sdev);
111 if (ret < 0)
112 /* non fatal */
113 dev_warn(sdev->dev,
114 "failed to enable trace after resume %d\n", ret);
115 return 0;
116 }
117
118 sof_set_fw_state(sdev, SOF_FW_BOOT_PREPARE);

--- 19 unchanged lines hidden (view full) ---

138 dev_err(sdev->dev,
139 "error: failed to boot DSP firmware after resume %d\n",
140 ret);
141 sof_set_fw_state(sdev, SOF_FW_BOOT_FAILED);
142 return ret;
143 }
144
145 /* resume DMA trace */
111 if (ret < 0)
112 /* non fatal */
113 dev_warn(sdev->dev,
114 "failed to enable trace after resume %d\n", ret);
115 return 0;
116 }
117
118 sof_set_fw_state(sdev, SOF_FW_BOOT_PREPARE);

--- 19 unchanged lines hidden (view full) ---

138 dev_err(sdev->dev,
139 "error: failed to boot DSP firmware after resume %d\n",
140 ret);
141 sof_set_fw_state(sdev, SOF_FW_BOOT_FAILED);
142 return ret;
143 }
144
145 /* resume DMA trace */
146 ret = snd_sof_trace_resume(sdev);
146 ret = sof_fw_trace_resume(sdev);
147 if (ret < 0) {
148 /* non fatal */
149 dev_warn(sdev->dev,
150 "warning: failed to init trace after resume %d\n",
151 ret);
152 }
153
154 /* restore pipelines */

--- 48 unchanged lines hidden (view full) ---

203 }
204 }
205
206 target_state = snd_sof_dsp_power_target(sdev);
207 pm_state.event = target_state;
208
209 /* Skip to platform-specific suspend if DSP is entering D0 */
210 if (target_state == SOF_DSP_PM_D0) {
147 if (ret < 0) {
148 /* non fatal */
149 dev_warn(sdev->dev,
150 "warning: failed to init trace after resume %d\n",
151 ret);
152 }
153
154 /* restore pipelines */

--- 48 unchanged lines hidden (view full) ---

203 }
204 }
205
206 target_state = snd_sof_dsp_power_target(sdev);
207 pm_state.event = target_state;
208
209 /* Skip to platform-specific suspend if DSP is entering D0 */
210 if (target_state == SOF_DSP_PM_D0) {
211 snd_sof_trace_suspend(sdev, pm_state);
211 sof_fw_trace_suspend(sdev, pm_state);
212 /* Notify clients not managed by pm framework about core suspend */
213 sof_suspend_clients(sdev, pm_state);
214 goto suspend;
215 }
216
217 if (tplg_ops->tear_down_all_pipelines)
218 tplg_ops->tear_down_all_pipelines(sdev, false);
219
220 /* suspend DMA trace */
212 /* Notify clients not managed by pm framework about core suspend */
213 sof_suspend_clients(sdev, pm_state);
214 goto suspend;
215 }
216
217 if (tplg_ops->tear_down_all_pipelines)
218 tplg_ops->tear_down_all_pipelines(sdev, false);
219
220 /* suspend DMA trace */
221 snd_sof_trace_suspend(sdev, pm_state);
221 sof_fw_trace_suspend(sdev, pm_state);
222
223 /* Notify clients not managed by pm framework about core suspend */
224 sof_suspend_clients(sdev, pm_state);
225
226#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE)
227 /* cache debugfs contents during runtime suspend */
228 if (runtime_suspend)
229 sof_cache_debugfs(sdev);

--- 123 unchanged lines hidden ---
222
223 /* Notify clients not managed by pm framework about core suspend */
224 sof_suspend_clients(sdev, pm_state);
225
226#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE)
227 /* cache debugfs contents during runtime suspend */
228 if (runtime_suspend)
229 sof_cache_debugfs(sdev);

--- 123 unchanged lines hidden ---