public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarod Wilson <jarod@redhat.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	Jeff Brown <jeffbrown@android.com>
Subject: Re: [PATCH] [media] rc: call input_sync after scancode reports
Date: Thu, 23 Jun 2011 15:47:41 -0400	[thread overview]
Message-ID: <4E03985D.108@redhat.com> (raw)
In-Reply-To: <20110623183957.GC14950@core.coreip.homeip.net>

Dmitry Torokhov wrote:
> Hi Jarod,
>
> On Thu, Jun 23, 2011 at 01:58:06PM -0400, Jarod Wilson wrote:
>> @@ -623,6 +624,7 @@ static void ir_do_keydown(struct rc_dev *dev, int scancode,
>>   			  u32 keycode, u8 toggle)
>>   {
>>   	input_event(dev->input_dev, EV_MSC, MSC_SCAN, scancode);
>> +	input_sync(dev->input_dev);
>>
>>   	/* Repeat event? */
>>   	if (dev->keypressed&&
>
> It looks like we would be issuing up to 3 input_sync() for a single
> keypress... Order of events is wrong too (we first issue MSC_SCAN for
> new key and then release old key). How about we change it a bit like in
> the patch below?

Yeah, your patch does result in a nicer overall flow of things (esp. the 
ordering of the release, which I hadn't noticed), and eliminates the 
extra unnecessary syncs. I've got one tiny tweak, where I just pass a 
true/false to ir_do_keyup to say whether or not it should do a sync to 
further reduce some code duplication. Building and testing here locally 
to make sure it does behave as expected, will then send it along.

-- 
Jarod Wilson
jarod@redhat.com



  reply	other threads:[~2011-06-23 19:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23 17:58 [PATCH] [media] rc: call input_sync after scancode reports Jarod Wilson
2011-06-23 18:40 ` Dmitry Torokhov
2011-06-23 19:47   ` Jarod Wilson [this message]
2011-06-23 21:13   ` [PATCH v2] " Jarod Wilson
2011-06-23 21:21     ` Dmitry Torokhov

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=4E03985D.108@redhat.com \
    --to=jarod@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jeffbrown@android.com \
    --cc=linux-media@vger.kernel.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