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

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

 



Stelian Pop <[email protected]> writes:

> Le lundi 11 juillet 2005 à 02:15 +0200, Peter Osterlund a écrit :
> > Vojtech Pavlik <[email protected]> writes:
> > 
> > > 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.
> 
> 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.
> 
> * 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).

It would be interesting if you could generate some debug dumps using
the "sample" line:

+	dbg_dump("sample", xy_cur);

The "accumulator" dumps are not needed, the raw data should be
enough. Including timing information would be helpful though, like
this:

--- a/drivers/usb/input/appletouch.c
+++ b/drivers/usb/input/appletouch.c
@@ -121,7 +121,7 @@ struct atp {
 #define dbg_dump(msg, tab) \
 	if (debug > 1) {						\
 		int i;							\
-		printk("appletouch: %s ", msg);				\
+		printk("appletouch: %s %lld ", msg, (long long)jiffies);\
 		for (i = 0; i < ATP_XSENSORS + ATP_YSENSORS; i++)	\
 			printk("%02x ", tab[i]); 			\
 		printk("\n"); 						\

Debug dumps for the following actions would be interesting.

1. When not touching the touchpad.
2. When trying to hold a finger on the touchpad without moving it.
3. A single finger movement. (Touch, move finger, release.)
4. A single finger touch. First a light touch, then pressing harder
   and harder, to see if a reliable pressure value can be computed
   from the data.
5. A two-finger touch.

> I would prefer to submit the patch myself, because as you say you cannot
> test the code and those changes are rather sensitive.

No problem, I just needed a patch when I was playing around with StGIT
and thought I might as well use a real patch.

-- 
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340
-
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