From: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
To: sreekuttan2156239@gmail.com, perex@perex.cz, tiwai@suse.de
Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org
Subject: [PATCH v2] ALSA: hda: Reset jack_detect on failure
Date: Fri, 4 Dec 2026 09:03:00 +0000 [thread overview]
Message-ID: <20261204090300.3099-1-sreekuttan2156239@gmail.com> (raw)
In-Reply-To: <20261204074922.2913-1-sreekuttan2156239@gmail.com>
Reset jack_detect to 0 when enabling jack
detection fails.
This allows a later call to try enabling
jack detection again.
Fixes: 01a61e12b460 ("ALSA: hda - Create jack-detection kcontrols")
Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
v2:
- Add Fixes Trailer.
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
prev parent reply other threads:[~2026-12-04 9:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 7:49 [PATCH] " Sreeraj S Kurup
2026-12-04 9:03 ` Sreeraj S Kurup [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204090300.3099-1-sreekuttan2156239@gmail.com \
--to=sreekuttan2156239@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®