* [PATCH] firedtv: fix remote control with newer Xorg evdev
@ 2011-01-16 8:39 Stefan Richter
2011-01-17 8:17 ` Dmitry Torokhov
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Richter @ 2011-01-16 8:39 UTC (permalink / raw)
To: linux-media; +Cc: linux-input, linux1394-devel
After a recent update of xf86-input-evdev and xorg-server, I noticed
that X11 applications did not receive keypresses from the FireDTV
infrared remote control anymore. Instead, the Xorg log featured lots of
"FireDTV remote control: dropping event due to full queue!"
exclamations. The Linux console did not have an issue with the
FireDTV's RC though.
The fix is to insert EV_SYN events after the key-down/-up events.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/media/dvb/firewire/firedtv-rc.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: b/drivers/media/dvb/firewire/firedtv-rc.c
===================================================================
--- a/drivers/media/dvb/firewire/firedtv-rc.c
+++ b/drivers/media/dvb/firewire/firedtv-rc.c
@@ -172,7 +172,8 @@ void fdtv_unregister_rc(struct firedtv *
void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)
{
- u16 *keycode = fdtv->remote_ctrl_dev->keycode;
+ struct input_dev *idev = fdtv->remote_ctrl_dev;
+ u16 *keycode = idev->keycode;
if (code >= 0x0300 && code <= 0x031f)
code = keycode[code - 0x0300];
@@ -188,6 +189,7 @@ void fdtv_handle_rc(struct firedtv *fdtv
return;
}
- input_report_key(fdtv->remote_ctrl_dev, code, 1);
- input_report_key(fdtv->remote_ctrl_dev, code, 0);
+ input_report_key(idev, code, 1);
+ input_report_key(idev, code, 0);
+ input_sync(idev);
}
--
Stefan Richter
-=====-==-== ---= =----
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] firedtv: fix remote control with newer Xorg evdev
2011-01-16 8:39 [PATCH] firedtv: fix remote control with newer Xorg evdev Stefan Richter
@ 2011-01-17 8:17 ` Dmitry Torokhov
2011-01-17 13:17 ` [PATCH update] " Stefan Richter
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2011-01-17 8:17 UTC (permalink / raw)
To: Stefan Richter; +Cc: linux-media, linux-input, linux1394-devel
Hi Stefan,
On Sun, Jan 16, 2011 at 09:39:21AM +0100, Stefan Richter wrote:
> @@ -188,6 +189,7 @@ void fdtv_handle_rc(struct firedtv *fdtv
> return;
> }
>
> - input_report_key(fdtv->remote_ctrl_dev, code, 1);
> - input_report_key(fdtv->remote_ctrl_dev, code, 0);
> + input_report_key(idev, code, 1);
input_sync() is needed here as well - userspace is free to accumulate
device state between EV_SYN events.
> + input_report_key(idev, code, 0);
> + input_sync(idev);
> }
>
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH update] firedtv: fix remote control with newer Xorg evdev
2011-01-17 8:17 ` Dmitry Torokhov
@ 2011-01-17 13:17 ` Stefan Richter
2011-01-17 17:00 ` Dmitry Torokhov
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Richter @ 2011-01-17 13:17 UTC (permalink / raw)
To: linux-media; +Cc: Dmitry Torokhov, linux-input, linux1394-devel
After a recent update of xf86-input-evdev and xorg-server, I noticed
that X11 applications did not receive keypresses from the FireDTV
infrared remote control anymore. Instead, the Xorg log featured lots of
"FireDTV remote control: dropping event due to full queue!"
exclamations. The Linux console did not have an issue with the
FireDTV's RC though.
The fix is to insert EV_SYN events after the key-down/-up events.
Dimitry notes that EV_SYN is also necessary between down and up,
otherwise userspace could combine their state.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/media/dvb/firewire/firedtv-rc.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Index: b/drivers/media/dvb/firewire/firedtv-rc.c
===================================================================
--- a/drivers/media/dvb/firewire/firedtv-rc.c
+++ b/drivers/media/dvb/firewire/firedtv-rc.c
@@ -172,7 +172,8 @@ void fdtv_unregister_rc(struct firedtv *
void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)
{
- u16 *keycode = fdtv->remote_ctrl_dev->keycode;
+ struct input_dev *idev = fdtv->remote_ctrl_dev;
+ u16 *keycode = idev->keycode;
if (code >= 0x0300 && code <= 0x031f)
code = keycode[code - 0x0300];
@@ -188,6 +189,8 @@ void fdtv_handle_rc(struct firedtv *fdtv
return;
}
- input_report_key(fdtv->remote_ctrl_dev, code, 1);
- input_report_key(fdtv->remote_ctrl_dev, code, 0);
+ input_report_key(idev, code, 1);
+ input_sync(idev);
+ input_report_key(idev, code, 0);
+ input_sync(idev);
}
--
Stefan Richter
-=====-==-== ---= =---=
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH update] firedtv: fix remote control with newer Xorg evdev
2011-01-17 13:17 ` [PATCH update] " Stefan Richter
@ 2011-01-17 17:00 ` Dmitry Torokhov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2011-01-17 17:00 UTC (permalink / raw)
To: Stefan Richter; +Cc: linux-media, linux-input, linux1394-devel
On Mon, Jan 17, 2011 at 02:17:58PM +0100, Stefan Richter wrote:
> After a recent update of xf86-input-evdev and xorg-server, I noticed
> that X11 applications did not receive keypresses from the FireDTV
> infrared remote control anymore. Instead, the Xorg log featured lots of
>
> "FireDTV remote control: dropping event due to full queue!"
>
> exclamations. The Linux console did not have an issue with the
> FireDTV's RC though.
>
> The fix is to insert EV_SYN events after the key-down/-up events.
> Dimitry notes that EV_SYN is also necessary between down and up,
> otherwise userspace could combine their state.
>
> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
> ---
> drivers/media/dvb/firewire/firedtv-rc.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> Index: b/drivers/media/dvb/firewire/firedtv-rc.c
> ===================================================================
> --- a/drivers/media/dvb/firewire/firedtv-rc.c
> +++ b/drivers/media/dvb/firewire/firedtv-rc.c
> @@ -172,7 +172,8 @@ void fdtv_unregister_rc(struct firedtv *
>
> void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)
> {
> - u16 *keycode = fdtv->remote_ctrl_dev->keycode;
> + struct input_dev *idev = fdtv->remote_ctrl_dev;
> + u16 *keycode = idev->keycode;
>
> if (code >= 0x0300 && code <= 0x031f)
> code = keycode[code - 0x0300];
> @@ -188,6 +189,8 @@ void fdtv_handle_rc(struct firedtv *fdtv
> return;
> }
>
> - input_report_key(fdtv->remote_ctrl_dev, code, 1);
> - input_report_key(fdtv->remote_ctrl_dev, code, 0);
> + input_report_key(idev, code, 1);
> + input_sync(idev);
> + input_report_key(idev, code, 0);
> + input_sync(idev);
> }
>
>
> --
> Stefan Richter
> -=====-==-== ---= =---=
> http://arcgraph.de/sr/
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-17 17:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-16 8:39 [PATCH] firedtv: fix remote control with newer Xorg evdev Stefan Richter
2011-01-17 8:17 ` Dmitry Torokhov
2011-01-17 13:17 ` [PATCH update] " Stefan Richter
2011-01-17 17:00 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).