Hi
Does anyone know how I can control the repeat rate of my ATi Remote Bob (which appears as a regular keyboard in /dev/input)? It's a great remote, but at the moment (Ubuntu Dapper) I basically can't use it because each button press prodces 4 or 5 events, so I can't use the OSD.
Cheers,
Chris Jones wrote:
Does anyone know how I can control the repeat rate of my ATi Remote Bob (which appears as a regular keyboard in /dev/input)? It's a great remote, but at the moment (Ubuntu Dapper) I basically can't use it because each button press prodces 4 or 5 events, so I can't use the OSD.
is this an x10 remote using the kernel ati_remote driver? if yes, you can try the attached patch. 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 press and five for the second. Switching to channel '11' or moving two lines down triggers this... With the patch the (pseudo-)auto-repeat rate goes down 5x, but the remote becomes usable. I don't have any ati remotes so i can't tell if this problem affects them. (the patch also adds some extra keycodes for the medion remote)
artur
--- v2.6.17/drivers/usb/input/ati_remote.c 2006-06-20 17:16:36.000000000 +0000 +++ v2.6.17-dtnode/drivers/usb/input/ati_remote.c 2006-06-27 10:00:10.000000000 +0000 @@ -156,8 +156,9 @@ static const char accel[] = { 1, 2, 4, 6 * and we have to take this into account for an accurate repeat * behaviour. * (HZ / 20) == 50 ms and works well for me. + * "+ 1" is needed for HZ==250 etc. */ -#define FILTER_TIME (HZ / 20) +#define FILTER_TIME (HZ/20 + 1)
struct ati_remote { struct input_dev *idev; @@ -277,6 +278,21 @@ static const struct { {KIND_FILTERED, 0xf4, 0x2F, EV_KEY, KEY_END, 1}, /* END */ {KIND_FILTERED, 0xf5, 0x30, EV_KEY, KEY_SELECT, 1}, /* SELECT */
+ /* Medion remote keys */ + {KIND_FILTERED, 0xf1, 0x2c, EV_KEY, KEY_TV, 1}, /* TV */ + {KIND_FILTERED, 0xf6, 0x31, EV_KEY, KEY_VIDEO, 1}, /* (VIDEO DESKTOP) */ + + {KIND_FILTERED, 0xf7, 0x32, EV_KEY, KEY_RED, 1}, /* <RED> */ + {KIND_FILTERED, 0xf8, 0x33, EV_KEY, KEY_GREEN, 1}, /* <GREEN> */ + {KIND_FILTERED, 0xf9, 0x34, EV_KEY, KEY_YELLOW, 1}, /* <YELLOW> */ + {KIND_FILTERED, 0xfa, 0x35, EV_KEY, KEY_BLUE, 1}, /* <BLUE> */ + + {KIND_FILTERED, 0xfb, 0x36, EV_KEY, KEY_MOVE, 1}, /* RENAME */ + {KIND_FILTERED, 0xfc, 0x37, EV_KEY, KEY_NEW, 1}, /* ACQUIRE IMAGE */ + {KIND_FILTERED, 0xfd, 0x38, EV_KEY, KEY_EDIT, 1}, /* EDIT */ + {KIND_FILTERED, 0xfe, 0x39, EV_KEY, KEY_SCREEN, 1}, /* FULL SCREEN */ + {KIND_FILTERED, 0xff, 0x3a, EV_KEY, KEY_AUDIO, 1}, /* DVD AUDIO */ + {KIND_END, 0x00, 0x00, EV_MAX + 1, 0, 0} };
@@ -480,6 +496,8 @@ static void ati_remote_input_report(stru ati_remote->old_data[1] = data[2]; ati_remote->old_jiffies = jiffies;
+ if (ati_remote->repeat_count > 4) + ati_remote->repeat_count = 0; if ((ati_remote->repeat_count > 0) && (ati_remote->repeat_count < 5)) return;
On Tue, Jun 27, 2006 at 12:35:55PM +0200, Artur Skawina wrote:
Chris Jones wrote:
Does anyone know how I can control the repeat rate of my ATi Remote Bob (which appears as a regular keyboard in /dev/input)? It's a great remote, but at the moment (Ubuntu Dapper) I basically can't use it because each button press prodces 4 or 5 events, so I can't use the OSD.
is this an x10 remote using the kernel ati_remote driver? if yes, you can try the attached patch. 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 press and five for the second. Switching to channel '11' or moving two lines down triggers this...
I wonder why you can't just use the IR frame repeat rate as the key repeat rate. If the key repeat is disconnected from frame repeat, it is hard to scroll down a menu, say, by exactly 7 steps.
I and Darren Salt patched the cx88 driver (of the new Hauppauge Nova-T) to do that, but sadly it seems that the patches will not make it to the v4l hg tree. The patches map the RC5 frame repeat rate of 113 ms to key repeat. The first repeated frame is discarded in order to get some delay before initial repeat. The repeat rate feels okay.
Hi
On 11:51:30 am 27/06/2006 Marko Mäkelä marko.makela@hut.fi wrote:
On Tue, Jun 27, 2006 at 12:35:55PM +0200, Artur Skawina wrote:
is this an x10 remote using the kernel ati_remote driver? if yes,
I'm not at home at the moment, but I believe it is indeed the x10 remote. As for the driver, it will be using whatever the default is - I plugged it in and it appeared in /dev/input/ automagically. I can check and confirm later though.
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)
I wonder why you can't just use the IR frame repeat rate as the key
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.
Cheers, --- Chris Jones cmsj@tenshu.net www.tenshu.net
On Tue, Jun 27, 2006 at 12:07:34PM +0100, Chris Jones wrote:
I wonder why you can't just use the IR frame repeat rate as the key
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?
I was referring to the kernel module that implements the input device driver for the infrared receiver.
Marko
Hi
On 12:15:22 pm 27/06/2006 Marko Mäkelä marko.makela@hut.fi wrote:
I was referring to the kernel module that implements the input device driver for the infrared receiver.
This is an RF receiver, not IR. Or is it really just transmitting IR commands over RF?
Cheers, --- Chris Jones cmsj@tenshu.net www.tenshu.net
On Tue, Jun 27, 2006 at 12:22:02PM +0100, Chris Jones wrote:
On 12:15:22 pm 27/06/2006 Marko Mäkelä marko.makela@hut.fi wrote:
I was referring to the kernel module that implements the input device driver for the infrared receiver.
This is an RF receiver, not IR. Or is it really just transmitting IR commands over RF?
The protocol is likely entirely different. I'm sorry, my suggestion of simply mapping repeated packets to key-repeat events is inappropriate for RF communications, where packet loss or corruption is much more probable than in IR communications. According to a comment in the beginning of ati_remote.c, "The hardware generates 5 events for the first keypress".
Marko
Hi
On 1:03:25 pm 27/06/2006 Marko Mäkelä marko.makela@hut.fi wrote:
The protocol is likely entirely different. I'm sorry, my suggestion of simply mapping repeated packets to key-repeat events is inappropriate for RF communications, where packet loss or corruption
No probs - at this stage I'm grateful for as much input (no pun intended ;) on the issue as I can get, because I'm a bit stumped! I'd really like to avoid patches if possible, if only because between the various xine and vdr patches and packages, keeping current is proving rather time intensive! Having said that, it's totally worth it because vdr is so cool and useful :)
comment in the beginning of ati_remote.c, "The hardware generates 5 events for the first keypress".
Hmm, that's very interesting. I guess I should start reading the source.
Cheers, --- Chris Jones cmsj@tenshu.net www.tenshu.net
On Tue, Jun 27, 2006 at 02:13:25PM +0100, Chris Jones wrote:
No probs - at this stage I'm grateful for as much input (no pun intended ;) on the issue as I can get, because I'm a bit stumped! I'd really like to avoid patches if possible, if only because between the various xine and vdr patches and packages, keeping current is proving rather time intensive!
Testing CVS releases of softdevice and DirectFB can be even more time intensive, but it can also be very rewarding.
Hmm, that's very interesting. I guess I should start reading the source.
It's not that hard to make simple modifications to kernel modules.
BTW, I found out that the vdr-remote plugin reduces the key-repeat rate by using some timer magic. On IR remotes using the RC5 code, the inherent repeat rate is 113.8 ms. Using vdr-remote plugin, the rate was something like half or third of that. With softdevice and DirectFB linux-input driver and with my kernel patch, I get all RC5 frames (except the first repeated one that I discard on purpose) mapped to vdr key events.
Marko
Hi
On Tue, 2006-06-27 at 12:07 +0100, Chris Jones wrote:
I'm not at home at the moment, but I believe it is indeed the x10 remote.
Just to confirm, it is:
Bus 001 Device 004: ID 0bc7:0004 X10 Wireless Technology, Inc. X10 Receiver
and is using the ati_remote driver
Cheers,
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).
artur
On Mon, 2006-06-26 at 23:34 +0100, Chris Jones wrote:
Hi
Does anyone know how I can control the repeat rate of my ATi Remote Bob (which appears as a regular keyboard in /dev/input)? It's a great remote, but at the moment (Ubuntu Dapper) I basically can't use it because each button press prodces 4 or 5 events, so I can't use the OSD.
Cheers,
Try using the remote plugin with the /dev/input/eventN device of your remote.
http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin
Jon
Hi
On Tue, 2006-06-27 at 19:17 +0100, Jon Burgess wrote:
Try using the remote plugin with the /dev/input/eventN device of your remote.
Thanks, but I already am:
cmsj@tenshu:~$ cat /etc/vdr/plugins/plugin.remote.conf -i /dev/input/bob
(where 'bob' is a symlink to the correct event node, created by a udev rule)
Cheers,
On Tue, 2006-06-27 at 19:50 +0100, Chris Jones wrote:
Hi
On Tue, 2006-06-27 at 19:17 +0100, Jon Burgess wrote:
Try using the remote plugin with the /dev/input/eventN device of your remote.
Thanks, but I already am:
cmsj@tenshu:~$ cat /etc/vdr/plugins/plugin.remote.conf -i /dev/input/bob
(where 'bob' is a symlink to the correct event node, created by a udev rule)
Cheers,
I only see the keyboard events and the multiple repeats when I don't have the remote plugin running correctly, so it still may be worth checking. e.g. try the following which should report that VDR has the right device node open: # lsof -c vdr | grep /dev/input vdr 4638 vdr 10r CHR 13,66 5097 /dev/input/event2
Jon
Hi
On Tue, 2006-06-27 at 20:49 +0100, Jon Burgess wrote:
have the remote plugin running correctly, so it still may be worth
Nah it's definitely right:
cmsj@tenshu:~$ sudo lsof -c vdr | grep /dev/input vdr 25367 vdr 6r CHR 13,65 5018717 /dev/input/event1
cmsj@tenshu:~$ cat /sys/class/input/event1/device/manufacturer X10 Wireless Technology Inc
I did come across:
http://lkml.org/lkml/diff/2006/5/10/45/1
which I will give a try at some point.
Cheers,
Chris Jones wrote:
Hi
On Tue, 2006-06-27 at 19:17 +0100, Jon Burgess wrote:
Try using the remote plugin with the /dev/input/eventN device of your remote.
Thanks, but I already am:
cmsj@tenshu:~$ cat /etc/vdr/plugins/plugin.remote.conf -i /dev/input/bob
(where 'bob' is a symlink to the correct event node, created by a udev rule)
Please try the evtest tool from the dvb-apps package and post its output for a short key press and for a long one.
Oliver
Hi
On Wed, 2006-06-28 at 01:28 +0200, Oliver Endriss wrote:
Please try the evtest tool from the dvb-apps package and post its output for a short key press and for a long one.
Here is the output. I pressed the play button in both cases:
cmsj@tenshu:~$ evtest /dev/input/event4 Input driver version is 1.0.0 Input device ID: bus 0x3 vendor 0xbc7 product 0x4 version 0x100 Input device name: "X10 Wireless Technology Inc USB Receiver" Supported events: Event type 0 (Reset) Event code 0 (Reset) Event code 1 (Key) Event code 2 (Relative) Event type 1 (Key) Event code 2 (1) Event code 3 (2) Event code 4 (3) Event code 5 (4) Event code 6 (5) Event code 7 (6) Event code 8 (7) Event code 9 (8) Event code 10 (9) Event code 11 (0) Event code 18 (E) Event code 30 (A) Event code 32 (D) Event code 33 (F) Event code 46 (C) Event code 48 (B) Event code 96 (KPEnter) Event code 102 (Home) Event code 103 (Up) Event code 105 (Left) Event code 106 (Right) Event code 107 (End) Event code 108 (Down) Event code 113 (Mute) Event code 114 (VolumeDown) Event code 115 (VolumeUp) Event code 116 (Power) Event code 119 (Pause) Event code 128 (Stop) Event code 132 (Front) Event code 139 (Menu) Event code 150 (WWW) Event code 152 (Coffee) Event code 156 (Bookmarks) Event code 159 (Forward) Event code 167 (Record) Event code 168 (Rewind) Event code 176 (Edit) Event code 207 (?) Event code 272 (LeftBtn) Event code 273 (RightBtn) Event code 275 (SideBtn) Event code 276 (ExtraBtn) Event code 352 (Ok) Event code 353 (Select) Event code 358 (Info) Event code 377 (TV) Event code 389 (DVD) Event code 402 (ChannelUp) Event code 403 (ChannelDown) Event code 407 (Play) Event code 412 (Previous) Event type 2 (Relative) Event code 0 (X) Event code 1 (Y) Testing ... (interrupt to exit) Event: time 1151653959.792243, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.792246, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.792248, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653959.880230, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.880233, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.880235, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653959.928229, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.928232, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.928234, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653959.976214, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.976218, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.976220, type 0 (Reset), code 0 (Reset), value 0
Event: time 1151653964.559472, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.559476, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.559478, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653964.607473, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.607477, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.607479, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653964.743449, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.743453, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.743455, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653964.791438, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.791443, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.791445, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653964.839433, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.839435, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.839437, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653964.927419, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.927423, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.927425, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653964.975411, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.975415, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.975417, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.063392, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.063395, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.063397, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.111388, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.111393, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.111395, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.255360, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.255363, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.255365, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.343346, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.343349, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.343351, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.391341, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.391345, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.391347, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.439333, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.439337, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.439339, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.527315, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.527318, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.527320, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.575317, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.575322, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.575324, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.623302, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.623306, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.623308, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.711285, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.711289, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.711291, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.759283, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.759287, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.759289, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.855263, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.855266, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.855268, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.943248, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.943251, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.943253, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653965.991242, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.991246, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.991248, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653966.039234, type 1 (Key), code 207 (?), value 1 Event: time 1151653966.039237, type 1 (Key), code 207 (?), value 0 Event: time 1151653966.039239, type 0 (Reset), code 0 (Reset), value 0
Cheers,
Hi
On Fri, 2006-06-30 at 08:54 +0100, Chris Jones wrote:
Apologies for the dupe, evolution gave me an error and crashed the first time and I didn't think it had sent it ;)
Cheerio,
On Fri, Jun 30, 2006 at 08:54:02AM +0100, Chris Jones wrote:
On Wed, 2006-06-28 at 01:28 +0200, Oliver Endriss wrote:
Please try the evtest tool from the dvb-apps package and post its output for a short key press and for a long one.
Here is the output. I pressed the play button in both cases:
[...]
Testing ... (interrupt to exit) Event: time 1151653959.792243, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.792246, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.792248, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653959.880230, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.880233, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.880235, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653959.928229, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.928232, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.928234, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653959.976214, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.976218, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.976220, type 0 (Reset), code 0 (Reset), value 0
The type 1 (Key) events are the ones that matter. For some reason, the kernel module is reporting four key-press and key-release events for the short key press. You might want to try increasing the timeout #define in the source code.
Marko
Chris Jones wrote:
Hi
On Wed, 2006-06-28 at 01:28 +0200, Oliver Endriss wrote:
Please try the evtest tool from the dvb-apps package and post its output for a short key press and for a long one.
Here is the output. I pressed the play button in both cases:
cmsj@tenshu:~$ evtest /dev/input/event4 Input driver version is 1.0.0 Input device ID: bus 0x3 vendor 0xbc7 product 0x4 version 0x100 Input device name: "X10 Wireless Technology Inc USB Receiver" Supported events: Event type 0 (Reset) Event code 0 (Reset) Event code 1 (Key) Event code 2 (Relative) ... Testing ... (interrupt to exit) Event: time 1151653959.792243, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.792246, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.792248, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653959.880230, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.880233, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.880235, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653959.928229, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.928232, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.928234, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653959.976214, type 1 (Key), code 207 (?), value 1 Event: time 1151653959.976218, type 1 (Key), code 207 (?), value 0 Event: time 1151653959.976220, type 0 (Reset), code 0 (Reset), value 0
Event: time 1151653964.559472, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.559476, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.559478, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653964.607473, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.607477, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.607479, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653964.743449, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.743453, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.743455, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653964.791438, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.791443, type 1 (Key), code 207 (?), value 0 Event: time 1151653964.791445, type 0 (Reset), code 0 (Reset), value 0 ... Event: time 1151653965.991242, type 1 (Key), code 207 (?), value 1 Event: time 1151653965.991246, type 1 (Key), code 207 (?), value 0 Event: time 1151653965.991248, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151653966.039234, type 1 (Key), code 207 (?), value 1 Event: time 1151653966.039237, type 1 (Key), code 207 (?), value 0 Event: time 1151653966.039239, type 0 (Reset), code 0 (Reset), value 0
This driver is terribly broken! Key repeat does not work correctly. A correct driver would send for a single short press:
Event: time 1151653964.791438, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.791443, type 1 (Key), code 207 (?), value 0
For a long press:
Event: time 1151653964.559472, type 1 (Key), code 207 (?), value 1 Event: time 1151653964.607473, type 1 (Key), code 207 (?), value 2 ... Event: time 1151653964.743449, type 1 (Key), code 207 (?), value 2 Event: time 1151653964.743453, type 1 (Key), code 207 (?), value 0
I omitted Reset events, as I don't know what they are used for. Reset events seem to be ok. The keyboard driver generates them, too.
There is a bug in the remote plugin. It misinterprets Reset as a key release. Reset should be ignored. Please try the attached patch.
Oliver
Hi
On Sun, 2006-07-02 at 21:07 +0200, Oliver Endriss wrote:
This driver is terribly broken! Key repeat does not work correctly. A correct driver would send for a single short press:
Should I report this upstream to the kernel?
There is a bug in the remote plugin. It misinterprets Reset as a key release. Reset should be ignored. Please try the attached patch.
I applied it, rebuilt the remote module and restarted vdr, but it doesn't seem to have made a huge difference, but is that just because the kernel is spewing way too many events?
Cheers,
On Sun, Jul 02, 2006 at 11:26:22PM +0100, Chris Jones wrote:
On Sun, 2006-07-02 at 21:07 +0200, Oliver Endriss wrote:
This driver is terribly broken! Key repeat does not work correctly. A correct driver would send for a single short press:
Should I report this upstream to the kernel?
Yes.
There is a bug in the remote plugin. It misinterprets Reset as a key release. Reset should be ignored. Please try the attached patch.
I applied it, rebuilt the remote module and restarted vdr, but it doesn't seem to have made a huge difference, but is that just because the kernel is spewing way too many events?
The patch would only make a difference if the kernel didn't send any bogus release events. The patch was necessary for the cx88 remote, because otherwise the remote plugin would convert each repeat event to a new key press event.
Marko
Hi
On 7:03:56 am 03/07/2006 Marko Mäkelä marko.makela@hut.fi wrote:
Should I report this upstream to the kernel?
Yes.
It would seem that someone has already beaten me to it. I have added a comment to bug 4981 and linked to a patch I found in the last few days on lkml: http://lkml.org/lkml/2006/7/2/89
I am also attempting to hack up the 2.6.15 Dapper kernel I'm running to include an equivalent patch (the lines in question seem to have changed between 2.6.15 and 2.6.17). I will test it in a few hours and report how it goes.
Cheers, --- Chris Jones cmsj@tenshu.net www.tenshu.net
Hi
On Wed, 2006-06-28 at 01:28 +0200, Oliver Endriss wrote:
Please try the evtest tool from the dvb-apps package and post its output for a short key press and for a long one.
This is the output of me pressing the play button very quickly, then holding it down for about a second and a half (just a guess).
cmsj@tenshu:~$ evtest /dev/input/event4 Input driver version is 1.0.0 Input device ID: bus 0x3 vendor 0xbc7 product 0x4 version 0x100 Input device name: "X10 Wireless Technology Inc USB Receiver" Supported events: Event type 0 (Reset) Event code 0 (Reset) Event code 1 (Key) Event code 2 (Relative) Event type 1 (Key) Event code 2 (1) Event code 3 (2) Event code 4 (3) Event code 5 (4) Event code 6 (5) Event code 7 (6) Event code 8 (7) Event code 9 (8) Event code 10 (9) Event code 11 (0) Event code 18 (E) Event code 30 (A) Event code 32 (D) Event code 33 (F) Event code 46 (C) Event code 48 (B) Event code 96 (KPEnter) Event code 102 (Home) Event code 103 (Up) Event code 105 (Left) Event code 106 (Right) Event code 107 (End) Event code 108 (Down) Event code 113 (Mute) Event code 114 (VolumeDown) Event code 115 (VolumeUp) Event code 116 (Power) Event code 119 (Pause) Event code 128 (Stop) Event code 132 (Front) Event code 139 (Menu) Event code 150 (WWW) Event code 152 (Coffee) Event code 156 (Bookmarks) Event code 159 (Forward) Event code 167 (Record) Event code 168 (Rewind) Event code 176 (Edit) Event code 207 (?) Event code 272 (LeftBtn) Event code 273 (RightBtn) Event code 275 (SideBtn) Event code 276 (ExtraBtn) Event code 352 (Ok) Event code 353 (Select) Event code 358 (Info) Event code 377 (TV) Event code 389 (DVD) Event code 402 (ChannelUp) Event code 403 (ChannelDown) Event code 407 (Play) Event code 412 (Previous) Event type 2 (Relative) Event code 0 (X) Event code 1 (Y) Testing ... (interrupt to exit)
Event: time 1151662027.431265, type 1 (Key), code 207 (?), value 1 Event: time 1151662027.431268, type 1 (Key), code 207 (?), value 0 Event: time 1151662027.431270, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662027.479263, type 1 (Key), code 207 (?), value 1 Event: time 1151662027.479267, type 1 (Key), code 207 (?), value 0 Event: time 1151662027.479270, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662027.527249, type 1 (Key), code 207 (?), value 1 Event: time 1151662027.527253, type 1 (Key), code 207 (?), value 0 Event: time 1151662027.527255, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662027.575248, type 1 (Key), code 207 (?), value 1 Event: time 1151662027.575252, type 1 (Key), code 207 (?), value 0 Event: time 1151662027.575254, type 0 (Reset), code 0 (Reset), value 0
Event: time 1151662030.150825, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.150829, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.150831, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.198825, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.198828, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.198831, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.246810, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.246813, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.246815, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.294807, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.294811, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.294813, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.382791, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.382795, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.382797, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.430786, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.430789, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.430792, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.478773, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.478776, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.478778, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.526768, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.526772, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.526774, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.614753, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.614757, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.614759, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.662750, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.662754, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.662756, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.710736, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.710739, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.710742, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.798722, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.798725, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.798727, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.846715, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.846719, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.846721, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.894713, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.894717, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.894719, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.942703, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.942706, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.942709, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662031.030683, type 1 (Key), code 207 (?), value 1 Event: time 1151662031.030686, type 1 (Key), code 207 (?), value 0 Event: time 1151662031.030688, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662031.078684, type 1 (Key), code 207 (?), value 1 Event: time 1151662031.078688, type 1 (Key), code 207 (?), value 0 Event: time 1151662031.078690, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662031.126667, type 1 (Key), code 207 (?), value 1 Event: time 1151662031.126671, type 1 (Key), code 207 (?), value 0 Event: time 1151662031.126673, type 0 (Reset), code 0 (Reset), value 0
Cheers,
I demand that Chris Jones may or may not have written...
On Wed, 2006-06-28 at 01:28 +0200, Oliver Endriss wrote:
Please try the evtest tool from the dvb-apps package and post its output for a short key press and for a long one.
This is the output of me pressing the play button very quickly, then holding it down for about a second and a half (just a guess).
[snip]
Event: time 1151662027.431265, type 1 (Key), code 207 (?), value 1 Event: time 1151662027.431268, type 1 (Key), code 207 (?), value 0 Event: time 1151662027.431270, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662027.479263, type 1 (Key), code 207 (?), value 1 Event: time 1151662027.479267, type 1 (Key), code 207 (?), value 0 Event: time 1151662027.479270, type 0 (Reset), code 0 (Reset), value 0
Too close together, unless you really did press & release twice, 0.048s apart.
[snip]
Event: time 1151662030.150825, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.150829, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.150831, type 0 (Reset), code 0 (Reset), value 0 Event: time 1151662030.198825, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.198828, type 1 (Key), code 207 (?), value 0 Event: time 1151662030.198831, type 0 (Reset), code 0 (Reset), value 0
0.048s again. This *is* holding it down? Surely it should be more like this:
Event: time 1151662030.150825, type 1 (Key), code 207 (?), value 1 Event: time 1151662030.198825, type 1 (Key), code 207 (?), value 2 Event: time 1151662030.246810, type 1 (Key), code 207 (?), value 2 ... Event: time 1151662031.126671, type 1 (Key), code 207 (?), value 0
but with a better delay, and with *either* its own repeat handling (set input_dev->rep[0] = input_dev->rep[1] = 1 before calling input_register_device()) or the default repeat handler (set them to 0 instead).
Hi
On Mon, 2006-07-03 at 18:12 +0100, Darren Salt wrote:
Too close together, unless you really did press & release twice, 0.048s apart.
It was definitely one press in the real world, unless it bounced slightly or something.
but with a better delay, and with *either* its own repeat handling (set input_dev->rep[0] = input_dev->rep[1] = 1 before calling input_register_device()) or the default repeat handler (set them to 0 instead).
I tested out the patch I linked to in another post and it seems to work fine just tweaking the logic used to calculate the delay, but if you think it should be fixed in another way, could I please refer you to the kernel bugzilla, bug 4981 - mostly because I have no idea what you're talking about! ;)
Cheers,