summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_generic.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-11-26 19:47:46 +0300
committerTakashi Iwai <tiwai@suse.de>2018-11-29 01:25:22 +0300
commitb3802783d0b58989d70a484aa2d50fb8ce40841b (patch)
treed8c574fedd12f7b2b682eb803b14ffe9243061d7 /sound/pci/hda/hda_generic.h
parent4e1d092445a58b0a58d2743448a7aa17ae1cb0ef (diff)
downloadlinux-b3802783d0b58989d70a484aa2d50fb8ce40841b.tar.xz
ALSA: hda - Support led audio trigger
Now all relevant platform drivers are providing the LED audio trigger, we can switch the mute LED control with the LED trigger, finally. For the mic-mute LED trigger, a common fixup function, snd_hda_gen_fixup_micmute_led(), is provided to be called for the corresponding quirk entries. This sets up the capture sync hook with ledtrig_audio_set() call appropriately. For the mute LED trigger, which is done currently only for thinkpad_acpi, the call is replaced with ledtrig_audio_set() as well. Overall, the beauty of the new implementation is that the whole ugly bindings with request_symbol() are dropped, and also that it provides more flexibility to users. One potential behavior change by this patch is that the mute LED enum may be created on machines that actually have no LED device. In the former code, we did test-call and abort binding if the test failed. But with the LED-trigger binding, this test isn't possible, and the actual check is done in the LED class device side. So it's the downside of simpleness. Also, note that the HD-audio codec driver doesn't select CONFIG_LEDS and co by itself. It's supposed to be selected by the platform drivers instead. Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.h')
-rw-r--r--sound/pci/hda/hda_generic.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 10123664fa61..78d77042b05a 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -357,5 +357,7 @@ int snd_hda_gen_fix_pin_power(struct hda_codec *codec, hda_nid_t pin);
int snd_hda_gen_add_micmute_led(struct hda_codec *codec,
void (*hook)(struct hda_codec *));
+void snd_hda_gen_fixup_micmute_led(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action);
#endif /* __SOUND_HDA_GENERIC_H */