[media] Add support for the Terratec Cinergy T Dual PCIe IR remote
authorDjuri Baars <dsbaars@gmail.com>
Sat, 28 Jul 2012 12:01:38 +0000 (09:01 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 31 Jul 2012 03:18:58 +0000 (00:18 -0300)
The following patch adds support for the infrared remote included in
the Terratec Cinergy T Dual PCIe card.

Signed-off-by: Djuri Baars <dsbaars@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cx23885-cards.c
drivers/media/video/cx23885/cx23885-input.c

index 080e11157e5fe89afdb384c702376d80528daf5d..d365e9a8efc4e1e4cb8570ae58baa107cf9ee3bf 100644 (file)
@@ -46,6 +46,7 @@ MODULE_PARM_DESC(enable_885_ir,
                 "Enable integrated IR controller for supported\n"
                 "\t\t    CX2388[57] boards that are wired for it:\n"
                 "\t\t\tHVR-1250 (reported safe)\n"
+                "\t\t\tTerraTec Cinergy T PCIe Dual (not well tested, appears to be safe)\n"
                 "\t\t\tTeVii S470 (reported unsafe)\n"
                 "\t\t    This can cause an interrupt storm with some cards.\n"
                 "\t\t    Default: 0 [Disabled]");
@@ -1363,6 +1364,7 @@ int cx23885_ir_init(struct cx23885_dev *dev)
                params.shutdown = true;
                v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, &params);
                break;
+       case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
        case CX23885_BOARD_TEVII_S470:
                if (!enable_885_ir)
                        break;
@@ -1403,6 +1405,7 @@ void cx23885_ir_fini(struct cx23885_dev *dev)
                cx23888_ir_remove(dev);
                dev->sd_ir = NULL;
                break;
+       case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
        case CX23885_BOARD_TEVII_S470:
        case CX23885_BOARD_HAUPPAUGE_HVR1250:
                cx23885_irq_remove(dev, PCI_MSK_AV_CORE);
@@ -1446,6 +1449,7 @@ void cx23885_ir_pci_int_enable(struct cx23885_dev *dev)
                if (dev->sd_ir)
                        cx23885_irq_add_enable(dev, PCI_MSK_IR);
                break;
+       case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
        case CX23885_BOARD_TEVII_S470:
        case CX23885_BOARD_HAUPPAUGE_HVR1250:
                if (dev->sd_ir)
index ce765e3f77bdf6b679ba1b56900035f4f38d51c2..56066721edc17423726188858aa66e4ea017ff0b 100644 (file)
@@ -85,6 +85,7 @@ void cx23885_input_rx_work_handler(struct cx23885_dev *dev, u32 events)
        case CX23885_BOARD_HAUPPAUGE_HVR1270:
        case CX23885_BOARD_HAUPPAUGE_HVR1850:
        case CX23885_BOARD_HAUPPAUGE_HVR1290:
+       case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
        case CX23885_BOARD_TEVII_S470:
        case CX23885_BOARD_HAUPPAUGE_HVR1250:
                /*
@@ -162,6 +163,7 @@ static int cx23885_input_ir_start(struct cx23885_dev *dev)
                 */
                params.invert_level = true;
                break;
+       case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
        case CX23885_BOARD_TEVII_S470:
                /*
                 * The IR controller on this board only returns pulse widths.
@@ -272,6 +274,13 @@ int cx23885_input_init(struct cx23885_dev *dev)
                /* The grey Hauppauge RC-5 remote */
                rc_map = RC_MAP_HAUPPAUGE;
                break;
+       case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
+               /* Integrated CX23885 IR controller */
+               driver_type = RC_DRIVER_IR_RAW;
+               allowed_protos = RC_TYPE_NEC;
+               /* The grey Terratec remote with orange buttons */
+               rc_map = RC_MAP_NEC_TERRATEC_CINERGY_XS;
+               break;
        case CX23885_BOARD_TEVII_S470:
                /* Integrated CX23885 IR controller */
                driver_type = RC_DRIVER_IR_RAW;