Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271915
b: refs/heads/master
c: bd829e9
h: refs/heads/master
i:
  271913: dff8bd9
  271911: ae927a6
v: v3
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Sep 24, 2011
1 parent a5fd45c commit 2b7b967
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 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: 5b3bdfce675040b65a8b97f8209d78a31935c48f
refs/heads/master: bd829e9d1d7de3178d67d94043f43527213a63a0
12 changes: 8 additions & 4 deletions trunk/drivers/media/video/cx23885/cx23888-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ static int cx23888_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,

unsigned int i, n;
union cx23888_ir_fifo_rec *p;
unsigned u, v;
unsigned u, v, w;

n = count / sizeof(union cx23888_ir_fifo_rec)
* sizeof(union cx23888_ir_fifo_rec);
Expand All @@ -692,11 +692,12 @@ static int cx23888_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
if ((p->hw_fifo_data & FIFO_RXTX_RTO) == FIFO_RXTX_RTO) {
/* Assume RTO was because of no IR light input */
u = 0;
v4l2_dbg(2, ir_888_debug, sd, "rx read: end of rx\n");
w = 1;
} else {
u = (p->hw_fifo_data & FIFO_RXTX_LVL) ? 1 : 0;
if (invert)
u = u ? 0 : 1;
w = 0;
}

v = (unsigned) pulse_width_count_to_ns(
Expand All @@ -707,9 +708,12 @@ static int cx23888_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
init_ir_raw_event(&p->ir_core_data);
p->ir_core_data.pulse = u;
p->ir_core_data.duration = v;
p->ir_core_data.timeout = w;

v4l2_dbg(2, ir_888_debug, sd, "rx read: %10u ns %s\n",
v, u ? "mark" : "space");
v4l2_dbg(2, ir_888_debug, sd, "rx read: %10u ns %s %s\n",
v, u ? "mark" : "space", w ? "(timed out)" : "");
if (w)
v4l2_dbg(2, ir_888_debug, sd, "rx read: end of rx\n");
}
return 0;
}
Expand Down
12 changes: 8 additions & 4 deletions trunk/drivers/media/video/cx25840/cx25840-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ static int cx25840_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
u16 divider;
unsigned int i, n;
union cx25840_ir_fifo_rec *p;
unsigned u, v;
unsigned u, v, w;

if (ir_state == NULL)
return -ENODEV;
Expand All @@ -694,11 +694,12 @@ static int cx25840_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
if ((p->hw_fifo_data & FIFO_RXTX_RTO) == FIFO_RXTX_RTO) {
/* Assume RTO was because of no IR light input */
u = 0;
v4l2_dbg(2, ir_debug, sd, "rx read: end of rx\n");
w = 1;
} else {
u = (p->hw_fifo_data & FIFO_RXTX_LVL) ? 1 : 0;
if (invert)
u = u ? 0 : 1;
w = 0;
}

v = (unsigned) pulse_width_count_to_ns(
Expand All @@ -709,9 +710,12 @@ static int cx25840_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
init_ir_raw_event(&p->ir_core_data);
p->ir_core_data.pulse = u;
p->ir_core_data.duration = v;
p->ir_core_data.timeout = w;

v4l2_dbg(2, ir_debug, sd, "rx read: %10u ns %s\n",
v, u ? "mark" : "space");
v4l2_dbg(2, ir_debug, sd, "rx read: %10u ns %s %s\n",
v, u ? "mark" : "space", w ? "(timed out)" : "");
if (w)
v4l2_dbg(2, ir_debug, sd, "rx read: end of rx\n");
}
return 0;
}
Expand Down

0 comments on commit 2b7b967

Please sign in to comment.