From patchwork Sat Jul 28 13:01:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Djuri Baars X-Patchwork-Id: 1251691 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id CBCACE006E for ; Sat, 28 Jul 2012 13:01:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752313Ab2G1NBk (ORCPT ); Sat, 28 Jul 2012 09:01:40 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:48651 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275Ab2G1NBk (ORCPT ); Sat, 28 Jul 2012 09:01:40 -0400 Received: by wgbdr13 with SMTP id dr13so3539971wgb.1 for ; Sat, 28 Jul 2012 06:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ZMwXreKALrA0wT7VhosgB3oZiqQcoQNhI+SkdsmIO4o=; b=Qs59JMeuO5mQp9108LdayYSzwrjmrLkHPHXqqj8iSFmSd86lRlwVTeoqbAPi+mrGrs OMMILxARvy17/rYND29epKcwUnYxyxprDxowQPvP9VrX6XSlCjkaiTxLp/97vEFeaqYS 18/5evO6hI8RS+BGmi/4EkC1bPT0zda690vAjYaveaZNl6Gnuiy9hPYUsdZK+X/O/xGN SLrZffAyVFyv58JUJPqjYS+YcINA2tjI/xa+XIhPYxzU+aq6VG4oTIU2DuNVaFUBG4Ao myVlEDLWpnA2oQmFMbksm+5N7AQ3LM5DvkU/o9tMOzHdKPvOkrCoKqQOovplholveIjg nDkg== MIME-Version: 1.0 Received: by 10.180.86.133 with SMTP id p5mr13420408wiz.17.1343480498916; Sat, 28 Jul 2012 06:01:38 -0700 (PDT) Received: by 10.216.19.77 with HTTP; Sat, 28 Jul 2012 06:01:38 -0700 (PDT) Date: Sat, 28 Jul 2012 15:01:38 +0200 Message-ID: Subject: [PATCH] Add support for the Terratec Cinergy T Dual PCIe IR remote From: Djuri Baars To: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The following patch adds support for the infrared remote included in the Terratec Cinergy T Dual PCIe card. By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Djuri Baars --- drivers/media/video/cx23885/cx23885-cards.c | 4 ++++ drivers/media/video/cx23885/cx23885-input.c | 9 +++++++++ 2 files changed, 13 insertions(+) /* @@ -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; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 76b7563..0b80cf0 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c @@ -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]"); @@ -1170,6 +1171,7 @@ int cx23885_ir_init(struct cx23885_dev *dev) params.shutdown = true; v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, ¶ms); break; + case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: case CX23885_BOARD_TEVII_S470: if (!enable_885_ir) break; @@ -1210,6 +1212,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); @@ -1253,6 +1256,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) diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c index ce765e3..bb1f7c8 100644 --- a/drivers/media/video/cx23885/cx23885-input.c +++ b/drivers/media/video/cx23885/cx23885-input.c @@ -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: