From owner-freebsd-current@FreeBSD.ORG Thu Aug 5 13:56:59 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27C6116A4CE for ; Thu, 5 Aug 2004 13:56:59 +0000 (GMT) Received: from out009.verizon.net (out009pub.verizon.net [206.46.170.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97B8743D41 for ; Thu, 5 Aug 2004 13:56:58 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from [10.0.3.231] ([141.153.201.221]) by out009.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040805135657.LHAK23440.out009.verizon.net@[10.0.3.231]>; Thu, 5 Aug 2004 08:56:57 -0500 From: "Alexandre \"Sunny\" Kovalenko" To: Mikko =?ISO-8859-1?Q?Ty=F6l=E4j=E4rvi?= In-Reply-To: <20040804230815.R695@sotec.home> References: <200408042100.i74L0PiQ056577@bunrab.catwhisker.org> <1091671902.698.4.camel@RabbitsDen> <20040804230815.R695@sotec.home> Content-Type: text/plain; charset=ISO-8859-1 Message-Id: <1091714186.698.20.camel@RabbitsDen> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 05 Aug 2004 09:56:27 -0400 Content-Transfer-Encoding: 8bit X-Authentication-Info: Submitted using SMTP AUTH at out009.verizon.net from [141.153.201.221] at Thu, 5 Aug 2004 08:56:57 -0500 cc: freebsd-current@freebsd.org Subject: Re: Challenge getting touchpad to work since src/sys/isa/psm.c 1.71 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2004 13:56:59 -0000 On Thu, 2004-08-05 at 02:10, Mikko Työläjärvi wrote: > On Wed, 4 Aug 2004, Alexandre "Sunny" Kovalenko wrote: > > > On Wed, 2004-08-04 at 17:00, David Wolfskill wrote: > >> Sorry about the delay; right around the time of the commit, I was having > >> some thermal issues with my laptop (a Dell Inspiron 5000e). I believe > >> those are fixed now -- it's gone through 5 days, each of which has > >> involved a "buildworld cycle" for each of -STABLE & -CURRENT, without > >> incident. > >> > >> But I'm now having trouble getting a "touchpad tap" to be recognized as > >> a press/release of a mouse button in -CURRENT; I believe that the recent > >> commit to src/sys/isa/psm.c 1.71 is involved. > > Rolling psm.c back to 1.70 restores tapping behavior of the touchpad on > > my AVERATEC 3150H. Unfortunately with 200+ lines of diff, I could not > > come up with the better idea at the moment. > > > > I can test patches or try out settings if necessary. > > Here is what I'm using: > > $.02, > /Mikko > > --- psm.c.orig Wed Aug 4 22:34:32 2004 > +++ psm.c Wed Aug 4 22:34:38 2004 > @@ -103,6 +103,13 @@ > #define PSM_INPUT_TIMEOUT 2000000 /* 2 sec */ > #endif > > +#ifndef PSM_TAP_TIMEOUT > +#define PSM_TAP_TIMEOUT 125000 > +#endif > +#ifndef PSM_TAP_THRESHOLD > +#define PSM_TAP_THRESHOLD 25 > +#endif > + > /* end of driver specific options */ > > #define PSM_DRIVER_NAME "psm" > @@ -181,6 +188,8 @@ > struct cdev *bdev; > int lasterr; > int cmdcount; > + struct timeval taptimeout; /* (Synaptics) width of a "tap" pulse */ > + int zmax; /* (Synaptics) pressure measured during tap */ > }; > static devclass_t psm_devclass; > #define PSM_SOFTC(unit) ((struct psm_softc*)devclass_get_softc(psm_devclass, unit)) > @@ -2531,11 +2540,20 @@ > } else { > sc->flags |= PSM_FLAGS_FINGERDOWN; > } > - > + sc->zmax = imax(z, sc->zmax); > sc->xold = x0; > sc->yold = y0; > } else { > sc->flags &= ~PSM_FLAGS_FINGERDOWN; > + sc->flags &= ~PSM_FLAGS_FINGERDOWN; > + if (sc->zmax > PSM_TAP_THRESHOLD > + && timevalcmp(&sc->lastsoftintr, &sc->taptimeout, <=)) { > + ms.button |= MOUSE_BUTTON1DOWN; > + } > + sc->zmax = 0; > + sc->taptimeout.tv_sec = PSM_TAP_TIMEOUT / 1000000; > + sc->taptimeout.tv_usec = PSM_TAP_TIMEOUT % 1000000; > + timevaladd(&sc->taptimeout, &sc->lastsoftintr); > } > z = 0; > break; I was not able to apply this patch to psm.c 1.71. There is another patch from Philip Paeps, which applied cleanly, and I am going to test it shortly. Thank you. --- Alexandre "Sunny" Kovalenko.