Re: Synchronizing evdev readers and drivers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 3, 2010 at 6:42 AM, Mark Brown
<broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> The sysfs interface offered by polldev is *mostly* doing the same thing

True, except that there is still no synchronization of the polling
events between the driver and application.  For example, if the
polling interval is once per second then the sample ultimately
delivered to applications could be almost one second old--- even if
the application reads from the evdev interface once a second as well.

The callback can be used to reduce the delay between sample generation
and event delivery.  It can also increase system load, but reduces
phase error in situations where that is desirable.  I don't expect
that many drivers will use the callback, but for the ones that do it
will be very useful.

> A callback on read seems like it's a bit limited as it's more work for
> the application (handling the latency introduced by waking up from your
> delay and doing the read is faff) and requires polling in the hardware
> too.

Right.  But if the hardware works that way anyway, then the
alternatives seem to boil down to either unsynchronized polling, or
samples-on-demand.  Some applications e.g. mine, really want the
latter.


b.g.
-- 
Bill Gatliff
bgat@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux