aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-input.c
diff options
context:
space:
mode:
authorSylvain Pasche <sylvain.pasche@gmail.com>2006-03-25 21:14:42 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 01:00:28 -0400
commitb93eedb62e358588c5e595b07fb85efa1f597a9f (patch)
treeec3ffd9ccd6136d752efa1dbea9235dbd85ed7f8 /drivers/media/video/saa7134/saa7134-input.c
parente48a9c6283c1ca2565167f0b4bce4d0be7f49fae (diff)
V4L/DVB (4023): Subject: Pinnacle PCTV grey remote control support
This adds support for the older (?) Pinnacle PCTV remotes (with all buttons colored in grey). There's no autodetection for the type of remote, though; saa7134 defaults to the colored one, to use the grey remote the "pinnacle_remote=1" option must be passed to the saa7134 module Signed-off-by: Sylvain Pasche <sylvain.pasche@gmail.com> Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-input.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 1426e4c8602f..7c595492c56b 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -37,6 +37,10 @@ static unsigned int ir_debug = 0;
37module_param(ir_debug, int, 0644); 37module_param(ir_debug, int, 0644);
38MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]"); 38MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]");
39 39
40static int pinnacle_remote = 0;
41module_param(pinnacle_remote, int, 0644); /* Choose Pinnacle PCTV remote */
42MODULE_PARM_DESC(pinnacle_remote, "Specify Pinnacle PCTV remote: 0=coloured, 1=grey (defaults to 0)");
43
40#define dprintk(fmt, arg...) if (ir_debug) \ 44#define dprintk(fmt, arg...) if (ir_debug) \
41 printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg) 45 printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg)
42#define i2cdprintk(fmt, arg...) if (ir_debug) \ 46#define i2cdprintk(fmt, arg...) if (ir_debug) \
@@ -316,8 +320,13 @@ void saa7134_set_i2c_ir(struct saa7134_dev *dev, struct IR_i2c *ir)
316 switch (dev->board) { 320 switch (dev->board) {
317 case SAA7134_BOARD_PINNACLE_PCTV_110i: 321 case SAA7134_BOARD_PINNACLE_PCTV_110i:
318 snprintf(ir->c.name, sizeof(ir->c.name), "Pinnacle PCTV"); 322 snprintf(ir->c.name, sizeof(ir->c.name), "Pinnacle PCTV");
319 ir->get_key = get_key_pinnacle; 323 if (pinnacle_remote == 0) {
320 ir->ir_codes = ir_codes_pinnacle; 324 ir->get_key = get_key_pinnacle_color;
325 ir->ir_codes = ir_codes_pinnacle_color;
326 } else {
327 ir->get_key = get_key_pinnacle_grey;
328 ir->ir_codes = ir_codes_pinnacle_grey;
329 }
321 break; 330 break;
322 case SAA7134_BOARD_UPMOST_PURPLE_TV: 331 case SAA7134_BOARD_UPMOST_PURPLE_TV:
323 snprintf(ir->c.name, sizeof(ir->c.name), "Purple TV"); 332 snprintf(ir->c.name, sizeof(ir->c.name), "Purple TV");