wm8903_mic_detect(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ wm8903_mic_detect(9) ✨

okay so bestie, buckle up β€” this is a page straight outta the Kernel API Manual, and it's literally about making the WM8903 chip notice when a mic shows up. yes. that's the whole vibe. πŸŽ€πŸ’…


🌸 NAME 🌸

wm8903_mic_detect β€” Enable microphone detection via the WM8903 IRQ

like… the whole point is mic detection, but make it interrupt-driven. iconic behavior only. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int wm8903_mic_detect (struct snd_soc_component *component , struct
       snd_soc_jack *jack , int det , int shrt );

that's the signature, bestie β€” copy it exactly, no freestyling 🫢


πŸ’– ARGUMENTS πŸ’–

  • component β€” the WM8903 component itself. main character energy, truly πŸ‘‘
  • jack β€” the jack you wanna report detection events on. it's giving… the messenger πŸŽ€
  • det β€” the value you report for presence detection πŸ‘€
  • shrt β€” the value you report for short detection ⚑ (yes, "shrt", they really did abbreviate it like that, no cap)

🌈 DESCRIPTION 🌈

okay so here's the tea β˜• β€” this function enables microphone detection via IRQ on the WM8903. that's it, that's the job. πŸ”₯

BUT β€” and this is the important part, bestie β€” if GPIOs are being used to bring out signals to the processor, then only platform data configuration is needed for the WM8903. and the processor GPIOs should be configured using snd_soc_jack_add_gpios instead. so like, different path, different function. don't mix them up, iykyk πŸ’€

also!! the current thresholds for detection should be configured using micdet_cfg in the platform data. that's where you set your vibes. πŸ“βœ¨

heads up 🫢 β€” using this function will force on the microphone bias for the device. like it's not asking, it's turning it on. periodt. πŸ’œ

🧚 SEE ALSO 🧚

  • Kernel file ./sound/soc/codecs/wm8903.c β€” go read the source, bestie, it's literally right there πŸ“–πŸ’–

aaaand that's the whole page, bestie!! πŸŽ‰ this little gem lives in ./sound/soc/codecs and it's dated October 2026 β€” so yeah, slay, go forth and detect some microphones πŸ’…πŸŽ€πŸ¦‹β­

πŸ“¦ where this page comes from