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

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

 



Le lundi 11 juillet 2005 à 13:21 +0200, Vojtech Pavlik a écrit :
> On Mon, Jul 11, 2005 at 01:08:35PM +0200, Stelian Pop wrote:
> 
> > Possible. The 'fuzz' parameter in input core serves too many usages
> > ihmo. Let me try removing the quick motion compensation and see...
> 
> It was designed for joysticks and works very well for them. Usefulness
> for other device types may vary. And I'll gladly accept patches to
> improve it.

Ok, I understand now what is happenning, but I'm not sure how to solve
the problem. As I suspected, it is caused by 'fuzz' being a bit abused
by the input core.

The fuzz parameter in the input core is used today to say:
	* any change in the -fuzz/2 / +fuzz/2 range is ignored
	* any change in the -fuzz / +fuzz range is smoothed using x_old * 3 +
x) / 4;
	* any change in the -fuzz*2 / +fuzz/2 range is smoothed using x_old
+x) / 2;

My driver needs to ignore changes in the -8 / +8 range (that's why I set
FUZZ to 16 in the first place), but it needs to smooth the movement when
much larger changes occur (I would need to set FUZZ to 64 for smoothing
to work correctly here).

How to make it work ? Obviously I could implement either fuzz
elimination or smoothing in the driver, and leave the other
transformation to the input core (today it is the smoothing which is in
the driver, but doing it the other way around would result in much less
code).

The other (proper ?) solution would be to change the input core and
separate fuzz and smoothing. This would however require an API addition,
and I'm not sure you want to do that. If you do, I could work on a patch
implementing an inputdev->abssmooth[] table, etc).

> > I thought the hardware is capable of calculating real pressure...
> 
> Since the sensor is just a multi-layer PCB with a clever trace layout,
> it can't.
> 
> > > > 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.
> > 
> > Ok, I'll do it.
> 
> Thanks. Should I wait for that or apply the patch you just sent?

Well, it depends on what we do with smoothing.

Stelian.
-- 
Stelian Pop <[email protected]>

-
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