On Thu, Apr 27, 2006 at 06:00:02PM +0100, Darren Salt wrote:
I demand that Marko Mäkelä may or may not have written...
On Tue, Apr 18, 2006 at 07:15:15PM +0300, Marko Mäkelä wrote:
On Fri, Apr 14, 2006 at 01:31:47PM +0200, Klaus Schmidinger wrote:
I just tested with my RCU here and everything worked fine. Maybe it's a problem with the <linux/input.h> driver or the vdr-softdevice plugin?
It turned out that something falsely sets the k_Repeat flag most of the time. It's most probably the patches to the cx88-input.c, by Darren Salt and me. I'll investigate later.
Also the vanilla cx88-input.c in linux-2.6.16.9 is buggy and sets the repeat flag when it shouldn't (when a button is pressed in rapid succession). I'll try to come up with a working kernel patch later.
In the Hauppauge section of the switch block in cx88_ir_irq, watch for the state of bit 11 of ircode being changed between successive reads. I'll stick something in my patchset...
Rather than watching the toggle bit, I'd compare whole codes. It leads to a simpler program, and it avoids losing events. For instance, if three buttons are pressed, A, B, and C, and the code for B is lost, then watching only the toggle bit would cause all events for C to be discarded.
FWIW, the culprit was not the patched cx88-input.c, but instead the RCU would not flip the toggle bit when a button is pressed in rapid succession. So, it would misreport rapid keypress events as repeat events.
My patch against 2.6.15.2 applies cleanly on 2.6.16.9 and fixes the problem. It is a quick hack, because it modifies ir-common.c, wrongly assuming that the parameter ir_raw contains a RC5 code word. Please consider incorporating a similar fix to your patchset.
http://www.iki.fi/~msmakela/software/vdr/linux-2.6.15.2-cx88_input2.patch
Marko