15 Jan
2021
15 Jan
'21
6:45 p.m.
Dne 12. 01. 21 v 18:18 Perry Yuan napsal(a):
+#if IS_ENABLED(CONFIG_DELL_PRIVACY)
- /* dell privacy LED trigger state changed by muted/unmute switch */
- if (mc->invert) {
if (ucontrol->value.integer.value[0] || ucontrol->value.integer.value[1]) {
rt715->micmute_led = LED_OFF;
} else {
rt715->micmute_led = LED_ON;
}
ledtrig_audio_set(LED_AUDIO_MICMUTE, rt715->micmute_led);
- }
+#endif
[removing lkml and x86-platform lists]
Looking to this code, perhaps, it may be a good idea to move the LED trigger handling from the low-level drivers and do it in the top-level control code (sound/core/control.c). Adding a new flag SNDRV_CTL_ELEM_ACCESS_MIC_LED may be an option and we can nicely handle the situation for multiple microphones (OR operation). The motivation is to remove the duplicated code.
The same situation is for the playback LED.
Jaroslav
--
Jaroslav Kysela perex@perex.cz
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.