snd_hda_gen_...ute_led_cdev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– snd_hda_gen_add_micmute_led_cdev(9) πŸ’–

okay so this is from the Kernel API Manual, section 9 β€” yes the header line up top is doing that truncated snd_hda_gen_...ute_led_cdev(9) thing (she's shy, it's fine), but the actual function is snd_hda_gen_add_micmute_led_cdev, and bestie, we're gonna get into it.


✨ NAME ✨

snd_hda_gen_add_micmute_led_cdev β€” literally creates a LED classdev and enables it as your mic-mute LED πŸŽ€πŸ’‘


🌸 SYNOPSIS 🌸

int snd_hda_gen_add_micmute_led_cdev (struct hda_codec *codec , int
(*callback)(struct led_classdev *, enum led_brightness) );

πŸŽ€ ARGUMENTS πŸŽ€

  • codec β€” the HDA codec. that's the whole vibe, that's the main character.
  • callback β€” the callback for LED classdev brightness_set_blocking. yes that exact name, no I will not be abbreviating it.

πŸ¦‹ DESCRIPTION πŸ¦‹

so the codec drivers call this one when they want to offer up the mic mute LED controls. it creates a LED classdev and sets up the cap_sync_hook β€” which gets called every single time the capture mixer switch changes. every time. she's attentive like that πŸ’…

when you pass NULL to callback, no classdev gets created β€” but the LED-trigger still gets set up. so like, half the outfit, still slaying ✨

Returns 0 or a negative error. that's it, that's the return.


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./sound/hda/codecs/generic.c β€” and the whole friend group:

ngl that's a lot of besties to keep up with, but they're all in ./sound/hda/codecs so like, same group chat, iykyk πŸ’€

mwah πŸ’‹ this little page lives in ./sound/hda/codecs and it's dated October 2026 β€” version-coded, timestamped, and signed off with love. go forth and let that mic LED glow, periodt πŸ«ΆπŸŒˆπŸ‘‘

πŸ“¦ where this page comes from