linux: add ati_remote keychange patch

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-12-16 12:50:35 +01:00
parent 9827929f74
commit 194028fc1b

View File

@ -0,0 +1,65 @@
diff -Naur linux-2.6.37-rc6/drivers/input/misc/ati_remote.c linux-2.6.37-rc6.patch/drivers/input/misc/ati_remote.c
--- linux-2.6.37-rc6/drivers/input/misc/ati_remote.c 2010-12-16 02:24:48.000000000 +0100
+++ linux-2.6.37-rc6.patch/drivers/input/misc/ati_remote.c 2010-12-16 12:35:04.454620549 +0100
@@ -90,6 +90,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/usb/input.h>
#include <linux/wait.h>
#include <linux/jiffies.h>
@@ -131,6 +132,10 @@
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Enable extra debug messages and information");
+static int keychange;
+module_param(keychange, int, 0644);
+MODULE_PARM_DESC(keychange, "Enable support for Keychange remotes");
+
static int repeat_filter = FILTER_TIME;
module_param(repeat_filter, int, 0644);
MODULE_PARM_DESC(repeat_filter, "Repeat filter time, default = 60 msec");
@@ -285,6 +290,25 @@
{KIND_FILTERED, 0xf4, 0x2F, EV_KEY, KEY_END, 1}, /* END */
{KIND_FILTERED, 0xf5, 0x30, EV_KEY, KEY_SELECT, 1}, /* SELECT */
+ /* Coloured keys */
+ {KIND_FILTERED, 0xf7, 0x32, EV_KEY, KEY_PLAYCD, 1}, /* TXT Rot */
+ {KIND_FILTERED, 0xf8, 0x33, EV_KEY, KEY_PAUSECD, 1}, /* TXT Gr */
+ {KIND_FILTERED, 0xf9, 0x34, EV_KEY, KEY_PROG3, 1}, /* TXT Gelb */
+ {KIND_FILTERED, 0xfa, 0x35, EV_KEY, KEY_PROG4, 1}, /* TXT Blau */
+
+ /* More Keys */
+ {KIND_FILTERED, 0xac, 0x37, EV_KEY, KEY_G, 1}, /* Acquire Image */
+ {KIND_FILTERED, 0xfe, 0x39, EV_KEY, KEY_H, 1}, /* FULL SCREEN _| */
+ {KIND_FILTERED, 0xfb, 0x36, EV_KEY, KEY_I, 1}, /* Rename */
+ {KIND_FILTERED, 0xf1, 0x2c, EV_KEY, KEY_J, 1}, /* TV */
+ {KIND_FILTERED, 0xf6, 0x31, EV_KEY, KEY_K, 1}, /* Video Desktop */
+ {KIND_FILTERED, 0xa1, 0x00, EV_KEY, KEY_L, 1},
+
+ /* Keys added by torsten at archesoft.de */
+ {KIND_FILTERED, 0xff, 0x3a, EV_KEY, KEY_M, 1}, /* dvd audio */
+ {KIND_FILTERED, 0xfc, 0x37, EV_KEY, KEY_N, 1}, /* aquire image */
+ {KIND_FILTERED, 0xfd, 0x38, EV_KEY, KEY_O, 1}, /* edit image */
+
{KIND_END, 0x00, 0x00, EV_MAX + 1, 0, 0}
};
@@ -409,6 +433,16 @@
{
int i;
+ /* If keychange is enabled we undo the keychanges of the remote here */
+
+ if (keychange){
+ if (d2 & 0x80) {
+ d1 += 0x80;
+ d2 -= 0x80;
+ }
+ }
+
+
for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) {
/*
* Decide if the table entry matches the remote input.