linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Praznik <frank.praznik@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>, Pavel Machek <pavel@ucw.cz>
Cc: vojtech@suse.cz, mike-@cinci.rr.com, jslaby@suse.cz,
	dave@thedillows.org, colin.leitner@gmail.com,
	kernel list <linux-kernel@vger.kernel.org>,
	linux-input@vger.kernel.org
Subject: Re: Fun with sony motion controllers: navigation controller
Date: Mon, 16 Mar 2015 11:26:32 -0400	[thread overview]
Message-ID: <5506F628.1050901@gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1503161453010.25438@pobox.suse.cz>

On 3/16/2015 09:55, Jiri Kosina wrote:
> On Mon, 16 Mar 2015, Pavel Machek wrote:
>
>> On Mon 2015-03-16 13:55:39, Jiri Kosina wrote:
>>> On Sat, 14 Mar 2015, Pavel Machek wrote:
>>>
>>>> Hi!
>>>>
>>>> After oopsing kernel with ps/3 peripherals, I decided to play some
>>>> more.
>>>>
>>>> First "sony motion controller" (part of ps/3 move without the
>>>> led). Good news is that it no longer oopses. After pressing the PS
>>>> button, it seems to work, but it produces endless stream of events in
>>>> evtest:
>>>>
>>>> Event: time 1426360519.967818, type 3 (EV_ABS), code 0 (ABS_X), value 131
>>>> Event: time 1426360519.967818, type 3 (EV_ABS), code 1 (ABS_Y), value 129
>>>> Event: time 1426360519.967818, type 3 (EV_ABS), code 59 (ABS_MT_DISTANCE), value 513
>>>> Event: time 1426360519.967818, type 3 (EV_ABS), code 60 (ABS_MT_TOOL_X), value 513
>>>>
>>>> Should it really produce multitouch events?
>>> Some sony devices are producing multitouch events. You unfortunately
>>> didn't send us the VID/PID of the device you are playing with.
>> Umm. I thought multitouch events are for touchscreen. This is joystick
>> with accelerometer...?
> Ok, that's USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER, which should get
> SIXAXIS_CONTROLLER_USB. That one shouldn't really be producing multitouch
> events.
>
> Could you please add printk()s to hid-sony.c to see how it's possible that
> it's generating those?
>
> I am sure Frank will comment on this as well.
>

The Dualshock 3 is a special case in that every button except for start, 
select and the PS button are both digital and analog.  As such, the 
controller reports 27 axes that end up spilling over into the ABS_MT 
values.  This mapping comes from the default HID descriptor from the 
device, so it's been this way from day 1.  If the navigation controller 
is basically the same as a DS3 then it will have the same issues.

To note, the DS3 only has 20 actual, physical axes meaning that 7 of the 
reported axes don't even do anything and I'm not sure why they are 
there.  The HID descriptor could be rewritten to map everything in a 
more correct manner, but that would break the mapping that has been 
there for 8 or 9 years at this point and probably break some user-space 
applications in the process.

  reply	other threads:[~2015-03-16 15:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-14 19:19 Fun with sony motion controllers: navigation controller Pavel Machek
2015-03-14 19:23 ` Fun with sony motion controllers: motion controller Pavel Machek
2015-03-14 20:53   ` Pavel Machek
2015-03-14 19:31 ` Fun with sony motion controllers: dualshock Pavel Machek
2015-03-14 19:47 ` Fun with sony motion controllers: navigation controller Pavel Machek
2015-03-14 20:54 ` [PATCH] hid-sony: underscores are unneccessary for u8, u16 Pavel Machek
2015-03-16 12:55 ` Fun with sony motion controllers: navigation controller Jiri Kosina
2015-03-16 13:05   ` Pavel Machek
2015-03-16 13:55     ` Jiri Kosina
2015-03-16 15:26       ` Frank Praznik [this message]
2015-03-16 22:28         ` Pavel Machek
2015-04-09 21:25     ` Turn Sony motion controller into RGB led Pavel Machek
2015-04-09 21:50       ` Jiri Kosina
2015-04-10  0:33       ` Frank Praznik
2015-04-24 12:53         ` Pavel Machek
2015-04-24 13:51         ` Pavel Machek

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=5506F628.1050901@gmail.com \
    --to=frank.praznik@gmail.com \
    --cc=colin.leitner@gmail.com \
    --cc=dave@thedillows.org \
    --cc=jkosina@suse.cz \
    --cc=jslaby@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike-@cinci.rr.com \
    --cc=pavel@ucw.cz \
    --cc=vojtech@suse.cz \
    /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).