Re: [RFC PATCH] thinkpad-acpi: Improve hardware volume controls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 12, 2011 at 03:33:54PM -0400, Andrew Lutomirski wrote:
> On Thu, May 12, 2011 at 11:39 AM, Dmitry Torokhov
> <dmitry.torokhov@xxxxxxxxx> wrote:
> > Hi Andrew,
> >
> > On Thu, May 12, 2011 at 10:50:54AM -0400, Andrew Lutomirski wrote:
> >>
> >> I do, however, have a question for the input people.  Dmitry: Lenovo
> >> makes laptops which are kind enough to tell us that the volume changed
> >> by sending a keystroke over the atkbd-based keyboard.  (wtf!)  I've
> >> modified the thinkpad-acpi driver to register an input handler to
> >> catch those events coming from the keyboard and send them to ALSA
> >> where they belong.  But if there's a keyboard grab, it won't work.
> >> Would you accept a patch to the input layer to allow filters (or maybe
> >> just filters that specifically request it) to run even if there's a
> >> grab?
> >
> > There is a filter on i8042 level that was introduced specifically for
> > cases when events not having any relation to the input are routed via
> > KBC interface. It looks like this is the one you want to use. See
> > include/linux/i8042.h::i8042_install_filter(). It allows for such events
> > to completely bypass input layer.
> >
> > Hope this helps.
> 
> Sort of.
> 
> dell-laptop and msi-laptop are content to take some action on the keys
> they see but still leave the keys in the input stream, so their job is
> a bit easier.
> 
> I need to swallow one kind of extended key, detect and not swallow two
> others, and ignore all the ones that are normal keys.  But that means
> that I don't know whether I should filter out 0xe0 until it's too
> late.
> 
> So either I'd need a function to feed an event back into i8042 or I
> need to filter a little farther downstream when the keys are resolved
> into keycodes (or scancodes -- I'm not really up on the terminology).

You can use serio_interrupt() to inject additional bytes into serio data
stream.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux