snd_hda_jack_detect_enable(9)
π snd_hda_jack_detect_enable(9) π
okay bestie so we're in the Kernel API Manual today and the star of the show is snd_hda_jack_detect_enable β literally the glow-up button for jack detection β¨
πΈ NAME πΈ
snd_hda_jack_detect_enable β turn on the jack detection on the pin you point at, no cap π
π¦ SYNOPSIS π¦
int snd_hda_jack_detect_enable (struct hda_codec *codec , hda_nid_t nid
, int dev_id );
it's giving "three args, one int back," very demure, very minimal π
β¨ ARGUMENTS β¨
codecβ the HDA codec itself, your main character struct π«Άnidβ the pin NID where you want jack detection switched on π₯dev_idβ the pin device entry id, the little number that tells things apart π
π DESCRIPTION π
so what does it actually do? it enables jack detection using the default callback β that's the built-in one, nothing custom, iykyk π
Returns 0 if it worked, or a negative error code if it didn't π like, no in-between, no vibes-based answer, just zero-or-negative, periodt.
ngl bestie, always check that return value. negative error codes are the opps π
π SEE ALSO π
the whole friend group lives in the kernel file ./sound/hda/common/jack.c β go say hi to all of them π
is_jack_detectable(9)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_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)
and that's the tea π this icon lives in ./sound/hda/common, dated October 2026 β screenshot it, cite it, slay π
π
π¦ 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