snd_jack_new(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… snd_jack_new(9) β€” the Kernel API Manual, bestie edition ✨

okay so you found a (9) page, which means it's kernel API and you're officially in the big-girl leagues now πŸŽ€ this one lives in the Kernel API Manual, and it's about making a jack. no, not the thing in your headphones cord (well… actually yes, kinda, that's the vibe πŸ‘€). stay with me.


✨ NAME ✨

snd_jack_new β€” Create a new jack 🎧✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int snd_jack_new (struct snd_card *card , const char *id , int type ,
struct snd_jack **jjack , bool initial_kctl , bool phantom_jack );

like… six arguments. she's high maintenance and she's worth it πŸ’…


🌸 ARGUMENTS 🌸

  • card β€” the card instance πŸ’³ that's your sound card babe, the whole reason we're here
  • id β€” an identifying string for this jack 🏷️ give her a name, she deserves one
  • type β€” a bitmask of enum snd_jack_type values that can be detected by this jack πŸ” so like, what flavours of plugging-in can she even notice
  • jjack β€” Used to provide the allocated jack object to the caller. 🫢 that's your out-param, she hands the shiny new jack back to you through this
  • initial_kctl β€” if true, create a kcontrol and add it to the jack list. βœ… true means yes please, make the kcontrol and add it to the list
  • phantom_jack β€” Don't create a input device for phantom jacks. πŸ‘»πŸ‘‘ phantom jacks don't get an input device, that's the whole point of the flag

πŸ’– DESCRIPTION πŸ’–

Creates a new jack object. that's it, that's the description, she's a simple girl with a simple purpose ✨ literally just makes the jack. iconic behaviour, no notes πŸŽ€


πŸ”₯ RETURN πŸ”₯

Zero if successful, or a negative error code on failure. 😭 so <0 means something went wrong, 0 means slay. and on success jjack will be initialised β€” so bestie please do not touch that pointer before you get the zero back, iykyk πŸ’€


🌈 SEE ALSO 🌈

all your little jack besties, go say hi 🫢


⭐ friendly reminder: negative return code = check it, don't ignore it, that's not cute πŸ™ˆ

okay that's the page!! 🧚 this one comes from the ./sound/core part of the tree, dated October 2026, and it's snd_jack_new(9) in the Kernel API Manual β€” go build something that goes click πŸŽ§πŸ’œπŸ’…

πŸ“¦ where this page comes from