1*4882a593Smuzhiyun---------------------- 2*4882a593SmuzhiyunALPS Touchpad Protocol 3*4882a593Smuzhiyun---------------------- 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunIntroduction 6*4882a593Smuzhiyun------------ 7*4882a593SmuzhiyunCurrently the ALPS touchpad driver supports seven protocol versions in use by 8*4882a593SmuzhiyunALPS touchpads, called versions 1, 2, 3, 4, 5, 6, 7 and 8. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunSince roughly mid-2010 several new ALPS touchpads have been released and 11*4882a593Smuzhiyunintegrated into a variety of laptops and netbooks. These new touchpads 12*4882a593Smuzhiyunhave enough behavior differences that the alps_model_data definition 13*4882a593Smuzhiyuntable, describing the properties of the different versions, is no longer 14*4882a593Smuzhiyunadequate. The design choices were to re-define the alps_model_data 15*4882a593Smuzhiyuntable, with the risk of regression testing existing devices, or isolate 16*4882a593Smuzhiyunthe new devices outside of the alps_model_data table. The latter design 17*4882a593Smuzhiyunchoice was made. The new touchpad signatures are named: "Rushmore", 18*4882a593Smuzhiyun"Pinnacle", and "Dolphin", which you will see in the alps.c code. 19*4882a593SmuzhiyunFor the purposes of this document, this group of ALPS touchpads will 20*4882a593Smuzhiyungenerically be called "new ALPS touchpads". 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunWe experimented with probing the ACPI interface _HID (Hardware ID)/_CID 23*4882a593Smuzhiyun(Compatibility ID) definition as a way to uniquely identify the 24*4882a593Smuzhiyundifferent ALPS variants but there did not appear to be a 1:1 mapping. 25*4882a593SmuzhiyunIn fact, it appeared to be an m:n mapping between the _HID and actual 26*4882a593Smuzhiyunhardware type. 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunDetection 29*4882a593Smuzhiyun--------- 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunAll ALPS touchpads should respond to the "E6 report" command sequence: 32*4882a593SmuzhiyunE8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or 33*4882a593Smuzhiyun00-00-64 if no buttons are pressed. The bits 0-2 of the first byte will be 1s 34*4882a593Smuzhiyunif some buttons are pressed. 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunIf the E6 report is successful, the touchpad model is identified using the "E7 37*4882a593Smuzhiyunreport" sequence: E8-E7-E7-E7-E9. The response is the model signature and is 38*4882a593Smuzhiyunmatched against known models in the alps_model_data_array. 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunFor older touchpads supporting protocol versions 3 and 4, the E7 report 41*4882a593Smuzhiyunmodel signature is always 73-02-64. To differentiate between these 42*4882a593Smuzhiyunversions, the response from the "Enter Command Mode" sequence must be 43*4882a593Smuzhiyuninspected as described below. 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunThe new ALPS touchpads have an E7 signature of 73-03-50 or 73-03-0A but 46*4882a593Smuzhiyunseem to be better differentiated by the EC Command Mode response. 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunCommand Mode 49*4882a593Smuzhiyun------------ 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunProtocol versions 3 and 4 have a command mode that is used to read and write 52*4882a593Smuzhiyunone-byte device registers in a 16-bit address space. The command sequence 53*4882a593SmuzhiyunEC-EC-EC-E9 places the device in command mode, and the device will respond 54*4882a593Smuzhiyunwith 88-07 followed by a third byte. This third byte can be used to determine 55*4882a593Smuzhiyunwhether the devices uses the version 3 or 4 protocol. 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunTo exit command mode, PSMOUSE_CMD_SETSTREAM (EA) is sent to the touchpad. 58*4882a593Smuzhiyun 59*4882a593SmuzhiyunWhile in command mode, register addresses can be set by first sending a 60*4882a593Smuzhiyunspecific command, either EC for v3 devices or F5 for v4 devices. Then the 61*4882a593Smuzhiyunaddress is sent one nibble at a time, where each nibble is encoded as a 62*4882a593Smuzhiyuncommand with optional data. This encoding differs slightly between the v3 and 63*4882a593Smuzhiyunv4 protocols. 64*4882a593Smuzhiyun 65*4882a593SmuzhiyunOnce an address has been set, the addressed register can be read by sending 66*4882a593SmuzhiyunPSMOUSE_CMD_GETINFO (E9). The first two bytes of the response contains the 67*4882a593Smuzhiyunaddress of the register being read, and the third contains the value of the 68*4882a593Smuzhiyunregister. Registers are written by writing the value one nibble at a time 69*4882a593Smuzhiyunusing the same encoding used for addresses. 70*4882a593Smuzhiyun 71*4882a593SmuzhiyunFor the new ALPS touchpads, the EC command is used to enter command 72*4882a593Smuzhiyunmode. The response in the new ALPS touchpads is significantly different, 73*4882a593Smuzhiyunand more important in determining the behavior. This code has been 74*4882a593Smuzhiyunseparated from the original alps_model_data table and put in the 75*4882a593Smuzhiyunalps_identify function. For example, there seem to be two hardware init 76*4882a593Smuzhiyunsequences for the "Dolphin" touchpads as determined by the second byte 77*4882a593Smuzhiyunof the EC response. 78*4882a593Smuzhiyun 79*4882a593SmuzhiyunPacket Format 80*4882a593Smuzhiyun------------- 81*4882a593Smuzhiyun 82*4882a593SmuzhiyunIn the following tables, the following notation is used:: 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun CAPITALS = stick, miniscules = touchpad 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun?'s can have different meanings on different models, such as wheel rotation, 87*4882a593Smuzhiyunextra buttons, stick buttons on a dualpoint, etc. 88*4882a593Smuzhiyun 89*4882a593SmuzhiyunPS/2 packet format 90*4882a593Smuzhiyun------------------ 91*4882a593Smuzhiyun 92*4882a593Smuzhiyun:: 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun byte 0: 0 0 YSGN XSGN 1 M R L 95*4882a593Smuzhiyun byte 1: X7 X6 X5 X4 X3 X2 X1 X0 96*4882a593Smuzhiyun byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 97*4882a593Smuzhiyun 98*4882a593SmuzhiyunNote that the device never signals overflow condition. 99*4882a593Smuzhiyun 100*4882a593SmuzhiyunFor protocol version 2 devices when the trackpoint is used, and no fingers 101*4882a593Smuzhiyunare on the touchpad, the M R L bits signal the combined status of both the 102*4882a593Smuzhiyunpointingstick and touchpad buttons. 103*4882a593Smuzhiyun 104*4882a593SmuzhiyunALPS Absolute Mode - Protocol Version 1 105*4882a593Smuzhiyun--------------------------------------- 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun:: 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun byte 0: 1 0 0 0 1 x9 x8 x7 110*4882a593Smuzhiyun byte 1: 0 x6 x5 x4 x3 x2 x1 x0 111*4882a593Smuzhiyun byte 2: 0 ? ? l r ? fin ges 112*4882a593Smuzhiyun byte 3: 0 ? ? ? ? y9 y8 y7 113*4882a593Smuzhiyun byte 4: 0 y6 y5 y4 y3 y2 y1 y0 114*4882a593Smuzhiyun byte 5: 0 z6 z5 z4 z3 z2 z1 z0 115*4882a593Smuzhiyun 116*4882a593SmuzhiyunALPS Absolute Mode - Protocol Version 2 117*4882a593Smuzhiyun--------------------------------------- 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun:: 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun byte 0: 1 ? ? ? 1 PSM PSR PSL 122*4882a593Smuzhiyun byte 1: 0 x6 x5 x4 x3 x2 x1 x0 123*4882a593Smuzhiyun byte 2: 0 x10 x9 x8 x7 ? fin ges 124*4882a593Smuzhiyun byte 3: 0 y9 y8 y7 1 M R L 125*4882a593Smuzhiyun byte 4: 0 y6 y5 y4 y3 y2 y1 y0 126*4882a593Smuzhiyun byte 5: 0 z6 z5 z4 z3 z2 z1 z0 127*4882a593Smuzhiyun 128*4882a593SmuzhiyunProtocol Version 2 DualPoint devices send standard PS/2 mouse packets for 129*4882a593Smuzhiyunthe DualPoint Stick. The M, R and L bits signal the combined status of both 130*4882a593Smuzhiyunthe pointingstick and touchpad buttons, except for Dell dualpoint devices 131*4882a593Smuzhiyunwhere the pointingstick buttons get reported separately in the PSM, PSR 132*4882a593Smuzhiyunand PSL bits. 133*4882a593Smuzhiyun 134*4882a593SmuzhiyunDualpoint device -- interleaved packet format 135*4882a593Smuzhiyun--------------------------------------------- 136*4882a593Smuzhiyun 137*4882a593Smuzhiyun:: 138*4882a593Smuzhiyun 139*4882a593Smuzhiyun byte 0: 1 1 0 0 1 1 1 1 140*4882a593Smuzhiyun byte 1: 0 x6 x5 x4 x3 x2 x1 x0 141*4882a593Smuzhiyun byte 2: 0 x10 x9 x8 x7 0 fin ges 142*4882a593Smuzhiyun byte 3: 0 0 YSGN XSGN 1 1 1 1 143*4882a593Smuzhiyun byte 4: X7 X6 X5 X4 X3 X2 X1 X0 144*4882a593Smuzhiyun byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 145*4882a593Smuzhiyun byte 6: 0 y9 y8 y7 1 m r l 146*4882a593Smuzhiyun byte 7: 0 y6 y5 y4 y3 y2 y1 y0 147*4882a593Smuzhiyun byte 8: 0 z6 z5 z4 z3 z2 z1 z0 148*4882a593Smuzhiyun 149*4882a593SmuzhiyunDevices which use the interleaving format normally send standard PS/2 mouse 150*4882a593Smuzhiyunpackets for the DualPoint Stick + ALPS Absolute Mode packets for the 151*4882a593Smuzhiyuntouchpad, switching to the interleaved packet format when both the stick and 152*4882a593Smuzhiyunthe touchpad are used at the same time. 153*4882a593Smuzhiyun 154*4882a593SmuzhiyunALPS Absolute Mode - Protocol Version 3 155*4882a593Smuzhiyun--------------------------------------- 156*4882a593Smuzhiyun 157*4882a593SmuzhiyunALPS protocol version 3 has three different packet formats. The first two are 158*4882a593Smuzhiyunassociated with touchpad events, and the third is associated with trackstick 159*4882a593Smuzhiyunevents. 160*4882a593Smuzhiyun 161*4882a593SmuzhiyunThe first type is the touchpad position packet:: 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun byte 0: 1 ? x1 x0 1 1 1 1 164*4882a593Smuzhiyun byte 1: 0 x10 x9 x8 x7 x6 x5 x4 165*4882a593Smuzhiyun byte 2: 0 y10 y9 y8 y7 y6 y5 y4 166*4882a593Smuzhiyun byte 3: 0 M R L 1 m r l 167*4882a593Smuzhiyun byte 4: 0 mt x3 x2 y3 y2 y1 y0 168*4882a593Smuzhiyun byte 5: 0 z6 z5 z4 z3 z2 z1 z0 169*4882a593Smuzhiyun 170*4882a593SmuzhiyunNote that for some devices the trackstick buttons are reported in this packet, 171*4882a593Smuzhiyunand on others it is reported in the trackstick packets. 172*4882a593Smuzhiyun 173*4882a593SmuzhiyunThe second packet type contains bitmaps representing the x and y axes. In the 174*4882a593Smuzhiyunbitmaps a given bit is set if there is a finger covering that position on the 175*4882a593Smuzhiyungiven axis. Thus the bitmap packet can be used for low-resolution multi-touch 176*4882a593Smuzhiyundata, although finger tracking is not possible. This packet also encodes the 177*4882a593Smuzhiyunnumber of contacts (f1 and f0 in the table below):: 178*4882a593Smuzhiyun 179*4882a593Smuzhiyun byte 0: 1 1 x1 x0 1 1 1 1 180*4882a593Smuzhiyun byte 1: 0 x8 x7 x6 x5 x4 x3 x2 181*4882a593Smuzhiyun byte 2: 0 y7 y6 y5 y4 y3 y2 y1 182*4882a593Smuzhiyun byte 3: 0 y10 y9 y8 1 1 1 1 183*4882a593Smuzhiyun byte 4: 0 x14 x13 x12 x11 x10 x9 y0 184*4882a593Smuzhiyun byte 5: 0 1 ? ? ? ? f1 f0 185*4882a593Smuzhiyun 186*4882a593SmuzhiyunThis packet only appears after a position packet with the mt bit set, and 187*4882a593Smuzhiyunusually only appears when there are two or more contacts (although 188*4882a593Smuzhiyunoccasionally it's seen with only a single contact). 189*4882a593Smuzhiyun 190*4882a593SmuzhiyunThe final v3 packet type is the trackstick packet:: 191*4882a593Smuzhiyun 192*4882a593Smuzhiyun byte 0: 1 1 x7 y7 1 1 1 1 193*4882a593Smuzhiyun byte 1: 0 x6 x5 x4 x3 x2 x1 x0 194*4882a593Smuzhiyun byte 2: 0 y6 y5 y4 y3 y2 y1 y0 195*4882a593Smuzhiyun byte 3: 0 1 TP SW 1 M R L 196*4882a593Smuzhiyun byte 4: 0 z6 z5 z4 z3 z2 z1 z0 197*4882a593Smuzhiyun byte 5: 0 0 1 1 1 1 1 1 198*4882a593Smuzhiyun 199*4882a593SmuzhiyunTP means Tap SW status when tap processing is enabled or Press status when press 200*4882a593Smuzhiyunprocessing is enabled. SW means scroll up when 4 buttons are available. 201*4882a593Smuzhiyun 202*4882a593SmuzhiyunALPS Absolute Mode - Protocol Version 4 203*4882a593Smuzhiyun--------------------------------------- 204*4882a593Smuzhiyun 205*4882a593SmuzhiyunProtocol version 4 has an 8-byte packet format:: 206*4882a593Smuzhiyun 207*4882a593Smuzhiyun byte 0: 1 ? x1 x0 1 1 1 1 208*4882a593Smuzhiyun byte 1: 0 x10 x9 x8 x7 x6 x5 x4 209*4882a593Smuzhiyun byte 2: 0 y10 y9 y8 y7 y6 y5 y4 210*4882a593Smuzhiyun byte 3: 0 1 x3 x2 y3 y2 y1 y0 211*4882a593Smuzhiyun byte 4: 0 ? ? ? 1 ? r l 212*4882a593Smuzhiyun byte 5: 0 z6 z5 z4 z3 z2 z1 z0 213*4882a593Smuzhiyun byte 6: bitmap data (described below) 214*4882a593Smuzhiyun byte 7: bitmap data (described below) 215*4882a593Smuzhiyun 216*4882a593SmuzhiyunThe last two bytes represent a partial bitmap packet, with 3 full packets 217*4882a593Smuzhiyunrequired to construct a complete bitmap packet. Once assembled, the 6-byte 218*4882a593Smuzhiyunbitmap packet has the following format:: 219*4882a593Smuzhiyun 220*4882a593Smuzhiyun byte 0: 0 1 x7 x6 x5 x4 x3 x2 221*4882a593Smuzhiyun byte 1: 0 x1 x0 y4 y3 y2 y1 y0 222*4882a593Smuzhiyun byte 2: 0 0 ? x14 x13 x12 x11 x10 223*4882a593Smuzhiyun byte 3: 0 x9 x8 y9 y8 y7 y6 y5 224*4882a593Smuzhiyun byte 4: 0 0 0 0 0 0 0 0 225*4882a593Smuzhiyun byte 5: 0 0 0 0 0 0 0 y10 226*4882a593Smuzhiyun 227*4882a593SmuzhiyunThere are several things worth noting here. 228*4882a593Smuzhiyun 229*4882a593Smuzhiyun 1) In the bitmap data, bit 6 of byte 0 serves as a sync byte to 230*4882a593Smuzhiyun identify the first fragment of a bitmap packet. 231*4882a593Smuzhiyun 232*4882a593Smuzhiyun 2) The bitmaps represent the same data as in the v3 bitmap packets, although 233*4882a593Smuzhiyun the packet layout is different. 234*4882a593Smuzhiyun 235*4882a593Smuzhiyun 3) There doesn't seem to be a count of the contact points anywhere in the v4 236*4882a593Smuzhiyun protocol packets. Deriving a count of contact points must be done by 237*4882a593Smuzhiyun analyzing the bitmaps. 238*4882a593Smuzhiyun 239*4882a593Smuzhiyun 4) There is a 3 to 1 ratio of position packets to bitmap packets. Therefore 240*4882a593Smuzhiyun MT position can only be updated for every third ST position update, and 241*4882a593Smuzhiyun the count of contact points can only be updated every third packet as 242*4882a593Smuzhiyun well. 243*4882a593Smuzhiyun 244*4882a593SmuzhiyunSo far no v4 devices with tracksticks have been encountered. 245*4882a593Smuzhiyun 246*4882a593SmuzhiyunALPS Absolute Mode - Protocol Version 5 247*4882a593Smuzhiyun--------------------------------------- 248*4882a593SmuzhiyunThis is basically Protocol Version 3 but with different logic for packet 249*4882a593Smuzhiyundecode. It uses the same alps_process_touchpad_packet_v3 call with a 250*4882a593Smuzhiyunspecialized decode_fields function pointer to correctly interpret the 251*4882a593Smuzhiyunpackets. This appears to only be used by the Dolphin devices. 252*4882a593Smuzhiyun 253*4882a593SmuzhiyunFor single-touch, the 6-byte packet format is:: 254*4882a593Smuzhiyun 255*4882a593Smuzhiyun byte 0: 1 1 0 0 1 0 0 0 256*4882a593Smuzhiyun byte 1: 0 x6 x5 x4 x3 x2 x1 x0 257*4882a593Smuzhiyun byte 2: 0 y6 y5 y4 y3 y2 y1 y0 258*4882a593Smuzhiyun byte 3: 0 M R L 1 m r l 259*4882a593Smuzhiyun byte 4: y10 y9 y8 y7 x10 x9 x8 x7 260*4882a593Smuzhiyun byte 5: 0 z6 z5 z4 z3 z2 z1 z0 261*4882a593Smuzhiyun 262*4882a593SmuzhiyunFor mt, the format is:: 263*4882a593Smuzhiyun 264*4882a593Smuzhiyun byte 0: 1 1 1 n3 1 n2 n1 x24 265*4882a593Smuzhiyun byte 1: 1 y7 y6 y5 y4 y3 y2 y1 266*4882a593Smuzhiyun byte 2: ? x2 x1 y12 y11 y10 y9 y8 267*4882a593Smuzhiyun byte 3: 0 x23 x22 x21 x20 x19 x18 x17 268*4882a593Smuzhiyun byte 4: 0 x9 x8 x7 x6 x5 x4 x3 269*4882a593Smuzhiyun byte 5: 0 x16 x15 x14 x13 x12 x11 x10 270*4882a593Smuzhiyun 271*4882a593SmuzhiyunALPS Absolute Mode - Protocol Version 6 272*4882a593Smuzhiyun--------------------------------------- 273*4882a593Smuzhiyun 274*4882a593SmuzhiyunFor trackstick packet, the format is:: 275*4882a593Smuzhiyun 276*4882a593Smuzhiyun byte 0: 1 1 1 1 1 1 1 1 277*4882a593Smuzhiyun byte 1: 0 X6 X5 X4 X3 X2 X1 X0 278*4882a593Smuzhiyun byte 2: 0 Y6 Y5 Y4 Y3 Y2 Y1 Y0 279*4882a593Smuzhiyun byte 3: ? Y7 X7 ? ? M R L 280*4882a593Smuzhiyun byte 4: Z7 Z6 Z5 Z4 Z3 Z2 Z1 Z0 281*4882a593Smuzhiyun byte 5: 0 1 1 1 1 1 1 1 282*4882a593Smuzhiyun 283*4882a593SmuzhiyunFor touchpad packet, the format is:: 284*4882a593Smuzhiyun 285*4882a593Smuzhiyun byte 0: 1 1 1 1 1 1 1 1 286*4882a593Smuzhiyun byte 1: 0 0 0 0 x3 x2 x1 x0 287*4882a593Smuzhiyun byte 2: 0 0 0 0 y3 y2 y1 y0 288*4882a593Smuzhiyun byte 3: ? x7 x6 x5 x4 ? r l 289*4882a593Smuzhiyun byte 4: ? y7 y6 y5 y4 ? ? ? 290*4882a593Smuzhiyun byte 5: z7 z6 z5 z4 z3 z2 z1 z0 291*4882a593Smuzhiyun 292*4882a593Smuzhiyun(v6 touchpad does not have middle button) 293*4882a593Smuzhiyun 294*4882a593SmuzhiyunALPS Absolute Mode - Protocol Version 7 295*4882a593Smuzhiyun--------------------------------------- 296*4882a593Smuzhiyun 297*4882a593SmuzhiyunFor trackstick packet, the format is:: 298*4882a593Smuzhiyun 299*4882a593Smuzhiyun byte 0: 0 1 0 0 1 0 0 0 300*4882a593Smuzhiyun byte 1: 1 1 * * 1 M R L 301*4882a593Smuzhiyun byte 2: X7 1 X5 X4 X3 X2 X1 X0 302*4882a593Smuzhiyun byte 3: Z6 1 Y6 X6 1 Y2 Y1 Y0 303*4882a593Smuzhiyun byte 4: Y7 0 Y5 Y4 Y3 1 1 0 304*4882a593Smuzhiyun byte 5: T&P 0 Z5 Z4 Z3 Z2 Z1 Z0 305*4882a593Smuzhiyun 306*4882a593SmuzhiyunFor touchpad packet, the format is:: 307*4882a593Smuzhiyun 308*4882a593Smuzhiyun packet-fmt b7 b6 b5 b4 b3 b2 b1 b0 309*4882a593Smuzhiyun byte 0: TWO & MULTI L 1 R M 1 Y0-2 Y0-1 Y0-0 310*4882a593Smuzhiyun byte 0: NEW L 1 X1-5 1 1 Y0-2 Y0-1 Y0-0 311*4882a593Smuzhiyun byte 1: Y0-10 Y0-9 Y0-8 Y0-7 Y0-6 Y0-5 Y0-4 Y0-3 312*4882a593Smuzhiyun byte 2: X0-11 1 X0-10 X0-9 X0-8 X0-7 X0-6 X0-5 313*4882a593Smuzhiyun byte 3: X1-11 1 X0-4 X0-3 1 X0-2 X0-1 X0-0 314*4882a593Smuzhiyun byte 4: TWO X1-10 TWO X1-9 X1-8 X1-7 X1-6 X1-5 X1-4 315*4882a593Smuzhiyun byte 4: MULTI X1-10 TWO X1-9 X1-8 X1-7 X1-6 Y1-5 1 316*4882a593Smuzhiyun byte 4: NEW X1-10 TWO X1-9 X1-8 X1-7 X1-6 0 0 317*4882a593Smuzhiyun byte 5: TWO & NEW Y1-10 0 Y1-9 Y1-8 Y1-7 Y1-6 Y1-5 Y1-4 318*4882a593Smuzhiyun byte 5: MULTI Y1-10 0 Y1-9 Y1-8 Y1-7 Y1-6 F-1 F-0 319*4882a593Smuzhiyun 320*4882a593Smuzhiyun L: Left button 321*4882a593Smuzhiyun R / M: Non-clickpads: Right / Middle button 322*4882a593Smuzhiyun Clickpads: When > 2 fingers are down, and some fingers 323*4882a593Smuzhiyun are in the button area, then the 2 coordinates reported 324*4882a593Smuzhiyun are for fingers outside the button area and these report 325*4882a593Smuzhiyun extra fingers being present in the right / left button 326*4882a593Smuzhiyun area. Note these fingers are not added to the F field! 327*4882a593Smuzhiyun so if a TWO packet is received and R = 1 then there are 328*4882a593Smuzhiyun 3 fingers down, etc. 329*4882a593Smuzhiyun TWO: 1: Two touches present, byte 0/4/5 are in TWO fmt 330*4882a593Smuzhiyun 0: If byte 4 bit 0 is 1, then byte 0/4/5 are in MULTI fmt 331*4882a593Smuzhiyun otherwise byte 0 bit 4 must be set and byte 0/4/5 are 332*4882a593Smuzhiyun in NEW fmt 333*4882a593Smuzhiyun F: Number of fingers - 3, 0 means 3 fingers, 1 means 4 ... 334*4882a593Smuzhiyun 335*4882a593Smuzhiyun 336*4882a593SmuzhiyunALPS Absolute Mode - Protocol Version 8 337*4882a593Smuzhiyun--------------------------------------- 338*4882a593Smuzhiyun 339*4882a593SmuzhiyunSpoken by SS4 (73 03 14) and SS5 (73 03 28) hardware. 340*4882a593Smuzhiyun 341*4882a593SmuzhiyunThe packet type is given by the APD field, bits 4-5 of byte 3. 342*4882a593Smuzhiyun 343*4882a593SmuzhiyunTouchpad packet (APD = 0x2):: 344*4882a593Smuzhiyun 345*4882a593Smuzhiyun b7 b6 b5 b4 b3 b2 b1 b0 346*4882a593Smuzhiyun byte 0: SWM SWR SWL 1 1 0 0 X7 347*4882a593Smuzhiyun byte 1: 0 X6 X5 X4 X3 X2 X1 X0 348*4882a593Smuzhiyun byte 2: 0 Y6 Y5 Y4 Y3 Y2 Y1 Y0 349*4882a593Smuzhiyun byte 3: 0 T&P 1 0 1 0 0 Y7 350*4882a593Smuzhiyun byte 4: 0 Z6 Z5 Z4 Z3 Z2 Z1 Z0 351*4882a593Smuzhiyun byte 5: 0 0 0 0 0 0 0 0 352*4882a593Smuzhiyun 353*4882a593SmuzhiyunSWM, SWR, SWL: Middle, Right, and Left button states 354*4882a593Smuzhiyun 355*4882a593SmuzhiyunTouchpad 1 Finger packet (APD = 0x0):: 356*4882a593Smuzhiyun 357*4882a593Smuzhiyun b7 b6 b5 b4 b3 b2 b1 b0 358*4882a593Smuzhiyun byte 0: SWM SWR SWL 1 1 X2 X1 X0 359*4882a593Smuzhiyun byte 1: X9 X8 X7 1 X6 X5 X4 X3 360*4882a593Smuzhiyun byte 2: 0 X11 X10 LFB Y3 Y2 Y1 Y0 361*4882a593Smuzhiyun byte 3: Y5 Y4 0 0 1 TAPF2 TAPF1 TAPF0 362*4882a593Smuzhiyun byte 4: Zv7 Y11 Y10 1 Y9 Y8 Y7 Y6 363*4882a593Smuzhiyun byte 5: Zv6 Zv5 Zv4 0 Zv3 Zv2 Zv1 Zv0 364*4882a593Smuzhiyun 365*4882a593SmuzhiyunTAPF: ??? 366*4882a593SmuzhiyunLFB: ??? 367*4882a593Smuzhiyun 368*4882a593SmuzhiyunTouchpad 2 Finger packet (APD = 0x1):: 369*4882a593Smuzhiyun 370*4882a593Smuzhiyun b7 b6 b5 b4 b3 b2 b1 b0 371*4882a593Smuzhiyun byte 0: SWM SWR SWL 1 1 AX6 AX5 AX4 372*4882a593Smuzhiyun byte 1: AX11 AX10 AX9 AX8 AX7 AZ1 AY4 AZ0 373*4882a593Smuzhiyun byte 2: AY11 AY10 AY9 CONT AY8 AY7 AY6 AY5 374*4882a593Smuzhiyun byte 3: 0 0 0 1 1 BX6 BX5 BX4 375*4882a593Smuzhiyun byte 4: BX11 BX10 BX9 BX8 BX7 BZ1 BY4 BZ0 376*4882a593Smuzhiyun byte 5: BY11 BY10 BY9 0 BY8 BY7 BY5 BY5 377*4882a593Smuzhiyun 378*4882a593SmuzhiyunCONT: A 3-or-4 Finger packet is to follow 379*4882a593Smuzhiyun 380*4882a593SmuzhiyunTouchpad 3-or-4 Finger packet (APD = 0x3):: 381*4882a593Smuzhiyun 382*4882a593Smuzhiyun b7 b6 b5 b4 b3 b2 b1 b0 383*4882a593Smuzhiyun byte 0: SWM SWR SWL 1 1 AX6 AX5 AX4 384*4882a593Smuzhiyun byte 1: AX11 AX10 AX9 AX8 AX7 AZ1 AY4 AZ0 385*4882a593Smuzhiyun byte 2: AY11 AY10 AY9 OVF AY8 AY7 AY6 AY5 386*4882a593Smuzhiyun byte 3: 0 0 1 1 1 BX6 BX5 BX4 387*4882a593Smuzhiyun byte 4: BX11 BX10 BX9 BX8 BX7 BZ1 BY4 BZ0 388*4882a593Smuzhiyun byte 5: BY11 BY10 BY9 0 BY8 BY7 BY5 BY5 389*4882a593Smuzhiyun 390*4882a593SmuzhiyunOVF: 5th finger detected 391