summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-a4tech.c
diff options
context:
space:
mode:
authorRafi Rubin <rafi@seas.upenn.edu>2010-05-04 14:20:15 -0400
committerJiri Kosina <jkosina@suse.cz>2010-05-11 10:45:22 +0200
commit369db2a6008e8fc3cf5006fa8aab71bd58adfc1f (patch)
treed2ce4d9b692e7b313fc6f2a35bf62011141c98da /drivers/hid/hid-a4tech.c
parent94b849aaf6e22ab7bf54b0d0377a882d4892396d (diff)
downloadlinux-369db2a6008e8fc3cf5006fa8aab71bd58adfc1f.tar.gz
HID: ntrig: add sensitivity and responsiveness support
The old rejection size thresholds were too high for the 12" devices. Larger surfaces like the Dell Studio17 exacerbated the problem since contact size is reported on the same logical scale, making a contact look smaller to the larger screen. Since we have observed erroneous ghost events from these devices we still need to filter the incoming stream. The prior size threshold filter is still in place, though with defaults set to leave it off. This patch adds the two new classes of filters, those that reject live frames before activation, and those that reject empty frames until deactivation. These filters are expressed in terms of a simple state machine for clarity (I hope). The activation filter has two components, slack and size, events are discarded until either is satisfied. Slack is defined as the number of seemingly good contacts to read before accepting the stream as valid (if the threshold is reached in the middle of a frame the remainder of that frame is still discarded). The deactivation filter discards empty frames until hitting a deactivate slack. This time measured in frames. N-Trig devices emit 5-8 (observed so far) empty frames at the end of multitouch activity. Ignoring the first few enables us to safely and gracefully handle erroneous empty frames, thus preventing a change in the tool state which would otherwise result in things like broken lines or dragged objects being dropped in bad places. Also, now that devices with different logical densities have been observed, the aforementioned sizes are scaled from physical to logical scales once those scales are identified. Hopefully this should mean that a given threshold value means the same thing across differing devices. Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-a4tech.c')
0 files changed, 0 insertions, 0 deletions