[alsa-devel] Hardware events

Clemens Ladisch clemens at ladisch.de
Tue Nov 30 09:08:50 CET 2010

Rolf Theunissen wrote:
> For some hardware devices (for instance the ThinkPad EC) the volume can
> be changed by (only) hardware buttons.
> ...
> This raises the following question: is it possible to detect the events
> originating from the hardware in the functions that handle the callbacks
> (set via snd_mixer_elem_set_callback/snd_hctl_elem_set_callback)? This
> would allow to implement an OSD that only responds to the hardware
> buttons and that would ignore events originating from "software".

The control notifications are for all changes of the control.

If it is not possible to change the volume in software, then the driver
must not set the control to be writable.


More information about the Alsa-devel mailing list