snd_hda_jac...callback_mst(9)
π snd_hda_jack_detect_enable_callback_mst(9) π
okay so bestie, welcome to the Kernel API Manual β this one lives in snd_hda_jac...callback_mst(9) and it's literally the friend that turns on jack detection for you. no cap. π
β¨ NAME β¨
snd_hda_jack_detect_enable_callback_mst β enable the jack-detection π¦
like, that's the whole vibe: we're enabling jack detection. slay.
πΈ SYNOPSIS πΈ
struct hda_jack_callback * snd_hda_jack_detect_enable_callback_mst
(struct hda_codec *codec , hda_nid_t nid , int dev_id ,
hda_jack_callback_fn func );
she takes four things and she returns a struct hda_jack_callback *. iconic behavior tbh π
π§ ARGUMENTS π§
codecβ the HDA codec π like, the whole codec, your main character.nidβ pin NID to enable. this is the pin we're waking up, periodt.dev_idβ pin device entry id. the little id that says which device entry on that pin, iykyk.funcβ callback function to register. drop your function here and she'll call it. π«Ά
π DESCRIPTION π
okay so this is important, don't skip it π¨ β in the case of error, the return value will be a pointer embedded with errno. yes, the pointer itself is carrying the error. it's giving cursed but that's the API.
so you gotta check and handle the return value appropriately with standard macros such as IS_ERR and PTR_ERR. literally do not just dereference it, bestie π that's how you end up in a crash-induced villain arc.
fr fr: check the return value. always.IS_ERR/PTR_ERRare your besties here π
π SEE ALSO π
Kernel file ./sound/hda/common/jack.c is where the lore lives, and here's the whole squad:
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(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 page, bestie β¨ this one's from ./sound/hda/common, dated October 2026, and the manual page is snd_hda_jac...callback_mst(9) β go forth and enable that jack detection, you absolute legend πΈππ
π¦ 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