[PATCH 1/2] Add Variance filter
nelsoneci at gmail.com
Fri Dec 5 03:15:43 CET 2008
On Thu, Dec 04, 2008 at 11:58:48PM +0100, Michael 'Mickey' Lauer wrote:
> Andy, Nelson,
> with all your work on improving touchscreen in-kernel, what's your take on
To the point:
Not that I'm working on it ... but if by adding a few more filters (at
most 3 small ones) we can do the calibration and all the filtering in
kernel space and not require tslib, should we do it?
Now the long part explaining what I'm doing now:
I measured ADC conversion time. If we want to send an event each 10ms to
user-space we could take about 18 samples (8.45459 milliseconds). That
leaves some time for some algorithms -- the ones in use now are fast and
some can be improved.
I think the kernel has a good opportunity to do something with this data
to provide better points with no kernel-user switching/communication.
It's useful to have some filtering in kernel space.
I'm rather new to the touchscreen world thus I don't have strong
opinions. About tslib I like something: the user can decide to do more
filtering without touching kernel code. When I debug I use tslib without
much filtering using the essential modules (module_raw, pthres, and
linear for the calibration) and the clicks work very well. Lines are
smoother with tslib also (using dejitter and variance filters) but the
raw events are pretty usable.
I've been studying this code and I now I think we can just have the
specific code in the driver file and everything else as filters (as Andy
proposed). These filters might be useful for other drivers.
In my whiteboard I have this filter chain:
Interrupt code / A very small timer ==>
variance => median => mean => skip_points => input_send
The first goal was to make the driver more reliable and I think that has
been done (waiting for feedback).
Right now I'm working at improving the driver with the current
functionality to because we'll have to propose it to mainline. I think I
found a flaw with the current filters that use sorting and I'm working
on it -- I also have to move code from the driver to filters (two
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20081204/5b2c287b/attachment.pgp
More information about the openmoko-kernel