From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To: lgirdwood@gmail.com, broonie@kernel.org
Cc: linux-sound@vger.kernel.org, kai.vehmanen@linux.intel.com,
ranjani.sridharan@linux.intel.com,
yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.dev,
liam.r.girdwood@intel.com
Subject: [PATCH 1/8] ASoC: SOF: ipc4-loader: Remove redundant rpm resume_and_get from load_library
Date: Mon, 15 Dec 2025 15:29:39 +0200 [thread overview]
Message-ID: <20251215132946.2155-2-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20251215132946.2155-1-peter.ujfalusi@linux.intel.com>
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>
---
sound/soc/sof/ipc4-loader.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/sound/soc/sof/ipc4-loader.c b/sound/soc/sof/ipc4-loader.c
index b0d293f62d1c..07a78cb3c25c 100644
--- a/sound/soc/sof/ipc4-loader.c
+++ b/sound/soc/sof/ipc4-loader.c
@@ -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;
--
2.52.0
next prev parent reply other threads:[~2025-12-15 13:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 13:29 [PATCH 0/8] ASoC: SOF: Support for on-demand DSP boot Peter Ujfalusi
2025-12-15 13:29 ` Peter Ujfalusi [this message]
2025-12-15 13:29 ` [PATCH 2/8] ASoC: SOF: control: skip rpm calls in ext_volatile_get if not implemented Peter Ujfalusi
2025-12-15 13:29 ` [PATCH 3/8] ASoC: SOF: Add support for on-demand DSP boot Peter Ujfalusi
2025-12-15 13:29 ` [PATCH 4/8] ASoC: SOF: sof-client: " Peter Ujfalusi
2025-12-15 13:29 ` [PATCH 5/8] ASoC: SOF: Intel: hda-sdw-bpt: " Peter Ujfalusi
2025-12-15 13:29 ` [PATCH 6/8] ASoC: SOF: Intel: pci-lnl: Set on_demand_dsp_boot for LNL Peter Ujfalusi
2025-12-15 13:29 ` [PATCH 7/8] ASoC: SOF: Intel: pci-ptl: Set on_demand_dsp_boot for PTL and WCL Peter Ujfalusi
2025-12-15 13:29 ` [PATCH 8/8] ASoC: SOF: Intel: pci-nvl: Set on_demand_dsp_boot for NVL-S Peter Ujfalusi
2025-12-16 19:55 ` [PATCH 0/8] ASoC: SOF: Support for on-demand DSP boot Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251215132946.2155-2-peter.ujfalusi@linux.intel.com \
--to=peter.ujfalusi@linux.intel.com \
--cc=broonie@kernel.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=liam.r.girdwood@intel.com \
--cc=linux-sound@vger.kernel.org \
--cc=pierre-louis.bossart@linux.dev \
--cc=ranjani.sridharan@linux.intel.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox