Linux Input/HID development
 help / color / mirror / Atom feed
From: Frank Praznik <frank.praznik@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>, Antonio Ospite <ospite@studenti.unina.it>
Cc: Frank Praznik <frank.praznik@oh.rr.com>, linux-input@vger.kernel.org
Subject: Re: [PATCH 4/4] HID: sony: Map gyroscopes and accelerometers to axes
Date: Fri, 17 Jan 2014 12:19:21 -0500	[thread overview]
Message-ID: <52D96619.7000209@gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1401171319500.23018@pobox.suse.cz>

On 1/17/2014 07:21, Jiri Kosina wrote:
> On Fri, 17 Jan 2014, Antonio Ospite wrote:
>
>>> Use a modified HID descriptor for the Dualshock 4 to assign the gyroscope
>>> sensors and accelerometers to axes.
>>>
>> What about putting the descriptor fixup on hold for now?
>> Jiri, have you already pushed these patches?
>>
>> Once the ABS2 stuff from David Hermann is done then proper mapping
>> following the Gamepad API[1] and the Motion-Tracking API[2] could be
>> added.
>>
>> [1] Documentation/input/gamepad.txt
>> [2] Documentation/input/motion-tracking.txt
>>
>> We could even have the DS3 and DS4 expose the same mapping.
>>
>> Just a suggestion.
> Hi,
>
> yes, I have already pushed it, but we can of course discuss not including
> it into pull for Linus if necessary.
>
> My understanding is that once ABS2 stuff is done, this can just be
> switched to using it in a backwards-compatible way, and the report fixup
> could be dropped, no?
>
The default descriptor doesn't map the accelerometers or gyros to 
anything.  It's just a 'user defined' page that causes the HID system to 
skip over the bytes in the report.  My changes to the descriptor map the 
accelerometers to usage 0x40, 0x41 and 0x42 and the gyroscope values to 
0x43, 0x44 and 0x45.  These are the proper HID usage values for 
accelerometers and gyros according to the HID spec and according to the 
updated motion-tracking.txt this is exactly what they need to be mapped 
to to work with the ABS2 changes.  Unless I'm missing something,  these 
descriptor changes should be forward-compatible.

If I recall, the Dualshock 3 maps it's accelerometers and gyros to the 
same set of usage values as well.

  parent reply	other threads:[~2014-01-17 17:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17  2:43 [PATCH 4/4] HID: sony: Map gyroscopes and accelerometers to axes Frank Praznik
2014-01-17 11:11 ` David Herrmann
     [not found]   ` <52D965E2.6010907@gmail.com>
2014-01-17 19:03     ` Jiri Kosina
2014-01-17 11:51 ` Antonio Ospite
2014-01-17 12:21   ` Jiri Kosina
2014-01-17 12:34     ` David Herrmann
2014-01-17 17:19     ` Frank Praznik [this message]
2014-01-17 17:38       ` David Herrmann

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=52D96619.7000209@gmail.com \
    --to=frank.praznik@gmail.com \
    --cc=frank.praznik@oh.rr.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=ospite@studenti.unina.it \
    /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