Re: [PATCH 2/3] ir-core: add imon pad and mce keymaps

2010-04-24 Thread Jarod Wilson
On Sat, Apr 24, 2010 at 4:53 AM, David Härdeman  wrote:
> On Fri, Apr 16, 2010 at 05:28:35PM -0400, Jarod Wilson wrote:
>>
>> This adds the keymaps for the hardware decode scancodes imon
>> devices create for their native imon pad (and mini) remotes,
>> and the hardware scancodes generated by the imon devices when
>> used with an rc6 windows media center ed. remote.
...
>> +/* mce-mode imon mce remote key table */
>> +static struct ir_scancode imon_mce[] = {
>> +     /* keys sorted mostly by frequency of use to optimize lookups */
>
> Won't help at all, entries are inserted in scancode order in the actual
> in-kernel keytable to allow for binary scancode searches.

Ah, yeah, that'd be some "legacy" cruft from when the driver was using
its own internal key table and lookups, making mental note to remove
those comments...

-- 
Jarod Wilson
ja...@wilsonet.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] ir-core: add imon pad and mce keymaps

2010-04-24 Thread David Härdeman
On Fri, Apr 16, 2010 at 05:28:35PM -0400, Jarod Wilson wrote:
> 
> This adds the keymaps for the hardware decode scancodes imon
> devices create for their native imon pad (and mini) remotes,
> and the hardware scancodes generated by the imon devices when
> used with an rc6 windows media center ed. remote.
> 
> Signed-off-by: Jarod Wilson 
> 
> ---
>  drivers/media/IR/keymaps/Makefile  |2 +
>  drivers/media/IR/keymaps/rc-imon-mce.c |  142 +
>  drivers/media/IR/keymaps/rc-imon-pad.c |  155 
> 
>  include/media/rc-map.h |2 +
>  4 files changed, 301 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/IR/keymaps/Makefile 
> b/drivers/media/IR/keymaps/Makefile
> index c4d891d..ec25258 100644
> --- a/drivers/media/IR/keymaps/Makefile
> +++ b/drivers/media/IR/keymaps/Makefile
> @@ -30,6 +30,8 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
>   rc-genius-tvgo-a11mce.o \
>   rc-gotview7135.o \
>   rc-hauppauge-new.o \
> + rc-imon-mce.o \
> + rc-imon-pad.o \
>   rc-iodata-bctv7e.o \
>   rc-kaiomy.o \
>   rc-kworld-315u.o \
> diff --git a/drivers/media/IR/keymaps/rc-imon-mce.c 
> b/drivers/media/IR/keymaps/rc-imon-mce.c
> new file mode 100644
> index 000..9c6dda3
> --- /dev/null
> +++ b/drivers/media/IR/keymaps/rc-imon-mce.c
> @@ -0,0 +1,142 @@
> +/* rc5-imon-mce.c - Keytable for Windows Media Center RC-6 remotes for use
> + * with the SoundGraph iMON/Antec Veris hardware IR decoder
> + *
> + * Copyright (c) 2010 by Jarod Wilson 
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#include 
> +
> +/* mce-mode imon mce remote key table */
> +static struct ir_scancode imon_mce[] = {
> + /* keys sorted mostly by frequency of use to optimize lookups */

Won't help at all, entries are inserted in scancode order in the actual 
in-kernel keytable to allow for binary scancode searches.


> + { 0x800ff415, KEY_REWIND },
> + { 0x800ff414, KEY_FASTFORWARD },
> + { 0x800ff41b, KEY_PREVIOUS },
> + { 0x800ff41a, KEY_NEXT },
...
> diff --git a/drivers/media/IR/keymaps/rc-imon-pad.c 
> b/drivers/media/IR/keymaps/rc-imon-pad.c
> new file mode 100644
> index 000..331ba90
> --- /dev/null
> +++ b/drivers/media/IR/keymaps/rc-imon-pad.c
> @@ -0,0 +1,155 @@
> +/* rc5-imon-pad.c - Keytable for SoundGraph iMON PAD and Antec Veris
> + * RM-200 Remote Control
> + *
> + * Copyright (c) 2010 by Jarod Wilson 
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#include 
> +
> +/*
> + * standard imon remote key table, which isn't really entirely
> + * "standard", as different receivers decode the same key on the
> + * same remote to different hex codes, and the silkscreened names
> + * vary a bit between the SoundGraph and Antec remotes... ugh.
> + */
> +static struct ir_scancode imon_pad[] = {
> + /* keys sorted mostly by frequency of use to optimize lookups */

Ditto


-- 
David Härdeman
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] ir-core: add imon pad and mce keymaps

2010-04-16 Thread Jarod Wilson

This adds the keymaps for the hardware decode scancodes imon
devices create for their native imon pad (and mini) remotes,
and the hardware scancodes generated by the imon devices when
used with an rc6 windows media center ed. remote.

Signed-off-by: Jarod Wilson 

---
 drivers/media/IR/keymaps/Makefile  |2 +
 drivers/media/IR/keymaps/rc-imon-mce.c |  142 +
 drivers/media/IR/keymaps/rc-imon-pad.c |  155 
 include/media/rc-map.h |2 +
 4 files changed, 301 insertions(+), 0 deletions(-)

diff --git a/drivers/media/IR/keymaps/Makefile 
b/drivers/media/IR/keymaps/Makefile
index c4d891d..ec25258 100644
--- a/drivers/media/IR/keymaps/Makefile
+++ b/drivers/media/IR/keymaps/Makefile
@@ -30,6 +30,8 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-genius-tvgo-a11mce.o \
rc-gotview7135.o \
rc-hauppauge-new.o \
+   rc-imon-mce.o \
+   rc-imon-pad.o \
rc-iodata-bctv7e.o \
rc-kaiomy.o \
rc-kworld-315u.o \
diff --git a/drivers/media/IR/keymaps/rc-imon-mce.c 
b/drivers/media/IR/keymaps/rc-imon-mce.c
new file mode 100644
index 000..9c6dda3
--- /dev/null
+++ b/drivers/media/IR/keymaps/rc-imon-mce.c
@@ -0,0 +1,142 @@
+/* rc5-imon-mce.c - Keytable for Windows Media Center RC-6 remotes for use
+ * with the SoundGraph iMON/Antec Veris hardware IR decoder
+ *
+ * Copyright (c) 2010 by Jarod Wilson 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include 
+
+/* mce-mode imon mce remote key table */
+static struct ir_scancode imon_mce[] = {
+   /* keys sorted mostly by frequency of use to optimize lookups */
+   { 0x800ff415, KEY_REWIND },
+   { 0x800ff414, KEY_FASTFORWARD },
+   { 0x800ff41b, KEY_PREVIOUS },
+   { 0x800ff41a, KEY_NEXT },
+
+   { 0x800ff416, KEY_PLAY },
+   { 0x800ff418, KEY_PAUSE },
+   { 0x800ff419, KEY_STOP },
+   { 0x800ff417, KEY_RECORD },
+
+   { 0x0252, KEY_UP },
+   { 0x0251, KEY_DOWN },
+   { 0x0250, KEY_LEFT },
+   { 0x024f, KEY_RIGHT },
+
+   { 0x800ff41e, KEY_UP },
+   { 0x800ff41f, KEY_DOWN },
+   { 0x800ff420, KEY_LEFT },
+   { 0x800ff421, KEY_RIGHT },
+
+   /* 0x800ff40b also KEY_NUMERIC_POUND on some receivers */
+   { 0x800ff40b, KEY_ENTER },
+   { 0x0228, KEY_ENTER },
+/* the OK and Enter buttons decode to the same value on some remotes
+   { 0x0228, KEY_OK }, */
+   { 0x800ff422, KEY_OK },
+   { 0x022a, KEY_EXIT },
+   { 0x800ff423, KEY_EXIT },
+   { 0x0229, KEY_DELETE },
+   /* 0x800ff40a also KEY_NUMERIC_STAR on some receivers */
+   { 0x800ff40a, KEY_DELETE },
+
+   { 0x800ff40e, KEY_MUTE },
+   { 0x800ff410, KEY_VOLUMEUP },
+   { 0x800ff411, KEY_VOLUMEDOWN },
+   { 0x800ff412, KEY_CHANNELUP },
+   { 0x800ff413, KEY_CHANNELDOWN },
+
+   { 0x021e, KEY_NUMERIC_1 },
+   { 0x021f, KEY_NUMERIC_2 },
+   { 0x0220, KEY_NUMERIC_3 },
+   { 0x0221, KEY_NUMERIC_4 },
+   { 0x0222, KEY_NUMERIC_5 },
+   { 0x0223, KEY_NUMERIC_6 },
+   { 0x0224, KEY_NUMERIC_7 },
+   { 0x0225, KEY_NUMERIC_8 },
+   { 0x0226, KEY_NUMERIC_9 },
+   { 0x0227, KEY_NUMERIC_0 },
+
+   { 0x800ff401, KEY_NUMERIC_1 },
+   { 0x800ff402, KEY_NUMERIC_2 },
+   { 0x800ff403, KEY_NUMERIC_3 },
+   { 0x800ff404, KEY_NUMERIC_4 },
+   { 0x800ff405, KEY_NUMERIC_5 },
+   { 0x800ff406, KEY_NUMERIC_6 },
+   { 0x800ff407, KEY_NUMERIC_7 },
+   { 0x800ff408, KEY_NUMERIC_8 },
+   { 0x800ff409, KEY_NUMERIC_9 },
+   { 0x800ff400, KEY_NUMERIC_0 },
+
+   { 0x02200025, KEY_NUMERIC_STAR },
+   { 0x02200020, KEY_NUMERIC_POUND },
+   /* 0x800ff41d also KEY_BLUE on some receivers */
+   { 0x800ff41d, KEY_NUMERIC_STAR },
+   /* 0x800ff41c also KEY_PREVIOUS on some receivers */
+   { 0x800ff41c, KEY_NUMERIC_POUND },
+
+   { 0x800ff446, KEY_TV },
+   { 0x800ff447, KEY_AUDIO }, /* My Music */
+   { 0x800ff448, KEY_PVR }, /* RecordedTV */
+   { 0x800ff449, KEY_CAMERA },
+   { 0x800ff44a, KEY_VIDEO },
+   /* 0x800ff424 also KEY_MENU on some receivers */
+   { 0x800ff424, KEY_DVD },
+   /* 0x800ff425 also KEY_GREEN on some receivers */
+   { 0x800ff425, KEY_TUNER }, /* LiveTV */
+   { 0x800ff450, KEY_RADIO },
+
+   { 0x800ff44c, KEY_LANGUAGE },
+   { 0x800ff427, KEY_ZOOM }, /* Aspect */
+
+   { 0x800ff45b, KEY_RED },
+   { 0x800ff45c, KEY_GREEN },
+   { 0x800ff45d, KEY_YELLOW },
+   { 0x800ff45e, KEY_BLUE },
+
+