Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208157
b: refs/heads/master
c: 39b2c06
h: refs/heads/master
i:
  208155: 6057cc8
v: v3
  • Loading branch information
Maxim Levitsky authored and Mauro Carvalho Chehab committed Aug 9, 2010
1 parent 22377fd commit 2ea8935
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 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: 0d2cb1de8e81ffc06df67853be5ead3556d3a6b5
refs/heads/master: 39b2c0687b238d8bce19d5e8c0c8dc4e7fe50ed4
14 changes: 13 additions & 1 deletion trunk/drivers/media/IR/ir-jvc-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum jvc_state {
STATE_BIT_SPACE,
STATE_TRAILER_PULSE,
STATE_TRAILER_SPACE,
STATE_CHECK_REPEAT,
};

/**
Expand Down Expand Up @@ -60,6 +61,7 @@ static int ir_jvc_decode(struct input_dev *input_dev, struct ir_raw_event ev)
IR_dprintk(2, "JVC decode started at state %d (%uus %s)\n",
data->state, TO_US(ev.duration), TO_STR(ev.pulse));

again:
switch (data->state) {

case STATE_INACTIVE:
Expand Down Expand Up @@ -149,8 +151,18 @@ static int ir_jvc_decode(struct input_dev *input_dev, struct ir_raw_event ev)
}

data->count = 0;
data->state = STATE_BIT_PULSE;
data->state = STATE_CHECK_REPEAT;
return 0;

case STATE_CHECK_REPEAT:
if (!ev.pulse)
break;

if (eq_margin(ev.duration, JVC_HEADER_PULSE, JVC_UNIT / 2))
data->state = STATE_INACTIVE;
else
data->state = STATE_BIT_PULSE;
goto again;
}

out:
Expand Down

0 comments on commit 2ea8935

Please sign in to comment.