is_jack_detectable(9)
β¨ is_jack_detectable(9) β the "can this pin even?" check β¨
okay so bestie, this one's from the Kernel API Manual, section 9, and it's lowkey one of those tiny helper functions that saves you from a whole vibe collapse. let's get into it π«Ά
πΈ NAME πΈ
is_jack_detectable β checks whether the pin you're eyeing is actually jack-detectable π
π SYNOPSIS π
bool is_jack_detectable (struct hda_codec *codec , hda_nid_t nid );
it returns a bool, so likeβ¦ yes or no, no β¨mysteryβ¨
π¦ ARGUMENTS π¦
codecβ the HDA codec, aka the main character of this whole situation πnidβ the pin NID. that's your pin's little ID card πͺͺ
π DESCRIPTION π
so what it does: it checks whether the given pin is capable of reporting jack detection. like, does this pin have the range? can it even? π€
and here's the tea β the jack detection might not work, and honestly there are several reasons for that, so don't come for this function:
- the jack detection is prohibited at the codec level π«
- the pin config has the
AC_DEFCFG_MISC_NO_PRESENCEbit set - no unsol support
- etc. (yes, the manpage literally says "etc." and i respect the confidence π)
ngl bestie, "might not work by various reasons" is doing a LOT of heavy lifting here, but that's exactly why you check first instead of just assuming. vibe check before the vibe check, yk? β¨
π SEE ALSO π
- Kernel file
./sound/hda/common/jack.cπΎ snd_hda_jack_tbl_get_mst(9)snd_hda_jack_tbl_get_from_tag(9)snd_hda_jack_tbl_new(9)snd_hda_jack_set_dirty_all(9)snd_hda_jack_pin_sense(9)snd_hda_jack_detect_state_mst(9)snd_hda_jack_detect_enable_callback_mst(9)snd_hda_jack_detect_enable(9)snd_hda_jack_set_gating_jack(9)snd_hda_jack_bind_keymap(9)snd_hda_jack_set_button_state(9)snd_hda_jack_report_sync(9)snd_hda_jack_add_kctl_mst(9)snd_hda_jack_add_kctls(9)snd_hda_jack_unsol_event(9)snd_hda_jack_poll_all(9)
like, that's the whole jack.c friend group and they ALL ate π₯ go read them, iykyk π
π the cute sign-off π
this lil page lives in ./sound/hda/common and it's dated October 2026 β so yeah, she's from the future, she's got main character energy, and she's is_jack_detectable(9) π§ββοΈ stay detecTABLE, bestie π
π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms