mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: mchehab@redhat.com, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, jirislaby@gmail.com,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH] V4L: dvb-usb, add extra sync to down-up input events
Date: Tue, 16 Feb 2010 09:30:10 -0800	[thread overview]
Message-ID: <20100216173010.GA15376@core.coreip.homeip.net> (raw)
In-Reply-To: <1266179785-836-1-git-send-email-jslaby@suse.cz>

Hi Jiri,

On Sun, Feb 14, 2010 at 09:36:25PM +0100, Jiri Slaby wrote:
> 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>

Looks good.

Acked-by: Dmitry Torokhov <dtor@mail.ru>

> Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
> Cc: linux-media@vger.kernel.org
> ---
>  drivers/media/dvb/dvb-usb/dib0700_core.c   |    1 +
>  drivers/media/dvb/dvb-usb/dvb-usb-remote.c |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
> index 4450214..4f961d2 100644
> --- a/drivers/media/dvb/dvb-usb/dib0700_core.c
> +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
> @@ -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;
> diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
> index 6b5ded9..a03ef7e 100644
> --- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
> +++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
> @@ -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;
> -- 
> 1.6.6.1
> 

-- 
Dmitry

      reply	other threads:[~2010-02-16 17:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-14 20:36 Jiri Slaby
2010-02-16 17:30 ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100216173010.GA15376@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=jirislaby@gmail.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®