public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SDCA: Add NO_DIRECT_COMPLETE flag to class driver
@ 2026-01-15 13:17 Charles Keepax
  2026-01-20 16:50 ` Pierre-Louis Bossart
  2026-01-22 13:26 ` Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Charles Keepax @ 2026-01-15 13:17 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, rafael,
	linux-pm, linux-sound, patches

The SDCA class driver currently expects the device will be fully powered
down on system suspend but not on runtime suspend. This is typically
required as when audio is not active (ie. runtime suspend) jack detect
is expected to still function, but when the whole system is hibernated
there is no need to recognise audio jack events. This means the class
driver needs to always be informed of a system suspend, so the direct
complete optimisation (where PM will skip calling system suspend if the
device is runtime suspended) is not appropriate for the SDCA class
driver.

Add the NO_DIRECT_COMPLETE flag to prevent this optimisation from
running against this driver.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 sound/soc/sdca/sdca_class_function.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/sdca/sdca_class_function.c b/sound/soc/sdca/sdca_class_function.c
index 0afa41c1ee93c..98fd3fd1052b4 100644
--- a/sound/soc/sdca/sdca_class_function.c
+++ b/sound/soc/sdca/sdca_class_function.c
@@ -377,6 +377,8 @@ static int class_function_probe(struct auxiliary_device *auxdev,
 	if (ret)
 		return ret;
 
+	dev_pm_set_driver_flags(dev, DPM_FLAG_NO_DIRECT_COMPLETE);
+
 	pm_runtime_set_autosuspend_delay(dev, 200);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_set_active(dev);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-22 13:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15 13:17 [PATCH] ASoC: SDCA: Add NO_DIRECT_COMPLETE flag to class driver Charles Keepax
2026-01-20 16:50 ` Pierre-Louis Bossart
2026-01-20 17:45   ` Charles Keepax
2026-01-21 12:41     ` Pierre-Louis Bossart
2026-01-21 13:05       ` Charles Keepax
2026-01-21 15:08         ` Pierre-Louis Bossart
2026-01-22 13:26 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox