Re: [PATCH] Apple USB Touchpad driver (new)

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

 



On Mon, Jul 11, 2005 at 12:39:31PM +0200, Stelian Pop wrote:
 
> > > Using a function like
> > > 
> > > 	return (x_old * 3 + x) / 4;
> > > 
> > > eliminates the need for a FIFO, and has similar (if not better)
> > > properties to floating average, because its coefficients are
> > > [ .25 .18 .14 .10 ... ].
> > 
> > Agreed.
> 
> Except that this does not work well enough.

I guess the quick motion compensation in input bites you. The above
equation should do even more smoothing than regular 4-point floating
average.

> There are two problems I encountered in this driver:
> * fuzz problems (keeping the finger at the same place makes the pointer
> dance around its position). This is solved by the input core's fuzz
> treatment, as I already set the fuzz to 16 in the code.

OK.

> * hickup problems (moving the finger generates non linear points,
> something like 1 1 1 3 3 3 4 4 4 instead of 1 1 1 2 2 3 3 4 4). And here
> the floating average approach works better than the input core's method.
> (this could probably be solved also by changing the way the absolute
> coordinate is calculated from the sensor array in atp_calculate_abs, but
> I haven't been able to find a better linear function).

I of course won't object to the floating average in the driver if you
say it's needed, I'm just wondering what happens here, because the input
core should smooth this out as well, and if it doesn't, there may be a
problem somewhere.

> > Also, it might be a good idea to compute an ABS_PRESSURE value instead
> > of hardcoding it to 100. I think the psum variable in
> > atp_calculate_abs() can be used, possibly after rescaling.
> 
> I already thought about this, one problem is that the sensors do not
> report the pressure but only the amount of surface touched. A person
> with thick fingers will always generate higher pressures then one with
> thin ones, no matter how hard they push on the touchpad.

That's what all other touchpads do.

> I don't think this value is reliable enough to be reported to the
> userspace as ABS_PRESSURE...

I believe it'd still be more useful than a two-value (0 and 100) output.


> +			/*
> +			 * in the future, we could add here code to search for
> +			 * a second finger...
> +			 * for now, scrolling using the synaptics X driver is
> +			 * much more simpler to achieve.
> +			 */

This could be quite useful, too, for right and middle button taps (2 and
3 fingers) - since the Macs lack these buttons.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux