[vdr] ATi Remote key repeat

Artur Skawina art_k at o2.pl
Tue Jun 27 22:47:07 CEST 2006

Chris Jones wrote:
>>>  A Medion remote i have was unusable w/o this change; eg. pressing
>>>  the same key twice resulted in six events: one for the first key
> I get many events from just pressing the key once. I used to be able to tap
> the keys very quickly and just get a single event, but I think the
> behaviour has changed with the newer kernel in Dapper (or one of the
> updates of it, I'm not sure exactly when this started because I don't use
> the remote all the time)

Hmm, one thing to check would be whether the HZ value of the kernels changed -- i think i saw similar behavior after changing HZ from 1000 to 250 with no other changes to the driver. Apparently FILTER_TIME was set very close to the limit and changing the delay slightly (it is 50*1000**-1=50ms for HZ==1000, but only 48ms (12*250**-1) for HZ==250) breaks the drivers autorepeat detection. The patch i sent fixed this too (for the HZ==250 case).

> I'm not sure exactly what that is, but since the device is presented as a
> "standard" input device, might I be able to use some system tool to control
> the repeat rate? All I can find thus far is kbdrate, which doesn't seem to
> let me specify which input device I want it to alter.

Unfortunately the device seems to send 5 events for every key press, which makes it hard for the driver to determine if you just pressed a key twice or just held the key down for a bit longer (it receives 10 events in both cases). It tries to guess, but gets it wrong for some cases. Basically it reports the first keypress, then ignores the next four. Then if it receives the same key again it starts reporting every event. Which might be fine if you're holding the key down, but isn't if you pressed the same button a second time. And since it tries to measure the delay between events, even a small error in timing could make things go wrong. At least this is what's happening w/ one of the medion remotes i have, i don't have any ati hw to test.
The newer models of the ati and medion remotes may not have this problem, as they apparently alternate the keycodes, hopefully making it easier to detect autorepeat w/o guessing (iow pressing a button a second time results in a different keycode).


More information about the vdr mailing list