From: Frank Praznik <frank.praznik@gmail.com>
To: simon@mungewell.org, Frank Praznik <frank.praznik@oh.rr.com>
Cc: linux-input@vger.kernel.org, jkosina@suse.cz
Subject: Re: [PATCH v2 2/2] HID: sony: Add output events for the multi-touch pad on the Dualshock 4.
Date: Mon, 27 Jan 2014 16:28:06 -0500 [thread overview]
Message-ID: <52E6CF66.7090102@gmail.com> (raw)
In-Reply-To: <ddf2398947f6323430699b45bc509091.squirrel@mungewell.org>
On 1/27/2014 12:47, simon@mungewell.org wrote:
>> +
>> + /* The Dualshock 4 multi-touch trackpad data starts at offset 35 on USB.
>> + * The first 7 bits of the first byte is a counter and bit 8 is a touch
>> + * indicator that is 0 when pressed and 1 when not pressed.
>> + * The next 3 bytes are two 12 bit touch coordinates, X and Y.
>> + * The data for the second touch is in the same format and immediatly
>> + * follows the data for the first.
>> + */
> Hi Frank,
> I don't know if it helps multitouch, but there is a second set of data in
> the HID stream, that is present when a figure is moving/swiping on the
> touchpad. This gives us a 'vector' rather than a 'point'.
>
> I previously attempted to describe the format here:
> http://www.spinics.net/lists/linux-input/msg28525.html
>
> Ahead of the 'event counter' is a 'point or vector' byte and what might be
> a 'pressure' measurement (couldn't really tell).
>
> Interspersed with the data you mention is a second set of X1/Y1/X2/Y2
> containing the starting position of the swipe/vector. These are
> differentiated with '02' (rather than '01') in the 34'th byte.
>
> Simon.
>
All the device driver is concerned with is the sending the 'raw' touch
points to the HID layer (ie. point 1/2 is up/down at position X and Y).
The HID layer then tracks the IDs for each contact point and sends the
appropriate events to the user application. It's then up to the
application software to track and interpret it.
See this document for information on the multi-touch protocol:
https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt
next prev parent reply other threads:[~2014-01-27 21:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 15:17 [PATCH v2 1/2] HID: sony: Add battery status reporting for the Sixaxis and Dualshock 4 controllers Frank Praznik
2014-01-27 15:17 ` [PATCH v2 2/2] HID: sony: Add output events for the multi-touch pad on the Dualshock 4 Frank Praznik
2014-01-27 17:47 ` simon
2014-01-27 21:28 ` Frank Praznik [this message]
2014-01-27 20:40 ` simon
2014-01-27 21:02 ` Frank Praznik
2014-01-28 19:39 ` [PATCH v2 1/2] HID: sony: Add battery status reporting for the Sixaxis and Dualshock 4 controllers Jiri Kosina
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=52E6CF66.7090102@gmail.com \
--to=frank.praznik@gmail.com \
--cc=frank.praznik@oh.rr.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=simon@mungewell.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;
as well as URLs for NNTP newsgroup(s).