Commit dbda8f70 authored by Andy Walls's avatar Andy Walls Committed by Mauro Carvalho Chehab

V4L/DVB (13100): cx23885: Add IR input keypress handling and enable for the HVR-1850

This changes adds IR Rx keypress input event handling to the CX23885 module.
This change specifically only adds input handling for IR devices implemented as
v4l2_subdevices, using only the pulse width mode (for now), and only with
RC-5 remotes.  The V4L-DVB infrastructure is missing too much to support RC-6
mode 6A as used in many media center remotes.   The grey Hauppauge RC-5 remote
and HVR-1850 IR receiver work now.
Signed-off-by: default avatarAndy Walls <awalls@radix.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1d23a002
cx23885-objs := cx23885-cards.o cx23885-video.o cx23885-vbi.o \
cx23885-core.o cx23885-i2c.o cx23885-dvb.o cx23885-417.o \
cx23885-ioctl.o cx23885-ir.o cx23888-ir.o \
cx23885-ioctl.o cx23885-ir.o cx23885-input.o cx23888-ir.o \
netup-init.o cimax2.o netup-eeprom.o
obj-$(CONFIG_VIDEO_CX23885) += cx23885.o
......
......@@ -34,6 +34,7 @@
#include "cimax2.h"
#include "cx23888-ir.h"
#include "cx23885-ir.h"
#include "cx23885-input.h"
MODULE_DESCRIPTION("Driver for cx23885 based TV cards");
MODULE_AUTHOR("Steven Toth <stoth@linuxtv.org>");
......@@ -1959,6 +1960,7 @@ static int __devinit cx23885_initdev(struct pci_dev *pci_dev,
* is hooked up by the call to request_irq() above.
*/
cx23885_ir_pci_int_enable(dev);
cx23885_input_init(dev);
return 0;
......@@ -1976,6 +1978,7 @@ static void __devexit cx23885_finidev(struct pci_dev *pci_dev)
struct v4l2_device *v4l2_dev = pci_get_drvdata(pci_dev);
struct cx23885_dev *dev = to_cx23885(v4l2_dev);
cx23885_input_fini(dev);
cx23885_ir_fini(dev);
cx23885_shutdown(dev);
......
This diff is collapsed.
/*
* Driver for the Conexant CX23885/7/8 PCIe bridge
*
* Infrared remote control input device
*
* Copyright (C) 2009 Andy Walls <awalls@radix.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef _CX23885_INPUT_H_
#define _CX23885_INPUT_H_
int cx23885_input_rx_work_handler(struct cx23885_dev *dev, u32 events);
int cx23885_input_init(struct cx23885_dev *dev);
void cx23885_input_fini(struct cx23885_dev *dev);
#endif
......@@ -24,6 +24,7 @@
#include <media/v4l2-device.h>
#include "cx23885.h"
#include "cx23885-input.h"
#define CX23885_IR_RX_FIFO_SERVICE_REQ 0
#define CX23885_IR_RX_END_OF_RX_DETECTED 1
......@@ -51,6 +52,9 @@ void cx23885_ir_rx_work_handler(struct work_struct *work)
if (events == 0)
return;
if (dev->ir_input)
cx23885_input_rx_work_handler(dev, events);
}
void cx23885_ir_tx_work_handler(struct work_struct *work)
......
......@@ -363,6 +363,9 @@ struct cx23885_dev {
struct work_struct ir_tx_work;
unsigned long ir_tx_notifications;
struct card_ir *ir_input;
atomic_t ir_input_stopping;
/* V4l */
u32 freq;
struct video_device *video_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment