[media] saa7134: enable IR support for Hauppauge HVR-1150/1120
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Fri, 20 May 2011 18:28:24 +0000 (15:28 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 20 May 2011 19:31:28 +0000 (16:31 -0300)
Enable the IR support for the Hauppauge HVR-1150 and HVR-1120.

Thanks to Fernando Laudares Camargos for testing the patch.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Fernando Laudares Camargos <fernando.laudares.camargos@gmail.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-input.c

index a41c72cc76c0f74ffc7e9eadd2f73474bb346b42..71b442c2e382e3b37948031e41c318083c09f809 100644 (file)
@@ -7313,6 +7313,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
                break;
        case SAA7134_BOARD_HAUPPAUGE_HVR1150:
        case SAA7134_BOARD_HAUPPAUGE_HVR1120:
+               dev->has_remote = SAA7134_REMOTE_GPIO;
                /* GPIO 26 high for digital, low for analog */
                saa7134_set_gpio(dev, 26, 0);
                msleep(1);
index be1c2a2de27cfa2fb4a3f53bbcf4f23054dd0764..ff6c0e97563e90339458e1eb1c499ceed6009475 100644 (file)
@@ -756,6 +756,14 @@ int saa7134_input_init1(struct saa7134_dev *dev)
                mask_keycode = 0x0ff00;
                mask_keyup   = 0x040000;
                break;
+       case SAA7134_BOARD_HAUPPAUGE_HVR1150:
+       case SAA7134_BOARD_HAUPPAUGE_HVR1120:
+               ir_codes     = RC_MAP_HAUPPAUGE;
+               mask_keydown = 0x0040000;       /* Enable GPIO18 line on both edges */
+               mask_keyup   = 0x0040000;
+               mask_keycode = 0xffff;
+               raw_decode   = true;
+               break;
        }
        if (NULL == ir_codes) {
                printk("%s: Oops: IR config error [card=%d]\n",