lkml.org 
[lkml]   [2010]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] thinkpad-acpi: fix return value of volume callbacks
Henrique de Moraes Holschuh wrote:
> On Tue, 23 Feb 2010, Clemens Ladisch wrote:
> > Henrique de Moraes Holschuh wrote:
> > > On Mon, 22 Feb 2010, Clemens Ladisch wrote:
> > > > Fix up the volume status setting functions to return a non-zero value if
> > > > the control value has changed, so that the ALSA framework can correctly
> > > > generate control change notifications.
> > >
> > > Please explain...
> >
> > ALSA sends notifications to all mixer application when the value of
> > any mixer control has changed. To be able to avoid sending them for
> > controls that did not actually change, it uses the return value of the
> > .put callback: 0 means the control value did not change; 1 means it has
> > changed (or might have changed), and a notification is to be sent.
> > <http://www.alsa-project.org/~tiwai/writing-an-alsa-driver/ch06s05.html#control-interface-callbacks-put>
>
> I am looking at it. I think I had it like that on purpose, to trigger an
> OSD when a volume-related hotkey is pressed even if it doesn't change the
> state (mute when already mute, vol down when already at minimum, etc).

This is not about changes initiated by key presses but changes made
through the ALSA mixer API. Or does the hardware generate a hotkey
event when software changes the volume?


Regards,
Clemens


\
 
 \ /
  Last update: 2010-02-26 08:53    [W:0.210 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site