snd_hda_jack_add_kctl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 a bool flag)
  • type β€” jack type bits to be reported. set it to 0 and 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 🌈

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