diff options
author | Oliver Endriss <devnull@localhost> | 2003-03-31 14:18:49 +0000 |
---|---|---|
committer | Oliver Endriss <devnull@localhost> | 2003-03-31 14:18:49 +0000 |
commit | a3dff8e11be34e9267740207aeada26700944bef (patch) | |
tree | dfdda0d770a3eb92945545b2d4b90f0126b10ff0 /linux/drivers/media/dvb/ttpci | |
parent | dec354797e25a3b068bf01a4b2f41d58f4a7682d (diff) | |
download | mediapointer-dvb-s2-a3dff8e11be34e9267740207aeada26700944bef.tar.gz mediapointer-dvb-s2-a3dff8e11be34e9267740207aeada26700944bef.tar.bz2 |
RC5: check toggle bit
Diffstat (limited to 'linux/drivers/media/dvb/ttpci')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_ir.c | 13 |
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 |