]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: cs35l56: Increase pm_runtime autosuspend delay
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 9 Jun 2026 12:29:46 +0000 (13:29 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 9 Jun 2026 16:13:41 +0000 (17:13 +0100)
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>
Link: https://patch.msgid.link/20260609122946.288103-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/cs35l56.h
sound/soc/codecs/cs35l56.c

index c3b10587cb4ce820ff40a8ca94463f6be70911dd..2490b72c0a7a8c7ef8a5e8815afc3e98b74d38de 100644 (file)
@@ -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
index b4b126753c1015a9dfe74c94dc0222203a2e3b4b..0f78b1284eaaf53b2ede6c50106861f69a83b68f 100644 (file)
@@ -2027,7 +2027,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);