wm8958_mic_detect(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… wm8958_mic_detect(9) β€” like, the kernel API manual bestie πŸŽ€

okay so first things first, the manual name is wm8958_mic_detect(9) and this whole page lives in the Kernel API Manual, which is exactly where you'd expect a kernel API to be, no cap ✨


🌸 NAME 🌸

wm8958_mic_detect β€” turns on microphone detection via the WM8958 IRQ 🎀✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int wm8958_mic_detect (struct snd_soc_component *component , struct
       snd_soc_jack *jack , wm1811_micdet_cb det_cb , void *det_cb_data ,
       wm1811_mic_id_cb id_cb , void *id_cb_data );

like, yes, that's a whole lot of arguments, but we're gonna go through every single one, i promise 🫢


πŸ’– ARGUMENTS πŸ’–

  • component β€” the WM8958 component πŸŽ›οΈ that's the star of the show
  • jack β€” the jack to report detection events on πŸ”Œ this is where the gossip gets reported
  • det_cb β€” detection callback πŸ‘€
  • det_cb_data β€” data for detection callback πŸ“¦
  • id_cb β€” mic id callback 🎀
  • id_cb_data β€” data for mic id callback πŸ“¦

every arg accounted for, nothing skipped, periodt πŸ’…


✨ DESCRIPTION ✨

so this is the part where it gets good πŸ’– β€” wm8958_mic_detect enables microphone detection functionality for the WM8958.

By default, simple detection is what you get, and it supports the detection of up to 6 buttons plus video and microphone functionality. six buttons!! that's so many buttons, honestly iconic πŸ”₯

The WM8958 has an advanced jack detection facility which is able to support complex accessory detection, especially when used in conjunction with external circuitry 🧚 that's the fancy stuff.

And in order to provide maximum flexiblity β€” yes bestie, the manual literally spells it "flexiblity", we keep it exactly as it is πŸ™ˆ β€” a callback is provided which allows a completely custom detection algorithm πŸ› οΈ like, build your own detection algorithm, main character energy fr fr.


🌈 SEE ALSO 🌈

go read those too, iykyk πŸ‘‘


ok that's the whole page, nothing left out, every flag and callback and number preserved exactly πŸ’œ

and that's a wrap, bestie πŸŽ€ this page was serving ./sound/soc/codecs energy, dated October 2026, brought to you by wm8958_mic_detect(9) β€” slay, bye πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from