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 2/8] ASoC: SOF: control: skip rpm calls in ext_volatile_get if not implemented
Date: Mon, 15 Dec 2025 15:29:40 +0200 [thread overview]
Message-ID: <20251215132946.2155-3-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20251215132946.2155-1-peter.ujfalusi@linux.intel.com>
Test earlier for the existence of ext_volatile_get callback and if it is
missing, skip the rpm calls to avoid needles DSP power on.
No change in functionality, we just skip the DSP power on in the unlikely
case when the ext_volatile _get is not supported and yet the topology adds
such control.
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/control.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sof/control.c b/sound/soc/sof/control.c
index a3fd1d523c09..9582ab5f1113 100644
--- a/sound/soc/sof/control.c
+++ b/sound/soc/sof/control.c
@@ -187,14 +187,18 @@ int snd_sof_bytes_ext_volatile_get(struct snd_kcontrol *kcontrol, unsigned int _
const struct sof_ipc_tplg_ops *tplg_ops = sof_ipc_get_ops(sdev, tplg);
int ret, err;
+ /* ignore the ext_volatile_get call if the callbacks are not provided */
+ if (!tplg_ops || !tplg_ops->control ||
+ !tplg_ops->control->bytes_ext_volatile_get)
+ return 0;
+
ret = pm_runtime_resume_and_get(scomp->dev);
if (ret < 0 && ret != -EACCES) {
dev_err_ratelimited(scomp->dev, "%s: failed to resume %d\n", __func__, ret);
return ret;
}
- if (tplg_ops && tplg_ops->control && tplg_ops->control->bytes_ext_volatile_get)
- ret = tplg_ops->control->bytes_ext_volatile_get(scontrol, binary_data, size);
+ ret = tplg_ops->control->bytes_ext_volatile_get(scontrol, binary_data, size);
err = pm_runtime_put_autosuspend(scomp->dev);
if (err < 0)
--
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 ` [PATCH 1/8] ASoC: SOF: ipc4-loader: Remove redundant rpm resume_and_get from load_library Peter Ujfalusi
2025-12-15 13:29 ` Peter Ujfalusi [this message]
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-3-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