mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
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> 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>
This commit is contained in:
parent
8f0b4cce44
commit
b8e54b447c
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user