summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2005-02-22 12:28:40 +0000
committerGerd Knorr <devnull@localhost>2005-02-22 12:28:40 +0000
commita68e65b100156e8877696e02d27b7c6485a6a7e6 (patch)
tree35a146ff779f596f82b4298eea8ee195f2895b5d
parent3f08c54d9289e972068dd8676d823c479925dfb5 (diff)
downloadmediapointer-dvb-s2-a68e65b100156e8877696e02d27b7c6485a6a7e6.tar.gz
mediapointer-dvb-s2-a68e65b100156e8877696e02d27b7c6485a6a7e6.tar.bz2
- cx88: ir patches from Robert Reid.
-rw-r--r--linux/drivers/media/common/ir-common.c49
-rw-r--r--linux/drivers/media/video/cx88/cx88-input.c11
-rw-r--r--linux/drivers/media/video/ir-kbd-gpio.c51
-rw-r--r--linux/include/media/ir-common.h3
4 files changed, 62 insertions, 52 deletions
diff --git a/linux/drivers/media/common/ir-common.c b/linux/drivers/media/common/ir-common.c
index e99775e84..3d3ea539b 100644
--- a/linux/drivers/media/common/ir-common.c
+++ b/linux/drivers/media/common/ir-common.c
@@ -1,5 +1,5 @@
/*
- * $Id: ir-common.c,v 1.7 2005/02/16 13:11:55 kraxel Exp $
+ * $Id: ir-common.c,v 1.8 2005/02/22 12:28:40 kraxel Exp $
*
* some common structs and functions to handle infrared remotes via
* input layer ...
@@ -118,6 +118,53 @@ IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE] = {
};
EXPORT_SYMBOL_GPL(ir_codes_rc5_tv);
+/* Table for Leadtek Winfast Remote Controls - used by both bttv and cx88 */
+IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE] = {
+ [ 5 ] = KEY_KP1,
+ [ 6 ] = KEY_KP2,
+ [ 7 ] = KEY_KP3,
+ [ 9 ] = KEY_KP4,
+ [ 10 ] = KEY_KP5,
+ [ 11 ] = KEY_KP6,
+ [ 13 ] = KEY_KP7,
+ [ 14 ] = KEY_KP8,
+ [ 15 ] = KEY_KP9,
+ [ 18 ] = KEY_KP0,
+
+ [ 0 ] = KEY_POWER,
+// [ 27 ] = MTS button
+ [ 2 ] = KEY_TUNER, // TV/FM
+ [ 30 ] = KEY_VIDEO,
+// [ 22 ] = display button
+ [ 4 ] = KEY_VOLUMEUP,
+ [ 8 ] = KEY_VOLUMEDOWN,
+ [ 12 ] = KEY_CHANNELUP,
+ [ 16 ] = KEY_CHANNELDOWN,
+ [ 3 ] = KEY_ZOOM, // fullscreen
+ [ 31 ] = KEY_SUBTITLE, // closed caption/teletext
+ [ 32 ] = KEY_SLEEP,
+// [ 41 ] = boss key
+ [ 20 ] = KEY_MUTE,
+ [ 43 ] = KEY_RED,
+ [ 44 ] = KEY_GREEN,
+ [ 45 ] = KEY_YELLOW,
+ [ 46 ] = KEY_BLUE,
+ [ 24 ] = KEY_KPPLUS, //fine tune +
+ [ 25 ] = KEY_KPMINUS, //fine tune -
+// [ 42 ] = picture in picture
+ [ 33 ] = KEY_KPDOT,
+ [ 19 ] = KEY_KPENTER,
+// [ 17 ] = recall
+ [ 34 ] = KEY_BACK,
+ [ 35 ] = KEY_PLAYPAUSE,
+ [ 36 ] = KEY_NEXT,
+// [ 37 ] = time shifting
+ [ 38 ] = KEY_STOP,
+ [ 39 ] = KEY_RECORD
+// [ 40 ] = snapshot
+};
+EXPORT_SYMBOL_GPL(ir_codes_winfast);
+
/* empty keytable, can be used as placeholder for not-yet created keytables */
IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE] = {
[ 42 ] = KEY_COFFEE,
diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c
index 9029c818e..90388482c 100644
--- a/linux/drivers/media/video/cx88/cx88-input.c
+++ b/linux/drivers/media/video/cx88/cx88-input.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-input.c,v 1.7 2005/02/16 13:11:55 kraxel Exp $
+ * $Id: cx88-input.c,v 1.8 2005/02/22 12:28:40 kraxel Exp $
*
* Device driver for GPIO attached remote control interfaces
* on Conexant 2388x based TV/DVB cards.
@@ -146,7 +146,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
}
} else {
- /* can't disturgissh keydown/up :-/ */
+ /* can't distinguish keydown/up :-/ */
ir_input_keydown(&ir->input,&ir->ir,data,data);
ir_input_nokey(&ir->input,&ir->ir);
}
@@ -197,6 +197,13 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
ir_type = IR_TYPE_RC5;
ir->sampling = 1;
break;
+ case CX88_BOARD_WINFAST2000XP_EXPERT:
+ ir_codes = ir_codes_winfast;
+ ir->gpio_addr = MO_GP0_IO;
+ ir->mask_keycode = 0x8f8;
+ ir->mask_keyup = 0x100;
+ ir->polling = 1; // ms
+ break;
}
if (NULL == ir_codes) {
kfree(ir);
diff --git a/linux/drivers/media/video/ir-kbd-gpio.c b/linux/drivers/media/video/ir-kbd-gpio.c
index 81ea27d39..5a4144fbf 100644
--- a/linux/drivers/media/video/ir-kbd-gpio.c
+++ b/linux/drivers/media/video/ir-kbd-gpio.c
@@ -1,5 +1,5 @@
/*
- * $Id: ir-kbd-gpio.c,v 1.11 2004/10/25 11:26:36 kraxel Exp $
+ * $Id: ir-kbd-gpio.c,v 1.12 2005/02/22 12:28:40 kraxel Exp $
*
* Copyright (c) 2003 Gerd Knorr
* Copyright (c) 2003 Pavel Machek
@@ -114,51 +114,6 @@ static IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = {
[ 0x3e ] = KEY_VOLUMEUP, // 'volume +'
};
-static IR_KEYTAB_TYPE winfast_codes[IR_KEYTAB_SIZE] = {
- [ 5 ] = KEY_KP1,
- [ 6 ] = KEY_KP2,
- [ 7 ] = KEY_KP3,
- [ 9 ] = KEY_KP4,
- [ 10 ] = KEY_KP5,
- [ 11 ] = KEY_KP6,
- [ 13 ] = KEY_KP7,
- [ 14 ] = KEY_KP8,
- [ 15 ] = KEY_KP9,
- [ 18 ] = KEY_KP0,
-
- [ 0 ] = KEY_POWER,
-// [ 27 ] = MTS button
- [ 2 ] = KEY_TUNER, // TV/FM
- [ 30 ] = KEY_VIDEO,
-// [ 22 ] = display button
- [ 4 ] = KEY_VOLUMEUP,
- [ 8 ] = KEY_VOLUMEDOWN,
- [ 12 ] = KEY_CHANNELUP,
- [ 16 ] = KEY_CHANNELDOWN,
- [ 3 ] = KEY_ZOOM, // fullscreen
- [ 31 ] = KEY_SUBTITLE, // closed caption/teletext
- [ 32 ] = KEY_SLEEP,
-// [ 41 ] = boss key
- [ 20 ] = KEY_MUTE,
- [ 43 ] = KEY_RED,
- [ 44 ] = KEY_GREEN,
- [ 45 ] = KEY_YELLOW,
- [ 46 ] = KEY_BLUE,
- [ 24 ] = KEY_KPPLUS, //fine tune +
- [ 25 ] = KEY_KPMINUS, //fine tune -
-// [ 42 ] = picture in picture
- [ 33 ] = KEY_KPDOT,
- [ 19 ] = KEY_KPENTER,
-// [ 17 ] = recall
- [ 34 ] = KEY_BACK,
- [ 35 ] = KEY_PLAYPAUSE,
- [ 36 ] = KEY_NEXT,
-// [ 37 ] = time shifting
- [ 38 ] = KEY_STOP,
- [ 39 ] = KEY_RECORD
-// [ 40 ] = snapshot
-};
-
static IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE] = {
[ 2 ] = KEY_KP0,
[ 1 ] = KEY_KP1,
@@ -388,12 +343,12 @@ static int ir_probe(struct device *dev)
break;
case BTTV_WINFAST2000:
- ir_codes = winfast_codes;
+ ir_codes = ir_codes_winfast;
ir->mask_keycode = 0x1f8;
break;
case BTTV_MAGICTVIEW061:
case BTTV_MAGICTVIEW063:
- ir_codes = winfast_codes;
+ ir_codes = ir_codes_winfast;
ir->mask_keycode = 0x0008e000;
ir->mask_keydown = 0x00200000;
break;
diff --git a/linux/include/media/ir-common.h b/linux/include/media/ir-common.h
index 577c37818..69a09aaa4 100644
--- a/linux/include/media/ir-common.h
+++ b/linux/include/media/ir-common.h
@@ -1,5 +1,5 @@
/*
- * $Id: ir-common.h,v 1.7 2005/02/16 13:11:55 kraxel Exp $
+ * $Id: ir-common.h,v 1.8 2005/02/22 12:28:40 kraxel Exp $
*
* some common structs and functions to handle infrared remotes via
* input layer ...
@@ -76,6 +76,7 @@ struct ir_input_state {
};
extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE];
+extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE];