On Wed, Mar 2, 2011 at 5:16 PM, Ping Cheng <pingli...@gmail.com> wrote: > It was an issue with older kernels. This driver only supports > kernels 2.6.26 and later. No need to do that any more. > > There is a special case that this code may have helped though. > If tool is on the tablet while driver started, waiting for more > events before processing them would fill some otherwise filtered > events from the kernel. Even for this case, the solution should > be added inside wcmUSB.c, instead of here. > > We'll work on that in wcmUSB.c later. Just for the record. The > perfect solution would be to retrieve all events from the kernel > if important events, such as tool type, serial number, etc, are > missing. This would require quite some changes in wcmUSB.c. And, > the challenge is that linux-input doesn't provide the means for > us to retrieve all of the events that posted from the kernel. At > least, we can not retrieve serial number and MT events yet. > > Signed-off-by: Ping Cheng <pingli...@gmail.com> > --- > src/wcmCommon.c | 11 ----------- > 1 files changed, 0 insertions(+), 11 deletions(-) > > diff --git a/src/wcmCommon.c b/src/wcmCommon.c > index 09435d4..911e9a9 100644 > --- a/src/wcmCommon.c > +++ b/src/wcmCommon.c > @@ -870,17 +870,6 @@ void wcmEvent(WacomCommonPtr common, unsigned int > channel, > } > } > > - /* Discard the first 2 USB packages due to events delay */ > - if ( (pChannel->nSamples < 2) && IsUSBDevice(common) && > - ds.device_type != PAD_ID && (ds.device_type != TOUCH_ID) ) > - { > - DBG(11, common, > - "discarded %dth USB data.\n", > - pChannel->nSamples); > - ++pChannel->nSamples; > - return; /* discard */ > - } > - > if (TabletHasFeature(common, WCM_ROTATION) && > TabletHasFeature(common, WCM_RING)) /* I4 */ > {
I am all for removing this code. I didn't like it for reasons you stated (should be in wcmUSB.c based on if() statement). I recall running across multiple issues though that this statement seemed to help. I can't recall now what issue was so obviously I should have added a comment when I noticed it. I think one issue was what you mention. kernel filtering+memset() in xf86-input-wacom resulted in high chance of X or Y being zero and so return as work around. We are no longer memset()'ing for generic and protocol 4 so issue is limited to protocol 5 devices. Whats a little strange is above if() ignored TOUCH case but it has exact same issue (but also now resolved). I think the other "issue" I saw was probably just an observation I had. If we can fix the memset() issue then its a good idea to add first 3 packets to filter window and return instead of just returning. This would be similar to what xf86-input-synatpics does so that we never use an un-averaged value from HW. Today, the first 3 are un-averaged and so have sample errors. So at least I agree with your plan of action since it keeps moving us forward. Reviewed-by: Chris Bagwell <ch...@cnpbagwell.com> Chris ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel