summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-05-14 10:17:07 +0000
committerGerd Knorr <devnull@localhost>2004-05-14 10:17:07 +0000
commit568fc24f5c99af11dfb996ff251c4670d235143f (patch)
treea2d6597157e4751ce0975902b05fc8f6c4328229
parente31f07e0db2537b94112db6160a5485439e2e521 (diff)
downloadmediapointer-dvb-s2-568fc24f5c99af11dfb996ff251c4670d235143f.tar.gz
mediapointer-dvb-s2-568fc24f5c99af11dfb996ff251c4670d235143f.tar.bz2
- avermedia IR fixes (by Tomas Kopal).
-rw-r--r--linux/drivers/media/video/ir-kbd-gpio.c81
1 files changed, 40 insertions, 41 deletions
diff --git a/linux/drivers/media/video/ir-kbd-gpio.c b/linux/drivers/media/video/ir-kbd-gpio.c
index 36840f20e..6066b20c9 100644
--- a/linux/drivers/media/video/ir-kbd-gpio.c
+++ b/linux/drivers/media/video/ir-kbd-gpio.c
@@ -32,47 +32,45 @@
/* ---------------------------------------------------------------------- */
static IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE] = {
- [ 17 ] = KEY_KP0,
- [ 20 ] = KEY_KP1,
- [ 12 ] = KEY_KP2,
- [ 28 ] = KEY_KP3,
- [ 18 ] = KEY_KP4,
- [ 10 ] = KEY_KP5,
- [ 26 ] = KEY_KP6,
- [ 22 ] = KEY_KP7,
- [ 14 ] = KEY_KP8,
- [ 30 ] = KEY_KP9,
-
- [ 24 ] = KEY_EJECTCD, // Unmarked on my controller
+ [ 34 ] = KEY_KP0,
+ [ 40 ] = KEY_KP1,
+ [ 24 ] = KEY_KP2,
+ [ 56 ] = KEY_KP3,
+ [ 36 ] = KEY_KP4,
+ [ 20 ] = KEY_KP5,
+ [ 52 ] = KEY_KP6,
+ [ 44 ] = KEY_KP7,
+ [ 28 ] = KEY_KP8,
+ [ 60 ] = KEY_KP9,
+
+ [ 48 ] = KEY_EJECTCD, // Unmarked on my controller
[ 0 ] = KEY_POWER,
- [ 9 ] = BTN_LEFT, // DISPLAY/L
- [ 25 ] = BTN_RIGHT, // LOOP/R
- [ 5 ] = KEY_MUTE,
- [ 19 ] = KEY_RECORD,
- [ 11 ] = KEY_PAUSE,
- [ 27 ] = KEY_STOP,
- [ 15 ] = KEY_VOLUMEDOWN,
- [ 31 ] = KEY_VOLUMEUP,
-
- [ 16 ] = KEY_TUNER, // TV/FM
- [ 8 ] = KEY_CD,
- [ 4 ] = KEY_VIDEO,
- [ 2 ] = KEY_AUDIO,
- [ 6 ] = KEY_ZOOM, // full screen
- [ 1 ] = KEY_INFO, // preview
- [ 21 ] = KEY_SEARCH, // autoscan
- [ 13 ] = KEY_STOP, // freeze
- [ 29 ] = KEY_RECORD, // capture
- [ 3 ] = KEY_PLAY, // unmarked
- [ 24 ] = KEY_RED, // unmarked
- [ 7 ] = KEY_GREEN, // unmarked
-
-#if 0
- [ 16 ] = KEY_YELLOW, // unmarked
- [ 8 ] = KEY_CHANNELDOWN,
- [ 24 ] = KEY_CHANNELUP,
- [ 0 ] = KEY_BLUE, // unmarked
-#endif
+ [ 18 ] = BTN_LEFT, // DISPLAY/L
+ [ 50 ] = BTN_RIGHT, // LOOP/R
+ [ 10 ] = KEY_MUTE,
+ [ 38 ] = KEY_RECORD,
+ [ 22 ] = KEY_PAUSE,
+ [ 54 ] = KEY_STOP,
+ [ 30 ] = KEY_VOLUMEDOWN,
+ [ 62 ] = KEY_VOLUMEUP,
+
+ [ 32 ] = KEY_TUNER, // TV/FM
+ [ 16 ] = KEY_CD,
+ [ 8 ] = KEY_VIDEO,
+ [ 4 ] = KEY_AUDIO,
+ [ 12 ] = KEY_ZOOM, // full screen
+ [ 2 ] = KEY_INFO, // preview
+ [ 42 ] = KEY_SEARCH, // autoscan
+ [ 26 ] = KEY_STOP, // freeze
+ [ 58 ] = KEY_RECORD, // capture
+ [ 6 ] = KEY_PLAY, // unmarked
+ [ 46 ] = KEY_RED, // unmarked
+ [ 14 ] = KEY_GREEN, // unmarked
+
+ [ 33 ] = KEY_YELLOW, // unmarked
+ [ 17 ] = KEY_CHANNELDOWN,
+ [ 49 ] = KEY_CHANNELUP,
+ [ 1 ] = KEY_BLUE, // unmarked
};
static IR_KEYTAB_TYPE winfast_codes[IR_KEYTAB_SIZE] = {
@@ -280,8 +278,9 @@ static int ir_probe(struct device *dev)
case BTTV_AVPHONE98:
case BTTV_AVERMEDIA98:
ir_codes = ir_codes_avermedia;
- ir->mask_keycode = 0xf80000;
+ ir->mask_keycode = 0xf88000;
ir->mask_keydown = 0x010000;
+ ir->polling = 50; // ms
break;
case BTTV_PXELVWPLTVPAK: