public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs42l43-jack: Remove manual pm_runtime get/put from tip_sense_work
@ 2026-03-16 12:49 Peter Ujfalusi
  2026-03-16 14:27 ` Charles Keepax
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Ujfalusi @ 2026-03-16 12:49 UTC (permalink / raw)
  To: lgirdwood, broonie, ckeepax, david.rhodes, rf; +Cc: linux-sound, stable

When a jack is inserted the forced pm_runtime_get() will keep the codec,
soundwire bus and it's parent active as long as the jack is connected.
This makes for example the DSP and firmware booted up on Intel platforms.

If the module is removed while the jack is connected we will also have
unbalanced runtime PM state.

Without the manual get/put, the button detection still works correctly and
the system can reach lower power state while the jack is connected like
in the case when there is no jack connected.

Fixes: fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43")
Cc: stable@vger.kernel.org
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
 sound/soc/codecs/cs42l43-jack.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/cs42l43-jack.c b/sound/soc/codecs/cs42l43-jack.c
index 3e04e6897b14..d90a13a55845 100644
--- a/sound/soc/codecs/cs42l43-jack.c
+++ b/sound/soc/codecs/cs42l43-jack.c
@@ -756,10 +756,8 @@ void cs42l43_tip_sense_work(struct work_struct *work)
 	ring = (sts >> CS42L43_RINGSENSE_PLUG_DB_STS_SHIFT) & CS42L43_JACK_PRESENT;
 
 	if (tip == CS42L43_JACK_PRESENT) {
-		if (cs42l43->sdw && !priv->jack_present) {
+		if (cs42l43->sdw && !priv->jack_present)
 			priv->jack_present = true;
-			pm_runtime_get(priv->dev);
-		}
 
 		if (priv->use_ring_sense && ring == CS42L43_JACK_ABSENT) {
 			report = CS42L43_JACK_OPTICAL;
@@ -779,10 +777,8 @@ void cs42l43_tip_sense_work(struct work_struct *work)
 
 		snd_soc_jack_report(priv->jack_hp, 0, 0xFFFF);
 
-		if (cs42l43->sdw && priv->jack_present) {
-			pm_runtime_put(priv->dev);
+		if (cs42l43->sdw && priv->jack_present)
 			priv->jack_present = false;
-		}
 	}
 
 error:
-- 
2.53.0


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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 12:49 [PATCH] ASoC: cs42l43-jack: Remove manual pm_runtime get/put from tip_sense_work Peter Ujfalusi
2026-03-16 14:27 ` Charles Keepax
2026-03-16 14:37   ` Péter Ujfalusi
2026-03-16 16:40     ` Charles Keepax
2026-03-17  6:21       ` Péter Ujfalusi
2026-03-17  9:11         ` Péter Ujfalusi
2026-03-17  9:36           ` Péter Ujfalusi
2026-03-17 11:36             ` Charles Keepax
2026-03-17 11:44         ` Charles Keepax
2026-03-17 12:07           ` Péter Ujfalusi
2026-03-17 13:25             ` Charles Keepax
2026-03-16 14:58   ` Charles Keepax

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