]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SOF: ipc4-loader: Remove redundant rpm resume_and_get from load_library
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Mon, 15 Dec 2025 13:29:39 +0000 (15:29 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 15 Dec 2025 14:07:40 +0000 (23:07 +0900)
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>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20251215132946.2155-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-loader.c

index b0d293f62d1cf6271c3cb52b44036b337e03ec36..07a78cb3c25c36b6c8e6bf12a4ef49635d348f97 100644 (file)
@@ -175,7 +175,7 @@ static int sof_ipc4_load_library(struct snd_sof_dev *sdev, unsigned long lib_id,
        struct sof_ipc4_fw_data *ipc4_data = sdev->private;
        struct sof_ipc4_fw_library *fw_lib;
        ssize_t payload_offset;
-       int ret, i, err;
+       int ret, i;
 
        if (!ipc4_data->load_library) {
                dev_err(sdev->dev, "Library loading is not supported on this platform\n");
@@ -223,24 +223,7 @@ static int sof_ipc4_load_library(struct snd_sof_dev *sdev, unsigned long lib_id,
        for (i = 0; i < fw_lib->num_modules; i++)
                fw_lib->modules[i].man4_module_entry.id |= (lib_id << SOF_IPC4_MOD_LIB_ID_SHIFT);
 
-       /*
-        * Make sure that the DSP is booted and stays up while attempting the
-        * loading the library for the first time
-        */
-       ret = pm_runtime_resume_and_get(sdev->dev);
-       if (ret < 0 && ret != -EACCES) {
-               dev_err_ratelimited(sdev->dev, "%s: pm_runtime resume failed: %d\n",
-                                   __func__, ret);
-               goto release;
-       }
-
        ret = ipc4_data->load_library(sdev, fw_lib, false);
-
-       err = pm_runtime_put_autosuspend(sdev->dev);
-       if (err < 0)
-               dev_err_ratelimited(sdev->dev, "%s: pm_runtime idle failed: %d\n",
-                                   __func__, err);
-
        if (ret)
                goto release;