linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andrew Lutomirski <luto@mit.edu>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
	Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	ibm-acpi-devel@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [RFC PATCH] thinkpad-acpi: Improve hardware volume controls
Date: Thu, 12 May 2011 13:42:14 -0700	[thread overview]
Message-ID: <20110512204213.GA8776@core.coreip.homeip.net> (raw)
In-Reply-To: <BANLkTinzOn1mMQ9BntEfBrQ+n=WC9=Ewrg@mail.gmail.com>

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@gmail.com> 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

      reply	other threads:[~2011-05-12 20:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bf402af225e7005f052a8ccf92962efa48cbe703.1304979290.git.luto@mit.edu>
     [not found] ` <20110512134827.GA26159@srcf.ucam.org>
     [not found]   ` <BANLkTimmrM4HMATSbsYzz6kh=e9hrfAZmg@mail.gmail.com>
     [not found]     ` <20110512143912.GA28141@srcf.ucam.org>
2011-05-12 14:50       ` [RFC PATCH] thinkpad-acpi: Improve hardware volume controls Andrew Lutomirski
     [not found]         ` <BANLkTikX7mMu2me6+O1e-Ub=Cbzerd=J3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-12 15:39           ` Dmitry Torokhov
2011-05-12 19:33             ` Andrew Lutomirski
2011-05-12 20:42               ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110512204213.GA8776@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=hmh@hmh.eng.br \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=linux-input@vger.kernel.org \
    --cc=luto@mit.edu \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).