[media] nec-decoder: fix NEC decoding for Pioneer Laserdisc CU-700 remote
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>
This commit is contained in:
parent
9d380adf02
commit
743135e7a5
@ -70,7 +70,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
|||||||
if (!ev.pulse)
|
if (!ev.pulse)
|
||||||
break;
|
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->is_nec_x = false;
|
||||||
data->necx_repeat = false;
|
data->necx_repeat = false;
|
||||||
} else if (eq_margin(ev.duration, NECX_HEADER_PULSE, NEC_UNIT / 2))
|
} else if (eq_margin(ev.duration, NECX_HEADER_PULSE, NEC_UNIT / 2))
|
||||||
@ -86,7 +86,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
|||||||
if (ev.pulse)
|
if (ev.pulse)
|
||||||
break;
|
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;
|
data->state = STATE_BIT_PULSE;
|
||||||
return 0;
|
return 0;
|
||||||
} else if (eq_margin(ev.duration, NEC_REPEAT_SPACE, NEC_UNIT / 2)) {
|
} else if (eq_margin(ev.duration, NEC_REPEAT_SPACE, NEC_UNIT / 2)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user