Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: Reset jack_detect on failure
@ 2026-12-04  7:49 Sreeraj S Kurup
  2026-12-04  8:13 ` sashiko-bot
  2026-12-04  9:03 ` [PATCH v2] " Sreeraj S Kurup
  0 siblings, 2 replies; 3+ messages in thread
From: Sreeraj S Kurup @ 2026-12-04  7:49 UTC (permalink / raw)
  To: perex, tiwai; +Cc: linux-sound, linux-kernel, Sreeraj S Kurup

Reset jack_detect to 0 when enabling jack
detection fails.

This allows a later call to try enabling
jack detection again.

Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
 sound/hda/common/jack.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/hda/common/jack.c b/sound/hda/common/jack.c
index 6b8aa1a6c008..9fda0bdd97e9 100644
--- a/sound/hda/common/jack.c
+++ b/sound/hda/common/jack.c
@@ -364,8 +364,10 @@ snd_hda_jack_detect_enable_callback_mst(struct hda_codec *codec, hda_nid_t nid,
 	err = snd_hda_codec_write_cache(codec, nid, 0,
 					 AC_VERB_SET_UNSOLICITED_ENABLE,
 					 AC_USRSP_EN | jack->tag);
-	if (err < 0)
+	if (err < 0) {
+		jack->jack_detect = 0;
 		return ERR_PTR(err);
+	}
 	return callback;
 }
 EXPORT_SYMBOL_GPL(snd_hda_jack_detect_enable_callback_mst);
-- 
2.55.0


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

end of thread, other threads:[~2026-12-04  9:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  7:49 [PATCH] ALSA: hda: Reset jack_detect on failure Sreeraj S Kurup
2026-12-04  8:13 ` sashiko-bot
2026-12-04  9:03 ` [PATCH v2] " Sreeraj S Kurup

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