[linux-dvb] [patch] support for key repeat with dib0700 ir receiver

Filippo Argiolas filippo.argiolas at gmail.com
Tue Feb 19 16:17:55 CET 2008


Hi, my last messages have been almost ignored.. so I'm opening a new
thread. Please refer to the other thread [wintv nova-t stick, dib0700
and remote controllers] for more info. 

Here is a brief summary of the problem as far as I can understand:
- when a keypress event is received the device stores its data somewhere
- every 150ms dib0700_rc_query reads this data 
- since there is nothing that resets device memory if no key is being
pressed anymore device still stores the data from the last keypress
event
- to prevent having false keypresses the driver reads rc5 toggle bit
that changes from 0 to 1 and viceversa when a new key is pressed or when
the same key is released and pressed again. So it ignores everything
until the toggle bit changes. The right behavior should be "repeat last
key until toggle bit changes", but cannot be done since last data still
stored would be considered as a repeat even if nothing is pressed.
- this way it ignores even repeated key events (when a key is holded
down)
- this approach is wrong because it works just for rc5 (losing repeat
feature..) but doesn't work for example with nec remotes that don't set
the toggle bit and use a different system. 

The patch solves it calling dib0700_rc_setup after each poll resetting
last key data from the device. I've also implemented repeated key
feature (with repeat delay to avoid unwanted double hits) for rc-5 and
nec protocols. It also contains some keymap for the remotes I've used
for testing (a philipps compatible rc5 remote and a teac nec remote).
They are far from being complete since I've used them just for testing.

Thanks for reading this,
Let me know what do you think about it,
Greets,

Filippo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remote-repeat.diff
Type: text/x-patch
Size: 6423 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20080219/e09596f3/attachment-0001.bin 


More information about the linux-dvb mailing list