snd_hda_gen_...ute_led_cdev(9)
π 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 classdevbrightness_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:
snd_hda_gen_spec_init(9)snd_hda_gen_add_kctl(9)snd_hda_get_path_idx(9)snd_hda_get_path_from_idx(9)snd_hda_add_new_path(9)snd_hda_activate_path(9)snd_hda_gen_add_mute_led_cdev(9)snd_hda_gen_fix_pin_power(9)snd_hda_gen_update_outputs(9)snd_hda_gen_hp_automute(9)snd_hda_gen_line_automute(9)snd_hda_gen_mic_autoswitch(9)snd_hda_gen_path_power_filter(9)snd_hda_gen_stream_pm(9)snd_hda_gen_shutup_speakers(9)snd_hda_gen_parse_auto_config(9)snd_hda_gen_build_controls(9)snd_hda_gen_build_pcms(9)snd_hda_gen_init(9)snd_hda_gen_remove(9)snd_hda_gen_check_power_status(9)
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
- 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