Skip to content

Commit c58a266

Browse files
committed
ASoC: SOF: ipc4-loader: Remove redundant rpm resume_and_get from load_library
The initial library loading is happening during topology loading, which is already protected with pm_runtime_resume_and_get() via pcm.c The redundant rpm code can be dropped from sof_ipc4_load_library() Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 5e06d62 commit c58a266

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

sound/soc/sof/ipc4-loader.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int sof_ipc4_load_library(struct snd_sof_dev *sdev, unsigned long lib_id,
184184
struct sof_ipc4_fw_data *ipc4_data = sdev->private;
185185
struct sof_ipc4_fw_library *fw_lib;
186186
ssize_t payload_offset;
187-
int ret, i, err;
187+
int ret, i;
188188

189189
if (!ipc4_data->load_library) {
190190
dev_err(sdev->dev, "Library loading is not supported on this platform\n");
@@ -232,25 +232,7 @@ static int sof_ipc4_load_library(struct snd_sof_dev *sdev, unsigned long lib_id,
232232
for (i = 0; i < fw_lib->num_modules; i++)
233233
fw_lib->modules[i].man4_module_entry.id |= (lib_id << SOF_IPC4_MOD_LIB_ID_SHIFT);
234234

235-
/*
236-
* Make sure that the DSP is booted and stays up while attempting the
237-
* loading the library for the first time
238-
*/
239-
ret = pm_runtime_resume_and_get(sdev->dev);
240-
if (ret < 0 && ret != -EACCES) {
241-
dev_err_ratelimited(sdev->dev, "%s: pm_runtime resume failed: %d\n",
242-
__func__, ret);
243-
goto release;
244-
}
245-
246235
ret = ipc4_data->load_library(sdev, fw_lib, false);
247-
248-
pm_runtime_mark_last_busy(sdev->dev);
249-
err = pm_runtime_put_autosuspend(sdev->dev);
250-
if (err < 0)
251-
dev_err_ratelimited(sdev->dev, "%s: pm_runtime idle failed: %d\n",
252-
__func__, err);
253-
254236
if (ret)
255237
goto release;
256238

0 commit comments

Comments
 (0)