linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: simon@mungewell.org
Cc: linux-input@vger.kernel.org
Subject: Re: Multiple clients reading from /dev/input/eventX
Date: Tue, 23 Oct 2012 22:07:10 -0700	[thread overview]
Message-ID: <20121024050710.GA13826@core.coreip.homeip.net> (raw)
In-Reply-To: <e603df72a1ba52e724eb72802bd93f48.squirrel@mungewell.org>

On Wed, Oct 24, 2012 at 12:26:17AM -0400, simon@mungewell.org wrote:
> >> Can anyone here confirm the behaviour under the situation that one
> >> client
> >> is busy? What is the maximum time it can be 'away' or what is the size
> >> of
> >> the inline buffer?
> >
> > Every user of event device has a buffer that can hold up at least 64
> > input events and is completely independent from other users. Newer
> > kernels generate EV_SYN/SYN_DROPPED event to indicate that user was too
> > slow reading data and there was buffer overrun.
> >
> > Hope this helps.
> 
> Yes, very helpful.... I am seeing 'SYN_DROPPED' on my system, so the next
> question is how to work around this?
> 
> In the event of an overflow is there any method of reading/polling the
> last (correct) event value for each of the axis?

EVIOCGABS() and other ioctls allow to query state of the device.

> 
> In my case on the G27 wheel when your foot transitions from the brake to
> accelerator, you get no more 'brake events' to 'refresh' the value.
> 
> I see that I could use QUIRK to enlarge the buffer for this device, would
> that be an acceptable workaround?
> http://www.spinics.net/lists/linux-input/msg15497.html

With 3.7 Henrik just put in code that would better estimate number of
events in devices event packet, so hopefully quirk is not needed.

> 
> Attached is a little log showing SDL 'missing' 68 events, which are
> correctly reported by 'evtest'. The time stamps in log will give you an
> idea about how quickly the events are coming in from this wheel.

You need to figure out why SDL takes such a long time to get around
reading device data

Thanks.

-- 
Dmitry

      reply	other threads:[~2012-10-24  5:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 15:49 Multiple clients reading from /dev/input/eventX simon
2012-10-19 22:32 ` Dmitry Torokhov
2012-10-24  4:26   ` simon
2012-10-24  5:07     ` 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=20121024050710.GA13826@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=simon@mungewell.org \
    /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;
as well as URLs for NNTP newsgroup(s).