summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMarkus Rechberger <devnull@localhost>2005-10-11 02:52:03 +0000
committerMarkus Rechberger <devnull@localhost>2005-10-11 02:52:03 +0000
commitd43fc4288b0df817fdac36afbe6737a8de4826a8 (patch)
treec05adc8e49174cb16fd7a83b96902637259b43a8 /linux/drivers/media/video
parentbe0f6220f923cb5e25e59785a330bbb8a27bef3e (diff)
downloadmediapointer-dvb-s2-d43fc4288b0df817fdac36afbe6737a8de4826a8.tar.gz
mediapointer-dvb-s2-d43fc4288b0df817fdac36afbe6737a8de4826a8.tar.bz2
added support for the terratec cinergy 250 usb tv remote
Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-i2c.c2
-rw-r--r--linux/drivers/media/video/ir-kbd-i2c.c47
2 files changed, 47 insertions, 2 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c
index d7f08fb79..fa56179b0 100644
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c
@@ -31,7 +31,7 @@
/* To be moved to compat.h */
#if !defined(I2C_HW_B_EM2820)
-#define I2C_HW_B_EM2820 I2C_HW_B_BT848
+#define I2C_HW_B_EM2820 0x99
#endif
#include "em2820.h"
diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c
index bf40fe0cf..a09c45170 100644
--- a/linux/drivers/media/video/ir-kbd-i2c.c
+++ b/linux/drivers/media/video/ir-kbd-i2c.c
@@ -1,5 +1,5 @@
/*
- * $Id: ir-kbd-i2c.c,v 1.14 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: ir-kbd-i2c.c,v 1.15 2005/10/11 02:52:03 mrechberger Exp $
*
* keyboard input driver for i2c IR remote controls
*
@@ -9,6 +9,8 @@
* Christoph Bartelmus <lirc@bartelmus.de>
* modified for KNC ONE TV Station/Anubis Typhoon TView Tuner by
* Ulrich Mueller <ulrich.mueller42@web.de>
+ * modified for em2820 based USB TV tuners by
+ * Markus Rechberger <mrechberger@gmail.com>
*
* 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
@@ -43,6 +45,38 @@
#include "compat.h"
#include <media/ir-common.h>
+static IR_KEYTAB_TYPE ir_codes_em2820[IR_KEYTAB_SIZE] = {
+ [ 0 ] = KEY_CHANNEL,
+ [ 1 ] = KEY_SELECT,
+ [ 2 ] = KEY_MUTE,
+ [ 3 ] = KEY_POWER,
+ [ 4 ] = KEY_KP1,
+ [ 5 ] = KEY_KP2,
+ [ 6 ] = KEY_KP3,
+ [ 7 ] = KEY_CHANNELUP,
+ [ 8 ] = KEY_KP4,
+ [ 9 ] = KEY_KP5,
+ [ 10 ] = KEY_KP6,
+
+ [ 11 ] = KEY_CHANNELDOWN,
+ [ 12 ] = KEY_KP7,
+ [ 13 ] = KEY_KP8,
+ [ 14 ] = KEY_KP9,
+ [ 15 ] = KEY_VOLUMEUP,
+ [ 16 ] = KEY_KP0,
+ [ 17 ] = KEY_MENU,
+ [ 18 ] = KEY_PRINT,
+
+ [ 19 ] = KEY_VOLUMEDOWN,
+ [ 21 ] = KEY_PAUSE,
+ [ 23 ] = KEY_RECORD,
+ [ 24 ] = KEY_REWIND,
+ [ 25 ] = KEY_PLAY,
+ [ 27 ] = KEY_BACKSPACE,
+ [ 29 ] = KEY_STOP,
+ [ 31 ] = KEY_ZOOM,
+};
+
/* Mark Phalan <phalanm@o2.ie> */
static IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE] = {
[ 0 ] = KEY_KP0,
@@ -358,6 +392,13 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
ir_type = IR_TYPE_RC5;
ir_codes = ir_codes_rc5_tv;
break;
+ case 0x60:
+ name = "em2820";
+ ir->get_key = get_key_knc1;
+ ir->c.addr = addr>>1;
+ ir_type = IR_TYPE_OTHER;
+ ir_codes = ir_codes_em2820;
+ break;
case 0x30:
name = "KNC One";
ir->get_key = get_key_knc1;
@@ -434,6 +475,7 @@ static int ir_probe(struct i2c_adapter *adap)
static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1};
static const int probe_saa7134[] = { 0x7a, -1 };
+ static const int probe_em2820[] = { 0x60, -1 };
const int *probe = NULL;
struct i2c_client c; char buf; int i,rc;
@@ -444,6 +486,9 @@ static int ir_probe(struct i2c_adapter *adap)
case I2C_HW_SAA7134:
probe = probe_saa7134;
break;
+ case I2C_HW_B_EM2820:
+ probe = probe_em2820;
+ break;
}
if (NULL == probe)
return 0;