diff options
author | Andy Walls <awalls@md.metrocast.net> | 2010-08-01 02:18:13 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 23:42:56 -0300 |
commit | c02e0d12a9a0a913dee5efd695603b73ee4b729a (patch) | |
tree | 124e8438dc79d6bcc9d964cb555dbe3747c21e3d /drivers/media/video/cx23885/cx23885-input.c | |
parent | 2560d94e330f35776e944b54256a526a19259429 (diff) | |
download | op-kernel-dev-c02e0d12a9a0a913dee5efd695603b73ee4b729a.zip op-kernel-dev-c02e0d12a9a0a913dee5efd695603b73ee4b729a.tar.gz |
V4L/DVB: cx23885, cx25840: Change IR measurment records to use struct ir_raw_event
The CX23885 and CX25840 modules were using their own simple
IR pulse width measurement record type which required conversion
when passing to the new IR core. This change makes that record type
consistent with the new IR core and removes a data conversion.
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-input.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-input.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c index 252817a..bb61870 100644 --- a/drivers/media/video/cx23885/cx23885-input.c +++ b/drivers/media/video/cx23885/cx23885-input.c @@ -44,34 +44,26 @@ #define MODULE_NAME "cx23885" -static void convert_measurement(u32 x, struct ir_raw_event *y) -{ - y->pulse = (x & V4L2_SUBDEV_IR_PULSE_LEVEL_MASK) ? true : false; - y->duration = x & V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS; -} - static void cx23885_input_process_measurements(struct cx23885_dev *dev, bool overrun) { struct cx23885_kernel_ir *kernel_ir = dev->kernel_ir; - struct ir_raw_event kernel_ir_event; - u32 sd_ir_data[64]; ssize_t num; int count, i; bool handle = false; + struct ir_raw_event ir_core_event[64]; do { num = 0; - v4l2_subdev_call(dev->sd_ir, ir, rx_read, (u8 *) sd_ir_data, - sizeof(sd_ir_data), &num); + v4l2_subdev_call(dev->sd_ir, ir, rx_read, (u8 *) ir_core_event, + sizeof(ir_core_event), &num); - count = num / sizeof(u32); + count = num / sizeof(struct ir_raw_event); for (i = 0; i < count; i++) { - convert_measurement(sd_ir_data[i], &kernel_ir_event); ir_raw_event_store(kernel_ir->inp_dev, - &kernel_ir_event); + &ir_core_event[i]); handle = true; } } while (num != 0); |