mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs35l56: Increase pm_runtime autosuspend delay
@ 2026-06-09 12:29 Richard Fitzgerald
  2026-06-09 16:13 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2026-06-09 12:29 UTC (permalink / raw)
  To: broonie; +Cc: linux-sound, linux-kernel, patches

Increase the pm_runtime autosuspend delay to be longer than the
timeout of the firmware's own inactivity timer.

There is no point attempting to pm_runtime suspend any sooner than
the firmware idle timeout because it would only mean the driver has
to poll waiting for the firmware idle.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 include/sound/cs35l56.h    | 2 ++
 sound/soc/codecs/cs35l56.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index c3b10587cb4c..2490b72c0a7a 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -286,6 +286,8 @@ struct snd_ctl_elem_value;
 #define CS35L56_MBOX_TIMEOUT_US				5000
 #define CS35L56_MBOX_POLL_US				250
 
+#define CS35L56_FW_REQ_ACTIVE_TIMEOUT_MS		250
+
 #define CS35L56_PS0_POLL_US				500
 #define CS35L56_PS0_TIMEOUT_US				50000
 #define CS35L56_PS3_POLL_US				500
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 6e2d92ab98e1..2e3b5f5e33ba 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -2041,7 +2041,8 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
 	if (cs35l56->base.init_done)
 		return 0;
 
-	pm_runtime_set_autosuspend_delay(cs35l56->base.dev, 100);
+	pm_runtime_set_autosuspend_delay(cs35l56->base.dev,
+					 CS35L56_FW_REQ_ACTIVE_TIMEOUT_MS + 50);
 	pm_runtime_use_autosuspend(cs35l56->base.dev);
 	pm_runtime_set_active(cs35l56->base.dev);
 	pm_runtime_enable(cs35l56->base.dev);
-- 
2.47.3


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

* Re: [PATCH] ASoC: cs35l56: Increase pm_runtime autosuspend delay
  2026-06-09 12:29 [PATCH] ASoC: cs35l56: Increase pm_runtime autosuspend delay Richard Fitzgerald
@ 2026-06-09 16:13 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-06-09 16:13 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: linux-sound, linux-kernel, patches

On Tue, 09 Jun 2026 13:29:46 +0100, Richard Fitzgerald wrote:
> ASoC: cs35l56: Increase pm_runtime autosuspend delay

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2

Thanks!

[1/1] ASoC: cs35l56: Increase pm_runtime autosuspend delay
      https://git.kernel.org/broonie/sound/c/60a1646b38d4

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] 2+ messages in thread

end of thread, other threads:[~2026-06-09 23:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-09 12:29 [PATCH] ASoC: cs35l56: Increase pm_runtime autosuspend delay Richard Fitzgerald
2026-06-09 16:13 ` Mark Brown

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