Linux Input/HID development
 help / color / mirror / Atom feed
* hid-multitouch: change for touch height/width
@ 2017-01-24 21:47 Jonathan Clarke
  2017-01-25 10:39 ` Benjamin Tissoires
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Clarke @ 2017-01-24 21:47 UTC (permalink / raw)
  To: linux-input; +Cc: Stéphane Chatty, Jiri Kosina, benjamin.tissoires

Hi all,

I'd like to get your opinion on a proposal for a small change to the
hid-multitouch driver.  As you probably know this driver supports
multi touch input for various touchscreen/touchpad devices.

The change relates to lines 654 & 655 of "hid-multitouch.c" - I would
like to remove the "division by 2" applied to the "touch width" and
"touch height" values received from the input device.  These values
represent the width and height of the area occupied by a finger
touching the input device.

https://github.com/torvalds/linux/blame/master/drivers/
hid/hid-multitouch.c#L654

This division by 2 was added along with the the touch width/height
fields 6 years ago so that those fields "match the visual scale of the
touch" for a specific device (3M PCT) - see comment & associated
commit log for line 653.

I don't think that this scaling is appropriate for all the other devices
that this driver now supports.  On my screen for example (Elan
multitouch screen), the touch width and height reported bear no
relation to the "visual scale of the touch" with or without this /2
scaling applied.  I suspect that the scale of touch width/height
values reported are different for every device (though I've not
checked any other device).

The scaling is also discarding information about touch size (1 bit for
each of width/height) which is useful for any application that wants
to know about it.

So in summary I think the main questions for you are:
1. would making this change have a negative effect on any existing
applications that use this information?
2. does it seem sensible to (continue to) provide touch width/height
values that bear no relation to screen/pixel dimensions?

I delved into this because I wanted to get as much precision on touch
width/height as possible and was surprised at the low resolution of
sizes output by my touchscreen.  I got an extra 2 bits of precision
from my search!

Cheers & thanks for reading.  Jonathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-25 12:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-24 21:47 hid-multitouch: change for touch height/width Jonathan Clarke
2017-01-25 10:39 ` Benjamin Tissoires
2017-01-25 12:17   ` Jonathan Clarke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox