Skip to content

Commit

Permalink
[media] nec-decoder: fix NEC decoding for Pioneer Laserdisc CU-700 re…
Browse files Browse the repository at this point in the history
…mote

This remote sends a header pulse of 8150us followed by a space of 4000us.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sean Young authored and Mauro Carvalho Chehab committed Aug 11, 2012
1 parent 9d380ad commit 743135e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/rc/ir-nec-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
if (!ev.pulse)
break;

if (eq_margin(ev.duration, NEC_HEADER_PULSE, NEC_UNIT / 2)) {
if (eq_margin(ev.duration, NEC_HEADER_PULSE, NEC_UNIT * 2)) {
data->is_nec_x = false;
data->necx_repeat = false;
} else if (eq_margin(ev.duration, NECX_HEADER_PULSE, NEC_UNIT / 2))
Expand All @@ -86,7 +86,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
if (ev.pulse)
break;

if (eq_margin(ev.duration, NEC_HEADER_SPACE, NEC_UNIT / 2)) {
if (eq_margin(ev.duration, NEC_HEADER_SPACE, NEC_UNIT)) {
data->state = STATE_BIT_PULSE;
return 0;
} else if (eq_margin(ev.duration, NEC_REPEAT_SPACE, NEC_UNIT / 2)) {
Expand Down

0 comments on commit 743135e

Please sign in to comment.