Call For Testers: Synaptics touchpads

Jan Kokemüller jan.kokemueller at gmail.com
Sun Apr 19 18:46:25 UTC 2015


On 08.04.2015 09:19, Rui Paulo wrote:
> The attached patch adds support for newer touchpad features and implements two
> finger scrolling.

Hi,
thanks for bringing two finger scrolling to the psm driver!

I've attached a patch of some more improvements and fixes. I hope some 
of this stuff can make it into the driver:

- Two finger scrolling support for "semi-MT" touchpads. Those include 
many of the older Synaptics touchpads before "true" multitouch support 
(indicated by capMultiFinger). Semi-MT touchpads can report a second 
finger position, but the X or Y coordinate may be swapped with some 
coordinate of the first finger. This is a result of how the hardware 
works internally. Therefore, all that can be reliably extracted is the 
bounding box of the two finger positions. Semi-MT touchpads can be 
recognized by the capAdvancedGestures capability bit. After setting the 
mode byte, advanced gestures mode has to be enabled. Then, data packets 
compatible with the capMultiFinger format are sent, so the same two 
finger scrolling code can be leveraged. Enabling advanced gestures mode 
on true multitouch touchpads should be harmless. Linux seems to always 
enable advanced gestures mode. I don't have a real multitouch touchpad 
for testing though.

- Put mode setting logic into own functions synaptics_preferred_mode() 
and synaptics_set_mode() to have this in one place. 
synaptics_passthrough_on() and synaptics_passthrough_off() currently 
always use 0xc1 as the mode byte, which may be wrong for touchpads that 
don't have capExtended (sorry, my fault).

- Expose X and Y resolution of touchpad to userland. Also expose minimum 
and maximum X and Y coordinates. This is useful for programs in 
userspace that read raw PSM packets (with PSM_LEVEL_NATIVE enabled) and 
need to interpret the coordinates.

- Also send "extended w mode" packets (see section 3.2.9 of 
511-000275-01_RevB.pdf) to userspace if PSM_LEVEL_NATIVE is enabled. 
This is useful for userspace programs/drivers such as 
xf86-input-synaptics that can handle these packets.

- Fix parsing of nExtendedQueries, and request extended/continued 
capability bits depending on this value.

- capReportsMax, capClearPad, capAdvancedGestures and capCoveredPad must 
be extracted from status[0] and not status[2], I think.


Two finger scrolling works reasonably well with my semi-MT touchpad 
(Lenovo T420). However, it is very sensitive if I move my fingers very 
slowly. I wonder if this is because it's a semi-MT touchpad or if I have 
to tweak some setting. Also sometimes, if I move my fingers up, it 
scrolls down, and vice versa. Maybe this is a result of how dxp and dyp 
are calculated with the abs() function?

Cheers,
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: synaptics-improvements.patch
Type: text/x-patch
Size: 13566 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20150419/19a4ec68/attachment.bin>


More information about the freebsd-current mailing list