[PATCH synaptics] Increase post-motion-event timeout from 13 to 50 ms.

Simon Thum simon.thum at gmx.de
Mon Feb 28 10:58:06 PST 2011


On 02/28/2011 01:56 PM, Daniel Kurtz wrote:
> Some Synaptics image sensors report samples at less than 80 Samples/sec.
> Thus, the inter-sample gap is longer than 13 ms (more like 17-25 ms).
> 
> With a 13ms timeout, every sample was processed twice:
>   1) Once when ReadHwState() returned valid data.
>   2) 13ms later, when the scheduled timer would expire.
> 
> The value 50ms is chosen arbitrarily higher than the expected slowest
> trackpad reporting interval, but short enough not to be noticeable by
> a human user.
Sounds reasonable, but isn't that creating rather stuttering motion?

The hw struct should indicate whether it has actual data, then the
problem can be solved on top of that.

Cheers,

Simon


> 
> Signed-off-by: Daniel Kurtz <djkurtz at google.com>
> ---
>  src/synaptics.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/synaptics.c b/src/synaptics.c
> index 56ce725..0b2d7a1 100644
> --- a/src/synaptics.c
> +++ b/src/synaptics.c
> @@ -1870,7 +1870,7 @@ ComputeDeltas(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
>  
>      /* to create fluid edge motion, call back 'soon'
>       * even in the absence of new hardware events */
> -    delay = MIN(delay, 13);
> +    delay = MIN(delay, 50);
>  
>      if (priv->count_packet_finger <= 3) /* min. 3 packets, see get_delta() */
>          goto skip; /* skip the lot */



More information about the xorg-devel mailing list