aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-03-21 12:00:55 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-17 23:52:58 -0400
commit9f1547829a6f39fe6b2da22653dff40502f3d568 (patch)
tree71c200ea5be13eef6b96f8e2290f0d2ba7792a09 /include/media
parentada39630c758c5c3098f4fc1361103ea2bc1afe0 (diff)
V4L/DVB: saa7134: don't wait too much to generate an IR event on raw_decode
At raw_decode mode, the key is processed after the end of a timer. The previous code resets the timer every time something is received at the IR port. While this works fine with IR's that don't implement repeat, like Avermedia RM-JX IR, it keeps waiting until keydown, on IR's that implement NEC repeat command, like the Terratec yellow. The solution is to change the behaviour to do the timeout after the first received data. The timeout is currently set to 15 ms, as it works fine with NEC protcocol. It may need some adjustments to support other protocols and to better handle spurious detections that may happen with some IR sensors. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ir-core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 9e03528a767a..8d8ed7e06cd5 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -18,6 +18,7 @@
18#include <linux/spinlock.h> 18#include <linux/spinlock.h>
19#include <linux/kfifo.h> 19#include <linux/kfifo.h>
20#include <linux/time.h> 20#include <linux/time.h>
21#include <linux/timer.h>
21 22
22extern int ir_core_debug; 23extern int ir_core_debug;
23#define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \ 24#define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \
@@ -63,6 +64,7 @@ struct ir_raw_event {
63struct ir_raw_event_ctrl { 64struct ir_raw_event_ctrl {
64 struct kfifo kfifo; /* fifo for the pulse/space events */ 65 struct kfifo kfifo; /* fifo for the pulse/space events */
65 struct timespec last_event; /* when last event occurred */ 66 struct timespec last_event; /* when last event occurred */
67 struct timer_list timer_keyup; /* timer for key release */
66}; 68};
67 69
68struct ir_input_dev { 70struct ir_input_dev {