[alsa-devel] [PATCH 1/2] snd-maestro3: Make hardware volume buttons an input device (rev2)

Ville Syrjälä syrjala at sci.fi
Thu May 6 23:10:02 CEST 2010

On Fri, Apr 23, 2010 at 05:26:42AM -0400, Hans de Goede wrote:
> 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 at redhat.com>

Tested-by: Ville Syrjälä <syrjala at sci.fi>

Both SND_MAESTRO3_INPUT=y and SND_MAESTRO3_INPUT=n work fine on my HP
OmniBook 500.

There is one small issue though. I get a spurious key event when I load
the driver. Probably the omnibook GPIO magic causes a spurious event
which then causes the interrupt since the driver doesn't clear the
interrupts before enabling them. I'll send a patch for that.

Ville Syrjälä
syrjala at sci.fi

More information about the Alsa-devel mailing list