[vdr] Key-repeat or release magic in RCU drivers

Oliver Endriss o.endriss at gmx.de
Tue Feb 7 01:30:13 CET 2006


Marko Mäkelä wrote:
> On Wed, Feb 01, 2006 at 09:56:40PM +0000, Darren Salt wrote:
> > I demand that Marko Mäkelä may or may not have written...
> > 
> > > On Wed, Feb 01, 2006 at 07:51:04PM +0100, Oliver Endriss wrote:
> > [snip]
> > >> (1) The repeat timer of the input layer must be turned off, and the
> > >>     natural repeat rate of the RC5 frames should be used. Anything else
> > >>     will result in inaccurate operation.
> > 
> > >> (2) The key-up timeout should be set to 280ms or higher (>= 2x repeat
> > >>     rate). This will allow for one missing RC5 frame which may happen due
> > >>     to transmission errors.
> > 
> > > Thanks, this sounds exactly what I'm looking for!
> > 
> > > The 280 ms you mention matches the #define UP_TIMEOUT (HZ*7/25) in
> > > /usr/src/linux-2.6.14.3/drivers/media/dvb/ttpci/av7110_ir.c on my vdr box.
> > > I'll see if I'm smart enough to port the code to the cx88 driver.
> > 
> > linux/drivers/media/common/ir-functions.c would seem to be the right place
> > for that code...
> 
> I guess you meant ir-common.c, after all.
> 
> I made a quick&dirty patch to ir-common.c and cx88-input.c that maps each
> incoming RC5 frame to a key-press or a key-repeat event.  The key-release
> timeout is set to 280 ms.  I tried blocking the IR beam for a couple of
> seconds while holding the Volume+ button down.  After I unblocked the beam,
> the repeat events would continue.
> 
> Thanks to the patch, it is now possible to reach any line on long listings
> such as the EPG menu, by holding the Down button and releasing it when the
> selection mark reaches the line.
> 
> The only drawback in my patch is that it is sometimes hard to press a
> repeating key (e.g., Channel+) quickly enough to only generate a key-press
> event without any key-repeat.  After all, it might be good to discard the
> first key-repeat event.  Do av7110 users have this problem?

No, this problem is handled by input_repeat_key/delay_timer_finished
magic. ;-)

The driver discards all keypresses until the delay timer of the input
layer has expired. Btw, this delay may be adjusted by user space tools.

> It'd be nice if this patch could be polished and submitted to the kernel.
> Are there any v4l-dvb developers on this list?

Darren posted a patch on the v4l/dvb lists. Maybe you could join your
efforts and submit a patch against the current hg repository.

Oliver

-- 
--------------------------------------------------------
VDR Remote Plugin available at
http://www.escape-edv.de/endriss/vdr/
--------------------------------------------------------



More information about the vdr mailing list