• Daniel Kurtz's avatar
    Input: synaptics - decode AGM packet types · a6ca40c1
    Daniel Kurtz authored
    A Synaptics image sensor tracks 5 fingers, but can only report 2.
    
    The algorithm for choosing which 2 fingers to report and in which packet:
      Touchpad maintains 5 slots, numbered 0 to 4
      Initially all slots are empty
      As new fingers are detected, assign them to the lowest available slots
      The touchpad always reports:
        SGM: lowest numbered non-empty slot
        AGM: highest numbered non-empty slot, if there is one
    
    In addition, these touchpads have a special AGM packet type which reports
    the number of fingers currently being tracked, and which finger is in
    each of the two slots.  Unfortunately, these "TYPE=2" packets are only used
    when more than 3 fingers are being tracked.  When less than 4 fingers
    are present, the 'w' value must be used to track how many fingers are
    present, and knowing which fingers are being reported is much more
    difficult, if not impossible.
    Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
    Acked-by: default avatarChase Douglas <chase.douglas@canonical.com>
    Acked-by: default avatarHenrik Rydberg <rydberg@euromail.se>
    Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
    a6ca40c1
synaptics.c 30.4 KB