[media] ir-nec-decoder: fix repeat key issue
authorMariusz Białończyk <manio@skyboo.net>
Wed, 29 Dec 2010 22:48:43 +0000 (19:48 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 31 Dec 2010 15:46:01 +0000 (13:46 -0200)
commit21d33014108671cc6b02feda088f32bf26ce532d
tree6cf400b067ca0da5adb45c9ec1611ba417e2e8f7
parentef98a2c0f2856f6b2aa87fd32d5b192afaeae518
[media] ir-nec-decoder: fix repeat key issue

Fixing the problem with NEC protocol and repeating keys under the following
circumstances. The problem occurs when there is a repeat code without
properly decoded scancode. This leads to repeat the wrong (last decoded)
scancode.

An example from real life:
I am pressing volume down, then several minutes later i am pressing
volume up, but the real scancode is wrongly decoded and only a repeat
event is emitted, so as a result volume is going down while i am holding
volume up button.

The patch fixes above problem using rc_keyup timeout (as pointed by Mauro).
It just prevents key repeats if they appear after rc_keyup.

Signed-off-by: Mariusz Białończyk <manio@skyboo.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/ir-nec-decoder.c
This page took 0.027229 seconds and 5 git commands to generate.