STRUCT SND_SOC_JACK_GPIO(9)
π 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
- 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