snd_soc_jack_add_gpios(9)
π NAME π
snd_soc_jack_add_gpios β the little function that hooks your GPIO pins up to an ASoC jack π (this is the snd_soc_jack_add_gpios(9) entry in the Kernel API Manual, bestie, so you know exactly where you are β¨)
π¦ SYNOPSIS π¦
int snd_soc_jack_add_gpios (struct snd_soc_jack *jack , int count ,
struct snd_soc_jack_gpio *gpios );
okay so you call it like that, no cap. it hands you back an int π«Ά
β¨ ARGUMENTS β¨
jackβ your ASoC jack π like, the actual jack object, the main character of this whole operationcountβ number of pins π’ yes babes, you gotta tell it how manygpiosβ array of gpio pins π the whole squad, in array form
πΈ DESCRIPTION πΈ
so basically π this function will request gpio, set data direction, and request irq for each gpio in the array. that's it, that's the vibe β it does all three things per pin, one by one, for every single entry in your array β¨
it's giving "set it and forget it" but make it kernel-level π§ ngl it's lowkey doing a lot for you.
π SEE ALSO π
Kernel file ./sound/soc/soc-jack.c π that's where the actual code lives, go look, iykyk
snd_soc_jack_report(9)snd_soc_jack_add_zones(9)snd_soc_jack_get_type(9)snd_soc_jack_add_pins(9)snd_soc_jack_notifier_register(9)snd_soc_jack_notifier_unregister(9)snd_soc_jack_add_gpiods(9)snd_soc_jack_free_gpios(9)
the whole friend group fr fr π«Ά go read them all, they slay in their own ways π
β and that's the page!! brought to you by ./sound/soc, the Kernel API Manual, dated October 2026, filed under snd_soc_jack_add_gpios(9) π mwah, go request some irqs bestie ππ₯
π¦ 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