Comment 186 for bug 606238

Revision history for this message
Vreixo Formoso (metalpain2002) wrote : Re: synaptic touchpad not recognized on dell latitude e6510 and others

Sorry for so many comments, but I don't have time to completely solve this and I want to report my thoughts in case somebody find them useful.

I have tried to identify possible values for the first by of packet,s trying with different number of fingers. I get:

1-finger => always c8
2-finger => ca interleaved with ea, ec, ed (almost always ec)
3-finger => ca interleaved with ee (sometimes ef)
4-finger => ce interleaved with f8, f9 or fb

(does somebody have windows installed? do the touchpad works with more than 2 fingers? If not, maybe some of those extra bit mean error or just report excessive pressure...)

The format of ca and c8 packets seems to be the same. Maybe some differences in a particular bit, but x,y and z make sense.
I don't know the format of ex packets, but I think the 3 less significant bits could be related with z value. For example, with 2 fingers you almost always get ec, but on transitions you get ea or ed. In particular, ea appears when you rise the finger, which is reasonable (a < c => less pressure). I think the 3 LSB of packet[0] are the 3 MSB of z.
Note that a similar behavior appears with the fX packets using 4 fingers. Values ee and ef are get with 3 fingers. If the touchpad only support 2 fingers, it may mean the touchpad is just detecting big pressure, so big z values.

About the format of e packets:

With mt and moving only one finger vertically from top to bottom, I get variantions on 2nd and 3rd bytes, so I bet y is encoded (at least mostly) on those bits

ec f6 80 1e 60 0
...
ec fc 0 1e 60 1
...
ec e0 98 1e 60 0

Moving one finger horizontally left to right I get:

ed 87 87 48 0 70
...
ec c7 c3 8 3 70
...
ec 87 e1 8 0 70

Now most changes on 3rd and 4th bytes.

My guess:

packet[1] (2nd byte) => y (it seems LSBs of y)
packet[2] (3rd byte) => 4MSB x, 4 LSB y (both the MSB of x & y)
packet[3] (4th byte) => x (it seems LSBs of x)

but in any case this is very hard to figure this out, there are lots of possible cases. For example, if x and y values of e packets are relative to the other finger, my guesses have to be completely wrong.

Dave, how did you figure out the layout of single touch packets? Is there a particular methodology?

In any case, if you make the changes I suggest if previous comment (that is, to ignore the mt packets on the alps_process_touchpad_packet_v6 function, after logging the whole packet), I'm sure you will be able to solve this problem the same way you did with st.

Regards
Vreixo