diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-04-23 05:26:42 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-04-23 11:09:46 -0400 |
commit | eb581adf25fe9e42197e591926de85459e68b9fd (patch) | |
tree | 9967f82156d9ab138c96adefa4771a420470fabe /sound/pci/Kconfig | |
parent | 20133d4cd329af7a02ee5af36bba1796d5ff7b1d (diff) |
ALSA: snd-maestro3: Make hardware volume buttons an input device (rev2)
While working on the sound suspend / resume problems with my laptop
I noticed that the hardware volume handling code in essence just detects
key presses, and then does some hardcoded modification of the master volume
based on which key is pressed.
This made me think that clearly the right thing to do here is just report
these keypresses to userspace and let userspace decide what to with them.
This patch adds a Kconfig option which when enabled reports the volume
buttons as keypresses using an input device. When enabled this option
also gets rid of the ugly direct ac97 writes from the tasklet, the ac97lock
and the need for using a tasklet in general.
As an added bonus the keys now work identical to volume keys on a (usb)
keyboard with multimedia keys, providing visual feedback of the volume
level change, and a better range of the volume control (with a properly
configured desktop environment).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/Kconfig')
-rw-r--r-- | sound/pci/Kconfig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 517ae65ffc8e..ebcf065ad2c2 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig | |||
@@ -667,6 +667,16 @@ config SND_MAESTRO3 | |||
667 | To compile this driver as a module, choose M here: the module | 667 | To compile this driver as a module, choose M here: the module |
668 | will be called snd-maestro3. | 668 | will be called snd-maestro3. |
669 | 669 | ||
670 | config SND_MAESTRO3_INPUT | ||
671 | bool "Enable input device for maestro3 volume buttons" | ||
672 | depends on SND_MAESTRO3 | ||
673 | depends on INPUT=y || INPUT=SND_MAESTRO3 | ||
674 | help | ||
675 | If you say Y here, you will get an input device which reports | ||
676 | keypresses for the volume buttons connected to the maestro3 chip. | ||
677 | If you say N the buttons will directly control the master volume. | ||
678 | It is recommended to say Y. | ||
679 | |||
670 | config SND_MIXART | 680 | config SND_MIXART |
671 | tristate "Digigram miXart" | 681 | tristate "Digigram miXart" |
672 | select SND_HWDEP | 682 | select SND_HWDEP |