snd_hda_jack_add_kctl(9)
π snd_hda_jack_add_kctl π
okay so bestie, welcome to the snd_hda_jack_add_kctl(9) page in the Kernel API Manual β yes that's the manual name, and yes it's a whole vibe. this is the little function that gives a pin its very own jack-detection kctl, and honestly? iconic behavior. π
β¨ SYNOPSIS β¨
int snd_hda_jack_add_kctl (struct hda_codec *codec , hda_nid_t nid ,
const char *name , bool phantom_jack , int type , const struct
hda_jack_keymap *keymap );
it returns an int, no cap. π
π«Ά ARGUMENTS π«Ά
codecβ the HDA codec. literally the codec you're working with, main character energy.nidβ the pin NID to assign. this is the pin you're giving the lil kctl to β¨nameβ the string name for the jack. name her, she deserves it πphantom_jackβ flag to deal as a phantom jack. spooky but make it functional π» (okay there's no emoji requirement there, it's just aboolflag)typeβ jack type bits to be reported. set it to0and it'll guess from pincfg for you β lowkey a sweet deal πkeymapβ optional jack / key mapping. optional!! as in you can skip it. no pressure bestie πΈ
π« DESCRIPTION π«
so what does it actually do?? it assigns a jack-detection kctl to the given pin. the kcontrol will have the given name and index. that's it, that's the whole thing β and the way that it just does exactly what it says on the tin is honestly so refreshing πβ¨
π SEE ALSO π
- Kernel file
./sound/hda/common/hda_jack.h snd_hda_jack_tbl_get(9)snd_hda_jack_detect_enable_callback(9)snd_hda_jack_detect_state(9)snd_hda_jack_detect_mst(9)snd_hda_jack_detect(9)
go read those too, iykyk π¦
ngl bestie, if you're here you're already deep in the HDA jack code. proud of you fr fr π«Ά
so yeah!! that's the whole page π it lives over in ./sound/hda/common, it's dated October 2026, and the page itself is snd_hda_jack_add_kctl(9) β slay, periodt, go add that kctl ππ
π¦ 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