Commit 18718c96 authored by Jiri Slaby's avatar Jiri Slaby Committed by Mauro Carvalho Chehab

V4L/DVB: V4L: dvb-usb, add extra sync to down-up input events

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: default avatarJiri Slaby <jslaby@suse.cz>
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Acked-by: default avatarDmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent fdd70c33
...@@ -612,6 +612,7 @@ static void dib0700_rc_urb_completion(struct urb *purb) ...@@ -612,6 +612,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
case REMOTE_KEY_REPEAT: case REMOTE_KEY_REPEAT:
deb_info("key repeated\n"); deb_info("key repeated\n");
input_event(d->rc_input_dev, EV_KEY, event, 1); 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_event(d->rc_input_dev, EV_KEY, d->last_event, 0);
input_sync(d->rc_input_dev); input_sync(d->rc_input_dev);
break; break;
......
...@@ -107,6 +107,7 @@ static void dvb_usb_read_remote_control(struct work_struct *work) ...@@ -107,6 +107,7 @@ static void dvb_usb_read_remote_control(struct work_struct *work)
case REMOTE_KEY_REPEAT: case REMOTE_KEY_REPEAT:
deb_rc("key repeated\n"); deb_rc("key repeated\n");
input_event(d->rc_input_dev, EV_KEY, event, 1); 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_event(d->rc_input_dev, EV_KEY, d->last_event, 0);
input_sync(d->rc_input_dev); input_sync(d->rc_input_dev);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment