From: "Henrik Rydberg" <rydberg@euromail.se>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jiri Kosina <jkosina@suse.cz>, Stephane Chatty <chatty@enac.fr>,
linux-input <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 08/11] HID: hid-multitouch: fix Win 8 protocol
Date: Sun, 4 Nov 2012 21:54:59 +0100 [thread overview]
Message-ID: <20121104205459.GA777@polaris.bitmath.org> (raw)
In-Reply-To: <CAN+gG=E1DOPrxw4PDNVRDf-cPd7qaq5Sbgo2WC5cApTNn8t9Yg@mail.gmail.com>
Hi Benjamin,
> The goal of this patch is to implement in a reliable way Win 8
> multitouch protocol (to avoid quirking many devices). Thanks to the
> precision they made in the specification, I think it is feasible:
> they add the dynamic part that were missing in Win 7 spec:
> """
> When sending data in hybrid or parallel mode, a contact that is
> delivered in one report must be delivered in all subsequent reports
> until it is lifted off the screen. If time is needed to adequate
> determine if the contact was lifted off the surface, the device must
> report the last known position of the contact and then deliver the
> “UP” state of the contact in a subsequent report. Devices should not
> send a report without the information for that contact while trying to
> determine its current state.
> """
The text seems to say that devices are not required to send touch
state information in a separate frame, but if the device needs time to
determine the touch state, the touch properties should stay the same
during that time.
> Thus, the quirk ALWAYS_VALID fits very well with win 8 devices (the
> device has to send the touch until it is lifted and out of range, and
> the device must send the 'up' state).
One could simply add another quirk which fits the win8 case exactly
instead. No need to change the existing one.
> The problem lies that some devices may reuse contact id 0 within the
> frame for the end of the report (my Win8 device doesn't has this kind
> of problem):
>
> With the following hid usages:
> I -> contact Id
> T -> tip switch
> X, Y -> X, Y
> S -> scan time
> C -> contact count
>
> a friendly device would report:
>
> I:1 T:1 X:125 X:130 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:0 C:01
> I:1 T:1 X:130 X:135 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:1 C:01
> I:1 T:1 X:135 X:140 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:2 C:01
> I:1 T:1 X:140 X:145 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:3 C:01
> I:1 T:0 X:140 X:145 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:4 C:01
>
> *but*, I've already seen win 7 devices, that do send:
>
> I:0 T:1 X:125 X:130 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:0 C:01
> I:0 T:1 X:130 X:135 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:1 C:01
> I:0 T:1 X:135 X:140 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:2 C:01
> I:0 T:1 X:140 X:145 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:3 C:01
> I:0 T:0 X:140 X:145 Y:750 Y:755 I:0 T:0 X:0 X:0 Y:0 Y:0 S:4 C:01
I see, more brain-damaged usage. :-) Still, there seems to be a
simpler way to distinguish this case: if there are more than one touch
with the same id in the frame, use the one with T=1.
> The difference lies in the first bit, contact id is 0.
>
> So, the quirk always valid is not sufficient because the second touch
> in the frame will override the values of the first (the valid one).
>
> As Microsoft says that "the device must report the last known position
> of the contact and then deliver the “UP” state of the contact", so we
> can safely discard the second touch because X and Y do not match the
> current state of the valid touch.
>
> Then, as exposed in the "How to Design and Test Multitouch Hardware
> Solutions for Windows 8" document here:
> http://msdn.microsoft.com/en-us/library/windows/hardware/hh872968.aspx
> when the device attempt the certification, if the "up" is not valid,
> the error "Last move location different" raises, which, I hope will
> prevent the device to get the certification.
I think it would be too fragile to rely on this assumption. Hopefully
the suggestion above will work equally well.
Thanks,
Henrik
next prev parent reply other threads:[~2012-11-04 20:49 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-26 8:44 [PATCH v2 00/11] Win 8 support for digitizers Benjamin Tissoires
2012-10-26 8:44 ` [PATCH v2 01/11] HID: hid-input: export hidinput_calc_abs_res Benjamin Tissoires
2012-10-29 18:57 ` Henrik Rydberg
2012-10-30 10:04 ` Benjamin Tissoires
2012-10-26 8:44 ` [PATCH v2 02/11] HID: core: fix unit exponent parsing Benjamin Tissoires
2012-10-29 19:05 ` Henrik Rydberg
2012-10-30 10:07 ` Benjamin Tissoires
2012-10-26 8:44 ` [PATCH v2 03/11] HID: hid-input: add usage_index argument in input_mapping and event Benjamin Tissoires
2012-10-29 19:25 ` Henrik Rydberg
2012-10-30 10:09 ` Benjamin Tissoires
2012-11-06 13:56 ` Benjamin Tissoires
2012-11-06 15:24 ` Jiri Kosina
2012-10-26 8:44 ` [PATCH v2 04/11] HID: hid-multitouch: support arrays for the split of the touches in a report Benjamin Tissoires
2012-10-29 21:49 ` Henrik Rydberg
2012-10-30 10:11 ` Benjamin Tissoires
2012-10-26 8:44 ` [PATCH v2 05/11] HID: hid-multitouch: get maxcontacts also from logical_max value Benjamin Tissoires
2012-10-29 21:52 ` Henrik Rydberg
2012-10-26 8:44 ` [PATCH v2 06/11] HID: hid-multitouch: support T and C for win8 devices Benjamin Tissoires
2012-10-29 22:00 ` Henrik Rydberg
2012-10-30 10:16 ` Benjamin Tissoires
2012-10-31 18:47 ` Henrik Rydberg
2012-10-26 8:44 ` [PATCH v2 07/11] HID: hid-multitouch: move ALWAYS_VALID quirk check Benjamin Tissoires
2012-10-29 22:16 ` Henrik Rydberg
2012-10-30 10:19 ` Benjamin Tissoires
2012-10-26 8:44 ` [PATCH v2 08/11] HID: hid-multitouch: fix Win 8 protocol Benjamin Tissoires
2012-10-29 22:19 ` Henrik Rydberg
2012-10-30 10:24 ` Benjamin Tissoires
2012-10-31 18:53 ` Henrik Rydberg
2012-11-02 14:18 ` Benjamin Tissoires
2012-11-04 20:54 ` Henrik Rydberg [this message]
2012-11-05 9:51 ` Benjamin Tissoires
2012-10-26 8:44 ` [PATCH v2 09/11] HID: hid-multitouch: support for hovering devices Benjamin Tissoires
2012-10-29 22:31 ` Henrik Rydberg
2012-10-30 10:43 ` Benjamin Tissoires
2012-10-26 8:44 ` [PATCH v2 10/11] HID: introduce Scan Time Benjamin Tissoires
2012-10-29 22:43 ` Henrik Rydberg
2012-10-30 10:54 ` Benjamin Tissoires
2012-10-31 19:16 ` Henrik Rydberg
2012-11-02 14:23 ` Benjamin Tissoires
2012-10-26 8:44 ` [PATCH v2 11/11] HID: hid-multitouch: get rid of usbhid depedency for general path Benjamin Tissoires
2012-10-29 22:57 ` Henrik Rydberg
2012-10-30 11:04 ` Benjamin Tissoires
2012-10-31 19:18 ` Henrik Rydberg
2012-11-05 12:57 ` Henrik Rydberg
2012-11-05 13:28 ` Benjamin Tissoires
2012-11-05 13:32 ` Benjamin Tissoires
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121104205459.GA777@polaris.bitmath.org \
--to=rydberg@euromail.se \
--cc=benjamin.tissoires@gmail.com \
--cc=chatty@enac.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome