libinput/src
Hans de Goede 6f39a9e1c2 filter: Add timestamp smoothing support
Some devices, specifically some bluetooth touchpads generate quite
unreliable timestamps for their events. The problem seems to be that
(some of) these touchpads sample at aprox 90 Hz, but the bluetooth stack
only communicates about every 30 ms (*) and then sends mutiple HID input
reports in one batch.

This results in 2-4 packets / SYNs every 30 ms. With timestamps really
close together. The finger coordinate deltas in these packets change by
aprox. the same amount between each packet when moving a finger at
constant speed. But the time deltas are e.g. 28 ms, 1 ms, 1 ms resulting
in calculate_tracker_velocity returning vastly different speeds for the
1st and 2nd packet, which in turn results in very "jerky" mouse pointer
movement.

*) Maybe it is waiting for a transmit time slot or some such.

This commit adds support for a real simple timestamp smoothing algorithm,
intended *only* for use with touchpads. Since touchpads will send a
contineous stream of events at their sample rate when a finger is down,
this filter simply assumes that any events which are under
event_delta_smooth_threshold us apart are part of a smooth continuous
stream of events with each event being event_delta_smooth_value us apart.

Theoritically a very still finger may send the exact same coordinates
and pressure twice, but even if this happens that is not a problem because
a still finger generates coordinates changes below the hyst treshold so
we ignore it anyways.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-01 16:42:19 +01:00
..
evdev-lid.c lid: disable all types but EV_SYN and EV_SW 2017-07-27 19:00:43 +10:00
evdev-middle-button.c timer: add a timer name to each timer 2017-07-10 12:00:50 +10:00
evdev-mt-touchpad-buttons.c timer: add a timer name to each timer 2017-07-10 12:00:50 +10:00
evdev-mt-touchpad-edge-scroll.c timer: add a timer name to each timer 2017-07-10 12:00:50 +10:00
evdev-mt-touchpad-gestures.c gestures: don't try to pinch for nfingers > slots 2017-08-01 16:42:03 +01:00
evdev-mt-touchpad-tap.c timer: add a timer name to each timer 2017-07-10 12:00:50 +10:00
evdev-mt-touchpad.c Merge branch 'wip/touchpad-apple-touch-major-v2' 2017-07-14 13:47:29 +10:00
evdev-mt-touchpad.h touchpad: add touch-size-based palm detection 2017-07-11 12:28:28 +10:00
evdev-tablet-pad-leds.c Abort if zalloc ever fails 2017-07-12 10:18:07 +10:00
evdev-tablet-pad.c Abort if zalloc ever fails 2017-07-12 10:18:07 +10:00
evdev-tablet-pad.h util: harmonize container_of() definition with linux kernel one 2017-05-17 15:04:41 +10:00
evdev-tablet.c Abort if zalloc ever fails 2017-07-12 10:18:07 +10:00
evdev-tablet.h util: harmonize container_of() definition with linux kernel one 2017-05-17 15:04:41 +10:00
evdev.c pointer: add button debouncing 2017-07-26 00:21:46 +10:00
evdev.h pointer: add button debouncing 2017-07-26 00:21:46 +10:00
filter-private.h filter: change the filter functions to take raw device coordinates 2016-12-21 10:55:57 +10:00
filter.c filter: Add timestamp smoothing support 2017-08-01 16:42:19 +01:00
filter.h filter: add a custom trackpoint accelerator 2017-07-20 11:53:01 +10:00
libinput-private.h Put a check in to make sure our events have correct timestamps 2017-04-28 16:47:38 +10:00
libinput-restore-selinux-context.sh Skip restorecon if it cannot be found 2017-06-23 09:58:42 +10:00
libinput-uninstalled.pc.in buildsystem: add missing uninstalled pkg-config infra 2016-08-30 17:18:39 +10:00
libinput-util.c Merge branch 'wip/touchpad-apple-touch-major-v2' 2017-07-14 13:47:29 +10:00
libinput-util.h trackpoint: drop handling of CONST_ACCEL and undo SENSITIVITY 2017-07-20 11:53:01 +10:00
libinput-version.h.in COPYING: Update boilerplate from MIT X11 to MIT Expat license 2015-06-16 14:36:04 +10:00
libinput.c Add safe_strdup() 2017-07-12 15:39:31 +10:00
libinput.h doc: add a line break 2017-07-12 10:17:43 +10:00
libinput.pc.in Add -lrt to the libs 2014-07-03 09:59:43 +10:00
libinput.sym configure.ac: libinput 1.7rc1 2017-02-23 10:49:11 +10:00
path-seat.c Add safe_strdup() 2017-07-12 15:39:31 +10:00
path-seat.h path: remove unused declaration of path_input_process_event 2017-02-01 16:59:58 +10:00
timer.c timer: always restart the timer loop when we called one of them 2017-07-25 18:28:18 +10:00
timer.h timer: add a timer name to each timer 2017-07-10 12:00:50 +10:00
udev-seat.c Add safe_strdup() 2017-07-12 15:39:31 +10:00
udev-seat.h COPYING: Update boilerplate from MIT X11 to MIT Expat license 2015-06-16 14:36:04 +10:00