Message ID | 200607022107.55781@orion.escape-edv.de |
---|---|
State | New |
Headers |
Received: from mail.gmx.net ([213.165.64.21]) by www.linuxtv.org with smtp (Exim 4.50) id 1Fx7JS-0003nb-D0 for vdr@linuxtv.org; Sun, 02 Jul 2006 21:08:58 +0200 Received: (qmail invoked by alias); 02 Jul 2006 19:08:27 -0000 Received: from p549ACD88.dip.t-dialin.net (HELO cassiopeia.escape-edv.de) [84.154.205.136] by mail.gmx.net (mp006) with SMTP; 02 Jul 2006 21:08:27 +0200 X-Authenticated: #476490 Received: from orion (192.168.1.10) by cassiopeia.escape-edv.de (192.168.1.11) with esmtp ; Sun, 02 Jul 2006 21:10:23 +0200 From: Oliver Endriss <o.endriss@gmx.de> Organization: ESCAPE GmbH EDV-Loesungen To: vdr@linuxtv.org Subject: Re: [vdr] ATi Remote key repeat Date: Sun, 2 Jul 2006 21:07:55 +0200 User-Agent: KMail/1.6.2 References: <1151361265.11505.5.camel@localhost> <200606280128.55753@orion.escape-edv.de> <1151654043.24934.0.camel@localhost> In-Reply-To: <1151654043.24934.0.camel@localhost> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_LmBqE8E2YMv8apw" Message-Id: <200607022107.55781@orion.escape-edv.de> X-Y-GMX-Trusted: 0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vdr@linuxtv.org List-Id: VDR Mailing List <vdr.linuxtv.org> List-Unsubscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=unsubscribe> List-Archive: <http://www.linuxtv.org/pipermail/vdr> List-Post: <mailto:vdr@linuxtv.org> List-Help: <mailto:vdr-request@linuxtv.org?subject=help> List-Subscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=subscribe> X-List-Received-Date: Sun, 02 Jul 2006 19:08:58 -0000 Status: O X-Status: X-Keywords: X-UID: 9995 |
Commit Message
Oliver Endriss
July 2, 2006, 7:07 p.m. UTC
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
Comments
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
Common subdirectories: remote-0.3.7/misc and remote-0.3.8/misc diff -pu remote-0.3.7/remote.c remote-0.3.8/remote.c --- remote-0.3.7/remote.c Sat Apr 29 21:22:01 2006 +++ remote-0.3.8/remote.c Sun May 14 18:43:01 2006 @@ -419,7 +419,10 @@ uint64 cRemoteDevInput::getKey(void) int n; uint64 code; - n = read(fh, &ev, sizeof ev); + do + n = read(fh, &ev, sizeof ev); + while (n == sizeof ev && ev.type != 1); + if (n == sizeof ev) { if (ev.value)