Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223567
b: refs/heads/master
c: 1338c92
h: refs/heads/master
i:
  223565: 9294166
  223563: eaf0dae
  223559: 1363207
  223551: 6d3bd61
v: v3
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed Dec 20, 2010
1 parent 9b7a465 commit ed15cb6
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 2ee95db222137429407dfcd6801b0f1a8c689771
refs/heads/master: 1338c925a95cf2b95909d7967b4ebddefa255c02
15 changes: 7 additions & 8 deletions trunk/drivers/media/IR/streamzap.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ static struct usb_driver streamzap_driver = {

static void sz_push(struct streamzap_ir *sz, struct ir_raw_event rawir)
{
ir_raw_event_store(sz->idev, &rawir);
dev_dbg(sz->dev, "Storing %s with duration %u us\n",
(rawir.pulse ? "pulse" : "space"), rawir.duration);
ir_raw_event_store_with_filter(sz->idev, &rawir);
}

static void sz_push_full_pulse(struct streamzap_ir *sz,
Expand All @@ -167,7 +169,6 @@ static void sz_push_full_pulse(struct streamzap_ir *sz,
rawir.duration *= 1000;
rawir.duration &= IR_MAX_DURATION;
}
dev_dbg(sz->dev, "ls %u\n", rawir.duration);
sz_push(sz, rawir);

sz->idle = false;
Expand All @@ -180,7 +181,6 @@ static void sz_push_full_pulse(struct streamzap_ir *sz,
sz->sum += rawir.duration;
rawir.duration *= 1000;
rawir.duration &= IR_MAX_DURATION;
dev_dbg(sz->dev, "p %u\n", rawir.duration);
sz_push(sz, rawir);
}

Expand All @@ -200,7 +200,6 @@ static void sz_push_full_space(struct streamzap_ir *sz,
rawir.duration += SZ_RESOLUTION / 2;
sz->sum += rawir.duration;
rawir.duration *= 1000;
dev_dbg(sz->dev, "s %u\n", rawir.duration);
sz_push(sz, rawir);
}

Expand All @@ -221,8 +220,6 @@ static void streamzap_callback(struct urb *urb)
struct streamzap_ir *sz;
unsigned int i;
int len;
static int timeout = (((SZ_TIMEOUT * SZ_RESOLUTION * 1000) &
IR_MAX_DURATION) | 0x03000000);

if (!urb)
return;
Expand All @@ -246,7 +243,7 @@ static void streamzap_callback(struct urb *urb)

dev_dbg(sz->dev, "%s: received urb, len %d\n", __func__, len);
for (i = 0; i < len; i++) {
dev_dbg(sz->dev, "sz idx %d: %x\n",
dev_dbg(sz->dev, "sz->buf_in[%d]: %x\n",
i, (unsigned char)sz->buf_in[i]);
switch (sz->decoder_state) {
case PulseSpace:
Expand All @@ -273,7 +270,7 @@ static void streamzap_callback(struct urb *urb)
DEFINE_IR_RAW_EVENT(rawir);

rawir.pulse = false;
rawir.duration = timeout;
rawir.duration = sz->props->timeout;
sz->idle = true;
if (sz->timeout_enabled)
sz_push(sz, rawir);
Expand Down Expand Up @@ -444,6 +441,8 @@ static int __devinit streamzap_probe(struct usb_interface *intf,
sz->decoder_state = PulseSpace;
/* FIXME: don't yet have a way to set this */
sz->timeout_enabled = true;
sz->props->timeout = (((SZ_TIMEOUT * SZ_RESOLUTION * 1000) &
IR_MAX_DURATION) | 0x03000000);
#if 0
/* not yet supported, depends on patches from maxim */
/* see also: LIRC_GET_REC_RESOLUTION and LIRC_SET_REC_TIMEOUT */
Expand Down

0 comments on commit ed15cb6

Please sign in to comment.