[alsa-devel] Userspace drivers

Josh Litherland josh at temp123.org
Thu Sep 27 16:06:00 CEST 2007

On 9/26/07, Tobin Davis <tdavis at dsl-only.net> wrote:
> The volume buttons should be supported by either acpi controls or keyboard
> settings.  Try running showkey and seeing if they trigger keycodes.  Once
> you have those, you could map them to a macro that adjusts volume through
> amixer.  I know that there are applets for KDE to support the thinkpad keys,
> there may be others as well.

It's true; in particular, in Ubuntu, the thinkpad-keys binary from the
hotkey-setup package watches for these key-events, and connects as a
userspace input device to synthesize normal volumeup, volumedown and mute
key events.

Unfortunately, that's not really how  thinkpads work.   =(   They are fairly
unique in that the hardware volume buttons actually control a separate
hardware mixer independent of the sound chip itself, and there is no way
I've seen in open source to prevent them from controlling that phantom
mixer.  So mapping them to also control the sound card's master mixer will
eventually lead to a skew from expected results.

The phantom mixer can, however, be queried and changed through /dev/nvram
and, in recent kernels, in /proc/acpi/ibm and some knobs in /sys.  What I'm
proposing is to expose the phantom mixer as an alsa mixer device.

> -- Tobin Davis
> Today's weirdness is tomorrow's reason why.
> 		-- Hunter S. Thompson

Josh Litherland (josh at temp123.org)

More information about the Alsa-devel mailing list