aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-input.c')
-rw-r--r--drivers/media/video/cx88/cx88-input.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index 53526d997a4e..8683d104de72 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -224,6 +224,8 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
224 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: 224 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
225 case CX88_BOARD_HAUPPAUGE_HVR1100: 225 case CX88_BOARD_HAUPPAUGE_HVR1100:
226 case CX88_BOARD_HAUPPAUGE_HVR3000: 226 case CX88_BOARD_HAUPPAUGE_HVR3000:
227 case CX88_BOARD_HAUPPAUGE_HVR4000:
228 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
227 ir_codes = ir_codes_hauppauge_new; 229 ir_codes = ir_codes_hauppauge_new;
228 ir_type = IR_TYPE_RC5; 230 ir_type = IR_TYPE_RC5;
229 ir->sampling = 1; 231 ir->sampling = 1;
@@ -259,6 +261,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
259 ir->polling = 1; /* ms */ 261 ir->polling = 1; /* ms */
260 break; 262 break;
261 case CX88_BOARD_PROLINK_PV_8000GT: 263 case CX88_BOARD_PROLINK_PV_8000GT:
264 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
262 ir_codes = ir_codes_pixelview_new; 265 ir_codes = ir_codes_pixelview_new;
263 ir->gpio_addr = MO_GP1_IO; 266 ir->gpio_addr = MO_GP1_IO;
264 ir->mask_keycode = 0x3f; 267 ir->mask_keycode = 0x3f;
@@ -392,7 +395,7 @@ void cx88_ir_irq(struct cx88_core *core)
392{ 395{
393 struct cx88_IR *ir = core->ir; 396 struct cx88_IR *ir = core->ir;
394 u32 samples, ircode; 397 u32 samples, ircode;
395 int i; 398 int i, start, range, toggle, dev, code;
396 399
397 if (NULL == ir) 400 if (NULL == ir)
398 return; 401 return;
@@ -461,6 +464,34 @@ void cx88_ir_irq(struct cx88_core *core)
461 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: 464 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
462 case CX88_BOARD_HAUPPAUGE_HVR1100: 465 case CX88_BOARD_HAUPPAUGE_HVR1100:
463 case CX88_BOARD_HAUPPAUGE_HVR3000: 466 case CX88_BOARD_HAUPPAUGE_HVR3000:
467 case CX88_BOARD_HAUPPAUGE_HVR4000:
468 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
469 ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7);
470 ir_dprintk("biphase decoded: %x\n", ircode);
471 /*
472 * RC5 has an extension bit which adds a new range
473 * of available codes, this is detected here. Also
474 * hauppauge remotes (black/silver) always use
475 * specific device ids. If we do not filter the
476 * device ids then messages destined for devices
477 * such as TVs (id=0) will get through to the
478 * device causing mis-fired events.
479 */
480 /* split rc5 data block ... */
481 start = (ircode & 0x2000) >> 13;
482 range = (ircode & 0x1000) >> 12;
483 toggle= (ircode & 0x0800) >> 11;
484 dev = (ircode & 0x07c0) >> 6;
485 code = (ircode & 0x003f) | ((range << 6) ^ 0x0040);
486 if( start != 1)
487 /* no key pressed */
488 break;
489 if ( dev != 0x1e && dev != 0x1f )
490 /* not a hauppauge remote */
491 break;
492 ir_input_keydown(ir->input, &ir->ir, code, ircode);
493 ir->release = jiffies + msecs_to_jiffies(120);
494 break;
464 case CX88_BOARD_PINNACLE_PCTV_HD_800i: 495 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
465 ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7); 496 ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7);
466 ir_dprintk("biphase decoded: %x\n", ircode); 497 ir_dprintk("biphase decoded: %x\n", ircode);