Re: [RESEND] [PATCH] Input: add appleir USB driver

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jarod Wilson
Date: Friday, November 19, 2010 - 11:07 am

On Thu, Nov 18, 2010 at 04:18:03AM +0000, Bastien Nocera wrote:

You could change the mapping for the 6 buttons, but new scancode to
keycode mappings wouldn't be possible. That's assuming the driver actually
does raw IR decode -- the scancodes I see in the key tables in the driver
definitely match decoded NEC that I get when using the Apple remote with
another raw IR receiver (mceusb). Reading through the code though, it
appears the IR signal is decoded in hardware and only the resulting
scancodes are passed along... I wonder if it passes along scancodes for
all NEC signals or if its doing filtering... I have sufficiently equipped
Apple hardware of my own that I suppose I really ought to prod.


I don't see why we shouldn't be able to do it in-kernel too, without the
need for any userspace daemon. The bigger win though is probably
de-duplication of keyup/keydown/timer logic. I had similar duplication in
the imon driver (which is also scancode-based), and the code is smaller
and cleaner after being adapted to use ir/rc-core functions.


No it wouldn't. The lsb of the decoded NEC pulse train contains the ID,
I'm able to see it just fine with other raw IR receivers and some
experimental patches we're kicking around on linux-media.


I've got an implementation here using the in-kernel NEC decoder, an Apple
remote any an mceusb transceiver that works. Its not terribly *elegant*,
but it does work. (Executive summary: if not doing pairing, zero out the
pair ID and use the full 32-bit scancode with a default keytable that has
0x00 in the pair ID position. If doing pairing, pass that byte unmodified,
and upload a keymap that matches).

-- 
Jarod Wilson
jarod@redhat.com

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RESEND] [PATCH] Input: add appleir USB driver, Bastien Nocera, (Thu Sep 30, 3:57 am)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Dmitry Torokhov, (Thu Sep 30, 8:47 am)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Bastien Nocera, (Thu Sep 30, 8:51 am)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Oliver Neukum, (Mon Oct 4, 12:17 pm)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Dmitry Torokhov, (Mon Oct 4, 9:45 pm)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Oliver Neukum, (Mon Oct 4, 11:02 pm)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Dmitry Torokhov, (Mon Oct 4, 11:08 pm)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Oliver Neukum, (Mon Oct 4, 11:18 pm)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Dmitry Torokhov, (Tue Oct 5, 8:55 am)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Oliver Neukum, (Tue Oct 5, 9:07 am)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Dmitry Torokhov, (Tue Oct 5, 9:18 am)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Jarod Wilson, (Thu Oct 7, 5:39 pm)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Bastien Nocera, (Wed Nov 17, 9:18 pm)
Re: [RESEND] [PATCH] Input: add appleir USB driver, Jarod Wilson, (Fri Nov 19, 11:07 am)