* [PATCH 1/2] ASoC: SDCA: Set suspended flag after resuming within system suspend
2026-09-24 9:54 [PATCH 0/2] ASoC: SDCA: Power management fixes for the class function driver Maciej Strozek
@ 2026-09-24 9:54 ` Maciej Strozek
2026-09-24 9:54 ` [PATCH 2/2] ASoC: SDCA: Add better pm_runtime error handling in func probe Maciej Strozek
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Maciej Strozek @ 2026-09-24 9:54 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, linux-sound,
linux-kernel, patches, Maciej Strozek
drv->suspended path was executed before system suspension instead of
after, move it lower to correct it.
Fixes: 7a5214f769c7 ("ASoC: SDCA: Add basic system suspend support")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
---
sound/soc/sdca/sdca_class_function.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sdca/sdca_class_function.c b/sound/soc/sdca/sdca_class_function.c
index 1d7fd66038829..1a7167aafa910 100644
--- a/sound/soc/sdca/sdca_class_function.c
+++ b/sound/soc/sdca/sdca_class_function.c
@@ -491,8 +491,6 @@ static int class_function_suspend(struct device *dev)
struct class_function_drv *drv = auxiliary_get_drvdata(auxdev);
int ret;
- drv->suspended = true;
-
/* Ensure runtime resume runs on resume */
ret = pm_runtime_resume_and_get(dev);
if (ret) {
@@ -500,6 +498,8 @@ static int class_function_suspend(struct device *dev)
return ret;
}
+ drv->suspended = true;
+
sdca_irq_disable(drv->function, drv->core->irq_info);
ret = pm_runtime_force_suspend(dev);
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/2] ASoC: SDCA: Add better pm_runtime error handling in func probe
2026-09-24 9:54 [PATCH 0/2] ASoC: SDCA: Power management fixes for the class function driver Maciej Strozek
2026-09-24 9:54 ` [PATCH 1/2] ASoC: SDCA: Set suspended flag after resuming within system suspend Maciej Strozek
@ 2026-09-24 9:54 ` Maciej Strozek
2026-09-24 10:04 ` [PATCH 0/2] ASoC: SDCA: Power management fixes for the class function driver Charles Keepax
2026-09-24 11:46 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Maciej Strozek @ 2026-09-24 9:54 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, linux-sound,
linux-kernel, patches, Maciej Strozek
Add a common error path in probe that balances the runtime PM reference.
Fixes: 3af1815a2f9c ("ASoC: SDCA: Add basic SDCA function driver")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
---
sound/soc/sdca/sdca_class_function.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/sound/soc/sdca/sdca_class_function.c b/sound/soc/sdca/sdca_class_function.c
index 1a7167aafa910..bbc825e05e37a 100644
--- a/sound/soc/sdca/sdca_class_function.c
+++ b/sound/soc/sdca/sdca_class_function.c
@@ -389,20 +389,27 @@ static int class_function_probe(struct auxiliary_device *auxdev,
ret = devm_pm_runtime_enable(dev);
if (ret)
- return ret;
+ goto err_pm;
ret = class_function_boot(drv);
if (ret)
- return ret;
+ goto err_pm;
ret = devm_snd_soc_register_component(dev, cmp_drv, dais, num_dais);
- if (ret)
- return dev_err_probe(dev, ret, "failed to register component\n");
+ if (ret) {
+ dev_err_probe(dev, ret, "failed to register component\n");
+ goto err_pm;
+ }
pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
return 0;
+
+err_pm:
+ pm_runtime_put_sync(dev);
+
+ return ret;
}
static void class_function_remove(struct auxiliary_device *auxdev)
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 0/2] ASoC: SDCA: Power management fixes for the class function driver
2026-09-24 9:54 [PATCH 0/2] ASoC: SDCA: Power management fixes for the class function driver Maciej Strozek
2026-09-24 9:54 ` [PATCH 1/2] ASoC: SDCA: Set suspended flag after resuming within system suspend Maciej Strozek
2026-09-24 9:54 ` [PATCH 2/2] ASoC: SDCA: Add better pm_runtime error handling in func probe Maciej Strozek
@ 2026-09-24 10:04 ` Charles Keepax
2026-09-24 11:46 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Charles Keepax @ 2026-09-24 10:04 UTC (permalink / raw)
To: Maciej Strozek
Cc: broonie, lgirdwood, yung-chuan.liao, pierre-louis.bossart,
linux-sound, linux-kernel, patches
On Thu, Sep 24, 2026 at 10:54:56AM +0100, Maciej Strozek wrote:
> The first corrects the point at which the suspended flag is set during
> system suspend, the second balances the runtime PM reference taken in
> probe when one of the later probe steps fails.
>
> Maciej Strozek (2):
> ASoC: SDCA: Set suspended flag after resuming within system suspend
> ASoC: SDCA: Add better pm_runtime error handling in func probe
>
> sound/soc/sdca/sdca_class_function.c | 19 +++++++++++++------
> 1 file changed, 13 insertions(+), 6 deletions(-)
>
>
> base-commit: 782424a17d77ae6de07b490618b523066c528f59
> --
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] ASoC: SDCA: Power management fixes for the class function driver
2026-09-24 9:54 [PATCH 0/2] ASoC: SDCA: Power management fixes for the class function driver Maciej Strozek
` (2 preceding siblings ...)
2026-09-24 10:04 ` [PATCH 0/2] ASoC: SDCA: Power management fixes for the class function driver Charles Keepax
@ 2026-09-24 11:46 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-09-24 11:46 UTC (permalink / raw)
To: Maciej Strozek
Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, linux-sound,
linux-kernel, patches
On Thu, 24 Sep 2026 10:54:56 +0100, Maciej Strozek wrote:
> ASoC: SDCA: Power management fixes for the class function driver
>
> The first corrects the point at which the suspended flag is set during
> system suspend, the second balances the runtime PM reference taken in
> probe when one of the later probe steps fails.
>
> Maciej Strozek (2):
> ASoC: SDCA: Set suspended flag after resuming within system suspend
> ASoC: SDCA: Add better pm_runtime error handling in func probe
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/2] ASoC: SDCA: Set suspended flag after resuming within system suspend
https://git.kernel.org/broonie/sound/c/b16610e3770e
[2/2] ASoC: SDCA: Add better pm_runtime error handling in func probe
https://git.kernel.org/broonie/sound/c/91094f9c8621
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread