WSL2-Linux-Kernel/sound/pci/ctxfi
Takashi Iwai 5b1ed7df01 ALSA: control - add generic LED API
This patchset tries to resolve the diversity in the audio LED
 control among the ALSA drivers. A new control layer registration
 is introduced which allows to run additional operations on
 top of the elementary ALSA sound controls.
 
 A new control access group (three bits in the access flags)
 was introduced to carry the LED group information for
 the sound controls. The low-level sound drivers can just
 mark those controls using this access group. This information
 is not exported to the user space, but user space can
 manage the LED sound control associations through sysfs
 (last patch) per Mark's request. It makes things fully
 configurable in the kernel and user space (UCM).
 
 The actual state ('route') evaluation is really easy
 (the minimal value check for all channels / controls / cards).
 If there's more complicated logic for a given hardware,
 the card driver may eventually export a new read-only
 sound control for the LED group and do the logic itself.
 
 The new LED trigger control code is completely separated
 and possibly optional (there's no symbol dependency).
 The full code separation allows eventually to move this
 LED trigger control to the user space in future.
 Actually it replaces the already present functionality
 in the kernel space (HDA drivers) and allows a quick adoption
 for the recent hardware (ASoC codecs including SoundWire).
 
 snd_ctl_led            24576  0
 
 The sound driver implementation is really easy:
 
 1) call snd_ctl_led_request() when control LED layer should be
    automatically activated
    / it calls module_request("snd-ctl-led") on demand /
 2) mark all related kcontrols with
         SNDRV_CTL_ELEM_ACCESS_SPK_LED or
         SNDRV_CTL_ELEM_ACCESS_MIC_LED
 
 Link: https://lore.kernel.org/r/20210317172945.842280-1-perex@perex.cz
 Signed-off-by: Takashi Iwai <tiwai@suse.de>
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmBjRuQOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE9ZQw/6Ao2X1io4TVnyO/gO8HtwmnZ6TWcrLUlySaep
 H6Suf0RHsOQO9VOaMcUarA3Wnz1vZ44qJ/fkdLTslnIPGSRJDUx15bbb+n2N6pQJ
 gS7Umxy6n73rQyEoDjd3ZorvDGjFSVFpjM+RYjk/Ohq+yziz7nQ/SZuHPPeqm1GU
 C5d9SxyXGdqlJJ6yFCHzbtjSmIey+l1TZ+j3rSSww/CzDKxB2l5J6JZAMUjVdL9b
 J80Mcw0XLdG9iTtEnkUt3TwvLMcMl95UPeQHIkVQlwsRRb3BtHNIwJLPQ/n+Cou7
 Hre3y2miUYHrNICEzMdMlpDzQBqu5wvpXgbgIV0CwAwCXPZBVWE1hVJ9gG0l+r1G
 fy1a75OmEin4V9g8w+wNTWDEgjwAOkWhA67WVjpbvHtd6kEbISzt4JHFksG1rjU2
 vXOIj2VBmQN6zHtxfcZqY8Ge4A7XGo7tAM/3NsUxin+2y7ZXI6sDvv+0esYmqrYr
 9as/tD84L5LTrbUYewaUgEdauQXluQI1egRi7pSeg7hZyLeYYkmszk54Ra3zdlmM
 m7Hr6u+Y/G7yeFdn/WdeG3VzdmxhC2ZFfk3gq0vneBS3WrATbf6nAORp2bwzGSz4
 pUsVLSv+vhpZdSF+IxpUuMnsLkkbUCvFivXLjQ6irSWvp7uts1HWdRowdg7Pe2lC
 FVbFRuA=
 =1uM7
 -----END PGP SIGNATURE-----

Merge tag 'tags/mute-led-rework' into for-next

ALSA: control - add generic LED API

This patchset tries to resolve the diversity in the audio LED
control among the ALSA drivers. A new control layer registration
is introduced which allows to run additional operations on
top of the elementary ALSA sound controls.

A new control access group (three bits in the access flags)
was introduced to carry the LED group information for
the sound controls. The low-level sound drivers can just
mark those controls using this access group. This information
is not exported to the user space, but user space can
manage the LED sound control associations through sysfs
(last patch) per Mark's request. It makes things fully
configurable in the kernel and user space (UCM).

The actual state ('route') evaluation is really easy
(the minimal value check for all channels / controls / cards).
If there's more complicated logic for a given hardware,
the card driver may eventually export a new read-only
sound control for the LED group and do the logic itself.

The new LED trigger control code is completely separated
and possibly optional (there's no symbol dependency).
The full code separation allows eventually to move this
LED trigger control to the user space in future.
Actually it replaces the already present functionality
in the kernel space (HDA drivers) and allows a quick adoption
for the recent hardware (ASoC codecs including SoundWire).

snd_ctl_led            24576  0

The sound driver implementation is really easy:

1) call snd_ctl_led_request() when control LED layer should be
   automatically activated
   / it calls module_request("snd-ctl-led") on demand /
2) mark all related kcontrols with
        SNDRV_CTL_ELEM_ACCESS_SPK_LED or
        SNDRV_CTL_ELEM_ACCESS_MIC_LED

Link: https://lore.kernel.org/r/20210317172945.842280-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-03-30 17:42:40 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ct20k1reg.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ct20k2reg.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctamixer.c ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctamixer.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctatc.c ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctatc.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctdaio.c ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctdaio.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
cthardware.c ALSA: pci/ctxfi: fix kernel-doc warnings 2020-07-07 12:05:56 +02:00
cthardware.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
cthw20k1.c ALSA: pci: Simplify with dma_set_mask_and_coherent() 2021-01-15 11:17:00 +01:00
cthw20k1.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
cthw20k2.c ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits 2021-02-28 09:12:41 +01:00
cthw20k2.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctimap.c ALSA: pci/ctxfi: fix kernel-doc warnings 2020-07-07 12:05:56 +02:00
ctimap.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctmixer.c ALSA: pci/ctxfi: fix kernel-doc warnings 2020-07-07 12:05:56 +02:00
ctmixer.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctpcm.c ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
ctpcm.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctresource.c ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctresource.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctsrc.c ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctsrc.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
cttimer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 364 2019-06-05 17:37:09 +02:00
cttimer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctvmem.c ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
ctvmem.h ALSA: ctxfi: fix comment syntax in file headers 2021-03-18 10:14:08 +01:00
xfi.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00