Re: Patch to handle touchpads in g-i available
On Thu, 23 Nov 2006 11:23:07 +0100 Frans Pop wrote: Works on my laptop with alps touchpad. Cursor movement is a bit slow. Tapping does not work correctly: - deliberate tapping sometimes works, but mostly not - very quick mouse movement will always end in a tap Due to an hardware upgrade I have a notebook from my wife's sister here for some days and abused it for d-i testing ;-) It has an Alps PS2 Glidepoint touchpad and I can confirm, what Frans wrote: - Cursor movement is slow, but acceptable. - Tapping doesn't work as it should (see above). But for an installation system it's ok IMHO. Holger -- == Created with Sylpheed 2.2.2 under Debian GNU/LINUX 3.1 »Sarge« http://counter.li.org/, Registered LinuxUser #311290 Spamfiltering by bogofilter.sourceforge.net = -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Patch to handle touchpads in g-i available
Holger Wansing wrote: On Wed, 22 Nov 2006 16:44:39 +0100 Attilio Fiandrotti [EMAIL PROTECTED] wrote: I prepared an iso image [2] which includes the fix: i'm asking testers who previously reported their synaptics touchpad not working within g-i to test this iso and report results and feelings about how the touchpad works. [2] https://debian.polito.it/downloads/mini_synaptics.iso Works great for me. (Synaptics Touchpad on a Gericom Laptop; touchpad didn't work in g-i before) cool! i tried o my father's laptop too and it worked well, even if the cursor moves slower slower than on my laptop (i guess because different input dynamics). hope new reports will come cheers Attilio -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Patch to handle touchpads in g-i available
On Wednesday 22 November 2006 16:44, Attilio Fiandrotti wrote: I recently wrote a patch against DFB 0.9.25 which adds to linux_input the capability to translate absolute x,y coordinates generated by touchpads into relative ones: this allows using Synaptic touchpads with the g-i. Works on my laptop with alps touchpad. Cursor movement is a bit slow. Tapping does not work correctly: - deliberate tapping sometimes works, but mostly not - very quick mouse movement will always end in a tap However, it is a lot better than the current situation, so I'd very much like to try to get this patch in before Etch. Could you file a BR against the directfb package and discuss an upload for it with the maintainer? It would be nice to also get some testing of this patch on powerpc with the directfb input module enabled. Cheers, FJP pgpli85pxZD6m.pgp Description: PGP signature
Re: Patch to handle touchpads in g-i available
Frans Pop wrote: On Wednesday 22 November 2006 16:44, Attilio Fiandrotti wrote: I recently wrote a patch against DFB 0.9.25 which adds to linux_input the capability to translate absolute x,y coordinates generated by touchpads into relative ones: this allows using Synaptic touchpads with the g-i. Works on my laptop with alps touchpad. Cursor movement is a bit slow. Tapping does not work correctly: - deliberate tapping sometimes works, but mostly not - very quick mouse movement will always end in a tap experienced something similar on my father's laptop: cursor moves much slower than on my touchpad, i guess because different touchpads provide different X,Y ranges. This could be fixed lowering the speed scaling factor, but this may result in too fast motion on other touchpads like mine (i own an hp pavillon laptop ). I also experienced tap not working on my father's latop: this may be because of different Z input values and could be adjusted by lowering the pressure treshold over which the tap is reported, but there are drawback there too (luckily the user can use the normal buttons) However, it is a lot better than the current situation, so I'd very much like to try to get this patch in before Etch. Could you file a BR against the directfb package and discuss an upload for it with the maintainer? alright, i'll open a new bug for directfb tagging it patch; i'd just like to wait a couple of days still for more reports to come ( i sent a call for testing to d-italian and responses are generally positive ATM ) It would be nice to also get some testing of this patch on powerpc with the directfb input module enabled. Uhm, does the Macintosh touchpads are recognized as ps2 mices? in this case the patch shouldn't be even necessary (ps2mouse input module would be used instead), but as i own no mac powerbook i cannot check. cheers attilio -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Patch to handle touchpads in g-i available
On Thu, 23 Nov 2006 10:25:02 +0100 Attilio Fiandrotti [EMAIL PROTECTED] wrote: i tried o my father's laptop too and it worked well, even if the cursor moves slower slower than on my laptop (i guess because different input dynamics). Well, as I don't use the touchpad in normal work (use usb mouse instead), I have no experience about the speed and that. Holger -- Created with Sylpheed 2.0.4 under Debian GNU/LINUX 3.1 Sarge Registered LinuxUser #311290 Spam filtering by bogofilter.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Patch to handle touchpads in g-i available
Holger Wansing wrote: On Thu, 23 Nov 2006 10:25:02 +0100 Attilio Fiandrotti [EMAIL PROTECTED] wrote: i tried o my father's laptop too and it worked well, even if the cursor moves slower slower than on my laptop (i guess because different input dynamics). Well, as I don't use the touchpad in normal work (use usb mouse instead), I have no experience about the speed and that. Holger, could you please check if cursor speed and touchpad sensitivity is similar to that in X? do you see any big difference between the g-i and Xorg ? Attilio -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Patch to handle touchpads in g-i available
El mié, 22-11-2006 a las 16:44 +0100, Attilio Fiandrotti escribió: Hi I recently wrote a patch against DFB 0.9.25 which adds to linux_input the capability to translate absolute x,y coordinates generated by touchpads into relative ones: this allows using Synaptic touchpads with the g-i. The patch was sent for review to directfb-dev [1] and was said to be ok, updated patch is attached to this mail. I prepared an iso image [2] which includes the fix: i'm asking testers who previously reported their synaptics touchpad not working within g-i to test this iso and report results and feelings about how the touchpad works. I just tested the image and the touchpad works fine :) The only thing that doesn't work is the scrolling side of the touchpad, but I guess most users of the installer could live without it for now. cheers Attilio Thanks for the fix! [1] http://mail.directfb.org/pipermail/directfb-dev/2006-November/002414.html [2] https://debian.polito.it/downloads/mini_synaptics.iso -- Alejandro Rios Peña signature.asc Description: Esta parte del mensaje está firmada digitalmente
Re: Patch to handle touchpads in g-i available
Alejandro Rios Peña wrote: El mié, 22-11-2006 a las 16:44 +0100, Attilio Fiandrotti escribió: Hi I recently wrote a patch against DFB 0.9.25 which adds to linux_input the capability to translate absolute x,y coordinates generated by touchpads into relative ones: this allows using Synaptic touchpads with the g-i. The patch was sent for review to directfb-dev [1] and was said to be ok, updated patch is attached to this mail. I prepared an iso image [2] which includes the fix: i'm asking testers who previously reported their synaptics touchpad not working within g-i to test this iso and report results and feelings about how the touchpad works. I just tested the image and the touchpad works fine :) The only thing that doesn't work is the scrolling side of the touchpad, but I guess most users of the installer could live without it for now. on your pavillon dv1117 the patch should perform almost as X synaptics driver does (i developed the driver on a pavillon laptop) thanks for testing again cheers attilio -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Patch to handle touchpads in g-i available
On Thu, 23 Nov 2006 14:37:28 +0100 Attilio Fiandrotti [EMAIL PROTECTED] wrote: Holger, could you please check if cursor speed and touchpad sensitivity is similar to that in X? do you see any big difference between the g-i and Xorg ? Sensitivity: no difference detectable Speed: while others (Frans and you?) mentioned very slow speed, I have higher speed compared with XFree86 (I have Sarge running, so I can only compare with XFree86, not X.org, if this makes a difference (different version of synaptics driver in X?)) Speed is faster as in X, but not so fast, that it would be unusable. I can position the cursor on everything I want without any problems. So it's ok here. Holger -- Created with Sylpheed 2.0.4 under Debian GNU/LINUX 3.1 Sarge Registered LinuxUser #311290 Spam filtering by bogofilter.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Patch to handle touchpads in g-i available
whops, forget the previous patch, that was an old one: the up to date one is attached to this mail. the iso i prepared was however built using the right patchfile. cheers attilio --- linux_input.c.orig 2006-11-15 12:23:52.0 +0100 +++ linux_input.c 2006-11-21 23:26:36.0 +0100 @@ -59,6 +59,8 @@ #include sys/stat.h #include sys/ioctl.h #include sys/kd.h +#include stdlib.h + #include linux/keyboard.h @@ -283,6 +285,35 @@ }; /* + * Touchpads related stuff + */ +#define TOUCHPAD_SCALING_FACTOR 5 +#define TOUCHPAD_FSM_START 0 +#define TOUCHPAD_FSM_MAIN 1 +#define TOUCHPAD_FSM_END2 + +/* expressed in usecs + */ +#define TOUCHPAD_SINGLE_CLICK_TIMEOUT25 + +/* lower touchpad pressure treshold for the mouse cursor to start moving + */ +#define TOUCHPAD_START_MOTION_PRESSURE_TRESHOLD 20 + +/* motion is reduced in a indirectly proportional way to finger pressure, + * this is the unit treshold + */ +#define TOUCHPAD_SCALING_FACTOR_PRESSURE 35 + +int x_old = -1, y_old = -1, dx, dy, last_pressure, fire_single_click_flag = 0; +struct timeval *last_mousetouch; +int touchpad_state = TOUCHPAD_FSM_START; + +static int +touchpad_fsm ( struct input_event *levt, + DFBInputEvent *devt ); + +/* * Translates a Linux input keycode into a DirectFB keycode. */ static int @@ -484,11 +515,11 @@ key_event( struct input_event *levt, DFBInputEvent *devt ) { - /* map touchscreen and smartpad events to button mouse */ - if (levt-code == BTN_TOUCH || levt-code == BTN_TOOL_FINGER) - levt-code = BTN_MOUSE; + /* don't map touchscreen and smartpad events to button mouse */ +// if (levt-code == BTN_TOUCH || levt-code == BTN_TOOL_FINGER) +// levt-code = BTN_MOUSE; - if (levt-code = BTN_MOUSE levt-code BTN_JOYSTICK) { + if ( (levt-code = BTN_MOUSE levt-code BTN_JOYSTICK) || levt-code == BTN_TOUCH) { devt-type = levt-value ? DIET_BUTTONPRESS : DIET_BUTTONRELEASE; /* don't set DIEF_BUTTONS, it will be set by the input core */ devt-button = DIBI_FIRST + levt-code - BTN_MOUSE; @@ -579,8 +610,9 @@ break; default: - if (levt-code = ABS_PRESSURE || levt-code DIAI_LAST) -return 0; +// why this ? +// if (levt-code = ABS_PRESSURE || levt-code DIAI_LAST) +//return 0; devt-axis = levt-code; } @@ -669,6 +701,8 @@ intreadlen; struct input_event levt[64]; + last_mousetouch = malloc ( sizeof(struct timeval)); + while ((readlen = read(data-fd, levt, sizeof(levt)) / sizeof(levt[0])) 0 || (readlen 0 errno == EINTR)) { @@ -681,10 +715,15 @@ for (i=0; ireadlen; i++) { DFBInputEvent devt; - +//printf(levt-type = %d, levt-code = %d, levt-value = %d\n, levt[i].type, levt[i].code, levt-value ); if (!translate_event( levt[i], devt )) continue; + if ( (devt.type == DIET_AXISMOTION (devt.flags DIEF_AXISABS)) || levt[i].code == BTN_TOUCH || ( levt[i].type == EV_ABS levt[i].code == ABS_PRESSURE ) ) { +if (touchpad_fsm ( levt[i], devt ) == 0) + continue; + } + if (devt.type == DIET_AXISMOTION (devt.flags DIEF_AXISREL)) { switch (devt.axis) { case DIAI_X: @@ -700,7 +739,7 @@ } } - flush_xy( data ); +// flush_xy( data ); dfb_input_dispatch( data-device, devt ); @@ -1082,3 +1121,104 @@ /* free private data */ D_FREE( data ); } + +/* + * This FSM takes into accout finger landing on touchpad and leaving and + * translates absolute DFBInputEvent into a relative one + */ +static int +touchpad_fsm ( struct input_event *levt, + DFBInputEvent *devt ) +{ + int ret_val; + + if ( levt-type == EV_ABS levt-code == ABS_PRESSURE ) { + last_pressure = levt-value; + return 0; + } + + switch (touchpad_state) { + + case TOUCHPAD_FSM_START: + /* finger is landing */ + if ((levt-type == EV_KEY levt-code == BTN_TOUCH levt-value == 1) || (last_pressure TOUCHPAD_START_MOTION_PRESSURE_TRESHOLD)) { +last_mousetouch-tv_sec = (levt-time).tv_sec; +last_mousetouch-tv_usec = (levt-time).tv_usec; +if (last_pressure TOUCHPAD_START_MOTION_PRESSURE_TRESHOLD) + touchpad_state = TOUCHPAD_FSM_MAIN; + } + ret_val = 0; + break; + + case TOUCHPAD_FSM_MAIN: + /* translating mouse movements into relative coordinates */ + if (levt-type == EV_ABS (levt-code == ABS_X || levt-code == ABS_Y)) { +switch
Re: Patch to handle touchpads in g-i available
On Wed, 22 Nov 2006 16:44:39 +0100 Attilio Fiandrotti [EMAIL PROTECTED] wrote: I prepared an iso image [2] which includes the fix: i'm asking testers who previously reported their synaptics touchpad not working within g-i to test this iso and report results and feelings about how the touchpad works. [2] https://debian.polito.it/downloads/mini_synaptics.iso Works great for me. (Synaptics Touchpad on a Gericom Laptop; touchpad didn't work in g-i before) Well done Holger -- Created with Sylpheed 2.0.4 under Debian GNU/LINUX 3.1 Sarge Registered LinuxUser #311290 Spam filtering by bogofilter.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]