Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208142
b: refs/heads/master
c: 2560d94
h: refs/heads/master
v: v3
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Aug 9, 2010
1 parent 4889477 commit 4537660
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ceb152add687db152d90ba64b54687b3975963cf
refs/heads/master: 2560d94e330f35776e944b54256a526a19259429
6 changes: 0 additions & 6 deletions trunk/drivers/media/video/cx23885/cx23885-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@

static void convert_measurement(u32 x, struct ir_raw_event *y)
{
if (x == V4L2_SUBDEV_IR_PULSE_RX_SEQ_END) {
y->pulse = false;
y->duration = V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS;
return;
}

y->pulse = (x & V4L2_SUBDEV_IR_PULSE_LEVEL_MASK) ? true : false;
y->duration = x & V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS;
}
Expand Down
14 changes: 8 additions & 6 deletions trunk/drivers/media/video/cx23885/cx23888-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,16 +675,18 @@ static int cx23888_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
*num = n * sizeof(u32);

for (p = (u32 *) buf, i = 0; i < n; p++, i++) {

if ((*p & FIFO_RXTX_RTO) == FIFO_RXTX_RTO) {
*p = V4L2_SUBDEV_IR_PULSE_RX_SEQ_END;
/* Assume RTO was because of no IR light input */
u = 0;
v4l2_dbg(2, ir_888_debug, sd, "rx read: end of rx\n");
continue;
} else {
u = (*p & FIFO_RXTX_LVL)
? V4L2_SUBDEV_IR_PULSE_LEVEL_MASK : 0;
if (invert)
u = u ? 0 : V4L2_SUBDEV_IR_PULSE_LEVEL_MASK;
}

u = (*p & FIFO_RXTX_LVL) ? V4L2_SUBDEV_IR_PULSE_LEVEL_MASK : 0;
if (invert)
u = u ? 0 : V4L2_SUBDEV_IR_PULSE_LEVEL_MASK;

v = (u32) pulse_width_count_to_ns((u16) (*p & FIFO_RXTX),
divider);
if (v >= V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS)
Expand Down
14 changes: 8 additions & 6 deletions trunk/drivers/media/video/cx25840/cx25840-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,16 +677,18 @@ static int cx25840_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
*num = n * sizeof(u32);

for (p = (u32 *) buf, i = 0; i < n; p++, i++) {

if ((*p & FIFO_RXTX_RTO) == FIFO_RXTX_RTO) {
*p = V4L2_SUBDEV_IR_PULSE_RX_SEQ_END;
/* Assume RTO was because of no IR light input */
u = 0;
v4l2_dbg(2, ir_debug, sd, "rx read: end of rx\n");
continue;
} else {
u = (*p & FIFO_RXTX_LVL)
? V4L2_SUBDEV_IR_PULSE_LEVEL_MASK : 0;
if (invert)
u = u ? 0 : V4L2_SUBDEV_IR_PULSE_LEVEL_MASK;
}

u = (*p & FIFO_RXTX_LVL) ? V4L2_SUBDEV_IR_PULSE_LEVEL_MASK : 0;
if (invert)
u = u ? 0 : V4L2_SUBDEV_IR_PULSE_LEVEL_MASK;

v = (u32) pulse_width_count_to_ns((u16) (*p & FIFO_RXTX),
divider);
if (v >= V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS)
Expand Down

0 comments on commit 4537660

Please sign in to comment.