summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_ir.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_ir.c b/linux/drivers/media/dvb/ttpci/av7110_ir.c
index 2444b724b..887b2eb77 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_ir.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_ir.c
@@ -12,7 +12,7 @@
#endif
-#define UP_TIMEOUT (HZ/7)
+#define UP_TIMEOUT (HZ/2)
static int av7110_ir_debug = 0;
@@ -67,6 +67,8 @@ void av7110_emit_key (u32 ircom)
{
u8 data;
u8 addr;
+ static u16 old_toggle = 0;
+ u16 new_toggle;
u16 keycode;
/* extract device address and data */
@@ -96,9 +98,14 @@ void av7110_emit_key (u32 ircom)
return;
}
+ if (ir_config & 0x0001)
+ new_toggle = 0; /* RCMM */
+ else
+ new_toggle = (ircom & 0x800); /* RC5 */
+
if (timer_pending (&keyup_timer)) {
del_timer (&keyup_timer);
- if (keyup_timer.data != keycode)
+ if (keyup_timer.data != keycode || new_toggle != old_toggle)
input_event (&input_dev, EV_KEY, keyup_timer.data, !!0);
}
@@ -108,6 +115,8 @@ void av7110_emit_key (u32 ircom)
keyup_timer.data = keycode;
add_timer (&keyup_timer);
+
+ old_toggle = new_toggle;
}
static