summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPengpeng Hou <pengpeng@iscas.ac.cn>2026-08-25 16:52:39 +0800
committerMark Brown <broonie@kernel.org>2026-09-01 18:24:48 +0100
commit951af101c73070dca5241e408decfb302e37a0fa (patch)
tree8a6c37bab71e571b21c137ef80a8572c267aae20
parent6f83e540f9456a0ec63fde75c749f143f9cb8857 (diff)
downloadlinux-next-951af101c73070dca5241e408decfb302e37a0fa.tar.gz
linux-next-951af101c73070dca5241e408decfb302e37a0fa.zip
ASoC: report component resume callback errors
snd_soc_component_driver::resume() returns an int, but snd_soc_component_resume() discards it. In the deferred resume path, snd_soc_resume() has already returned success to the PM core, so an error cannot be propagated back to that caller. Pass the callback result through the existing ASoC component error helper. This reports negative results with component context while preserving the established best-effort behavior: the component is still marked resumed and the worker continues DAPM resume, digital unmute and card power publication. There are existing callbacks, including tas2562_resume() and atmel_classd_component_resume(), which directly return regcache_sync() errors. Those errors currently disappear at the component wrapper. This only makes errors already returned by component callbacks observable. It does not expose operations that individual callbacks ignore, and it does not add rollback or retry semantics. Callbacks which already report an error may retain their driver-specific message in addition to the common ASoC component context, as with other ASoC component wrappers. This is an RFC to confirm that reporting and continuing is the intended contract for deferred component resume failures. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20260825085239.82282-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-component.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index dc7d203cb76a..463ea227cac8 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -315,8 +315,12 @@ void snd_soc_component_suspend(struct snd_soc_component *component)
void snd_soc_component_resume(struct snd_soc_component *component)
{
- if (component->driver->resume)
- component->driver->resume(component);
+ int ret;
+
+ if (component->driver->resume) {
+ ret = component->driver->resume(component);
+ soc_component_ret(component, ret);
+ }
component->suspended = 0;
}