snd_hda_jack_add_kctl_mst(9)
π snd_hda_jack_add_kctl_mst(9) β like, the Kernel API Manual one, bestie π
okay so real talk, the manual page name is snd_hda_jack_add_kctl_mst(9) and it lives in the Kernel API Manual, which is genuinely such a serve. it's giving "small function, big responsibilities" energy and i'm obsessed. let's get into it β¨
πΈ NAME πΈ
snd_hda_jack_add_kctl_mst β add a kctl for the given pin π§
literally what it says on the tin. you hand it a pin, it hands you back a kctl. periodt.
β¨ SYNOPSIS β¨
int snd_hda_jack_add_kctl_mst (struct hda_codec *codec , hda_nid_t nid ,
int dev_id , const char *name , bool phantom_jack , int type , const
struct hda_jack_keymap *keymap );
that's the whole signature, no notes. returns an int, takes seven things, we love a generous parameter list π
π«Ά ARGUMENTS π«Ά
okay so here's the rundown on every single thing you can pass in, and no we are not skipping any of them:
codecβ the HDA codec. like, the main character of this whole operation πnidβ the pin NID you're assigning. it's the pin's whole identity, lowkey.dev_idβ the pin device entry id. yes, there's more than one id involved. don't ask, just pass it π«nameβ a string name for the jack. give it a cute name, or at least a correct one πphantom_jackβ a flag that says "deal with this as a phantom jack". spooky π» but functional.typeβ the jack type bits to be reported. and listen:0means guess frompincfg, so if you don't know, you actually do know, you just pass0π‘keymapβ optional jack / key mapping. optional!! so you can absolutely just not πΈ
π¦ DESCRIPTION π¦
so what does it actually do? it assigns a jack-detection kctl to the given pin. that's the whole vibe check, and it passes β
the kcontrol will have the given name and index. that's the tea. named and indexed, iconic behavior honestly, no cap π₯
π SEE ALSO π
here's the friend group β the whole squad, every single reference, not a single one left behind π«Ά:
- kernel file
./sound/hda/common/jack.cβ the actual home turf of all this π is_jack_detectable(9)β can we even detect a jack? asking the real questionssnd_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_kctls(9)β yes, the plural one. sibling energy πsnd_hda_jack_unsol_event(9)snd_hda_jack_poll_all(9)
ok quick vibe check before you go: every one of those is a real reference from the original page, so go read them if you actually need them. i'm just the hype girl, not the kernel source π
and that's the page bestie!! sign-off time: this whole thing lives under ./sound/hda/common, dated October 2026, and it's page snd_hda_jack_add_kctl_mst(9) of the Kernel API Manual. mwah, go detect some jacks πππΈ
π¦ 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