V4L/DVB: V4L: dvb-usb, add extra sync to down-up input events
authorJiri Slaby <jslaby@suse.cz>
Sun, 14 Feb 2010 20:36:25 +0000 (17:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:11:02 +0000 (15:11 -0300)
Userspace is allowed to coalesce events between SYNCs. And since the code
emits UP right after DOWN for the same key, it may be missed
(up+down=nothing). Add an extra sync in between UP and DOWN events to disable
the coalesce.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dib0700_core.c
drivers/media/dvb/dvb-usb/dvb-usb-remote.c

index 4450214e2c6464f809ed1d70a64a27377bf9e886..4f961d2d1817e776699cebd54554f833ae14a66e 100644 (file)
@@ -612,6 +612,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
        case REMOTE_KEY_REPEAT:
                deb_info("key repeated\n");
                input_event(d->rc_input_dev, EV_KEY, event, 1);
+               input_sync(d->rc_input_dev);
                input_event(d->rc_input_dev, EV_KEY, d->last_event, 0);
                input_sync(d->rc_input_dev);
                break;
index 6b5ded9e7d5d744d69a9a37af3faa173e4711715..a03ef7efec9abcba1a11b4a1d332012841b37ba6 100644 (file)
@@ -107,6 +107,7 @@ static void dvb_usb_read_remote_control(struct work_struct *work)
                case REMOTE_KEY_REPEAT:
                        deb_rc("key repeated\n");
                        input_event(d->rc_input_dev, EV_KEY, event, 1);
+                       input_sync(d->rc_input_dev);
                        input_event(d->rc_input_dev, EV_KEY, d->last_event, 0);
                        input_sync(d->rc_input_dev);
                        break;