]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] nec-decoder: fix NEC decoding for Pioneer Laserdisc CU-700 remote
authorSean Young <sean@mess.org>
Tue, 31 Jul 2012 09:37:29 +0000 (06:37 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 11 Aug 2012 20:31:22 +0000 (17:31 -0300)
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>
drivers/media/rc/ir-nec-decoder.c

index 3c9431a9f62d282d37238ab6089cd63ca73ad77b..2ca509e6e16b6c73cc09b0bc84616b8b1b1beafe 100644 (file)
@@ -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))
@@ -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)) {