STRUCT SND_SOC_JACK_GPIO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

struct snd_soc_jack_gpio β€” the little struct that describes a GPIO pin for jack detection ✨ (yes, this is from the Kernel API Manual, we're being fancy today)


πŸŽ€ SYNOPSIS

struct snd_soc_jack_gpio {
    unsigned int idx;
    struct device *gpiod_dev;
    const char *name;
    int report;
    int invert;
    int debounce_time;
    bool wake;
    int (*jack_status_check)(void *data);
 };

πŸ¦‹ Members

okay bestie, here's the cast of characters β€” every single field, no skips, no cap:

  • idx β€” the gpio descriptor index within the function of the GPIO consumer device 🫢
  • gpiod_dev β€” the GPIO consumer device itself, the main character πŸ’…
  • name β€” the gpio name. it also doubles as the connection ID for the GPIO consumer device's function name lookup β€” so it's doing two jobs, iconic πŸ”₯
  • report β€” the value you report when the jack is detected πŸŽ€
  • invert β€” report presence in the low state (yes, flipped, on purpose πŸ™ˆ)
  • debounce_time β€” debounce time, measured in ms ⏱️
  • wake β€” enable this as a wake source 🌸
  • jack_status_check β€” a callback function that overrides the detection so you can do more complex checks (eg, reading an ADC) β€” the overachiever of the group, honestly πŸ‘‘

🌈 SEE ALSO

  • Kernel file ./include/sound/soc-jack.h ✨
  • struct snd_soc_jack_pin(9)
  • struct snd_soc_jack_zone(9)

lowkey go read those two siblings too, they're giving family reunion energy 🧚

and that's the whole page bestie πŸ’– this little gem lives in ./include/sound, it's dated October 2026, and the whole thing is filed under struct snd_soc_jack_gpio(9) β€” slay, periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from