linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Roderick.Colenbrander@sony.com>
To: <hadess@hadess.net>, <roderick@gaikai.com>, <jikos@kernel.org>,
	<benjamin.tissoires@redhat.com>
Cc: <linux-input@vger.kernel.org>, <lzye@google.com>
Subject: Re: [PATCH 00/13] HID: new driver for PS5 'DualSense' controller
Date: Sat, 19 Dec 2020 22:39:07 +0000	[thread overview]
Message-ID: <BY5PR13MB382659A203291542D7E469EB98C20@BY5PR13MB3826.namprd13.prod.outlook.com> (raw)
In-Reply-To: <780add5d3010039df5a8f639ca47816b39af7304.camel@hadess.net>

Hey Bastian,

> From: Bastien Nocera <hadess@hadess.net>
> Sent: Saturday, December 19, 2020 12:38 AM
> To: roderick@gaikai.com <roderick@gaikai.com>; Jiri Kosina <jikos@kernel.org>; Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Cc: linux-input@vger.kernel.org <linux-input@vger.kernel.org>; Chris Ye <lzye@google.com>; Colenbrander, Roderick <Roderick.Colenbrander@sony.com>
> Subject: Re: [PATCH 00/13] HID: new driver for PS5 'DualSense' controller 
>  
> Hey Roderick,
> 
> On Fri, 2020-12-18 at 22:23 -0800, Roderick Colenbrander wrote:
> > From: Roderick Colenbrander <roderick.colenbrander@sony.com>
> > 
> > Hi,
> > 
> > I am pleased to share a new Linux driver for the PlayStation 5
> > 'DualSense'
> > game controller. The driver supports the DualSense in both Bluetooth
> > and USB modes. Most controller features are supported including LEDs,
> > Touchpad, Motion Sensors and Rumble.

> Excellent, this is a nice early holiday present :)
> I've just received a DualSense controller so I'll try to test this in
> the coming days.

> > DualSense supported is implemented in a new 'hid-playstation' driver,

> "hid-sony-playstation"? Not sure how much the input/hid tree
> maintainers will want to force this, but the same problem is going to
> show up for the hid-based XBox controller driver (hid-xbox, or hid-
> microsoft-xbox?) as hid-microsoft is as busy as hid-sony.

I had some offline conversation prior with Jiri and Benjamin. I wanted to avoid keeping PlayStation devices in hid-sony as Sony is a large group of companies and as 'PlayStation' we don't have any authority over those devices. When discussing we felt that hid-playstation was the best name. Technically the PlayStation company is "Sony Interactive Entertainment", but a a "hid-sie" wouldn't see any name recognition.

Other crowded drivers at some point could use a split as well as having too many devices in there can be a problem. Not just for maintenance, but also for device integration (e.g. phones, TVs,..), though not a main worry for the open kernel. Just for context in such embedded devices you may only want to pull in the 'game controller' driver and not the full weight of a hid-microsoft or a hid-sony. In case of hid-sony for example there is support for TV remotes as well, which cause collisions with whatever proprietary user/kernel mode TV remote support the device already used.

> > which
> > will be used for peripherals by 'Sony Interactive Entertainment'
> > (PlayStation).
> > Hid-sony will be used for devices for the larger Sony Group. We
> > intend to
> > migrate existing devices over time gradually to hid-playstation. We
> > do not
> > want to cause any regressions and maintain quality. As such moving
> > forward,
> > unit tests are important and we started by providing these through
> > 'hid-tools'
> including DualSense.

> I know it's not your job to handle those, but be careful with not
> breaking the clone controllers. Plenty of folks use them, for better or
> for worse.

Support for DualShock 4 is easy to migrate, but I'm really, really nervous about the DualShock 3 generation with many buggy clones. Some of it is due to broken HID reports (even though the practical reports must use the same byte layout as the DualShock 3). Not using the HID parser and parsing raw reports directly may mitigate some of that (the HID report is fully with vendor specific stuff anyway). But yeah it is a pain and I don't know if I want to dare trying DualShock 3... but will see where that goes. Normally it is tricky for us to support clone devices, but if this migration happened we would have to pay attention to it and perhaps get these devices on Ebay.

> > 
> > The Linux driver exposes DualSense functionality as a 'compositive
> > device'
> > similar to DualShock 4 in hid-sony, spanning multiple frameworks.
> > First,
> > it exposes 3 evdev nodes for respectively the 'gamepad', 'touchpad'
> > and
> > 'motion sensors'. The FF framework is used to provide basic rumble
> > features.
> > The leds-class is used to implement the Player indicator LEDs below
> > the
> > DualSense's touchpad, while the new 'leds-class-multicolor' is used
> > for
> > the lightbars next to the touchpad.
> > 
> > Not yet supported are new unique features introduced by the DualSense
> > such as Adaptive Triggers and the VCM based Haptics. These features
> > require
> > a large amount of data and complex data structures. It is not clear
> > how to
> > expose these. The current Evdev and FF frameworks are too limiting.
> > We hope
> > to have a dialog on how to expose these over time in a generic way.
> > 
> > Enjoy the new DualSense driver and let us know if you have any
> > questions
> > or feedback.

> Is the audio jack on the controller already supported, or would that be
> part of the features that aren't supported yet?

The answer is yes and no. In case of USB, there is some level of audio support, though I am not yet sure if I like it.

Basically the VCM haptics, microphone and speaker appears as a USB audio device. It means they kind of work. Though some of the audio control features are HID managed, so they are not there (I haven't seen what audio controls are native exposed through USB). I don't know if the headphone jack currently works or if that needs some MUXing logic through HID.

Bluetooth is not supported at all. It is some custom protocol over HID of which I don't know the details.

Provided we can contribute such support in the future, it is beyond complicated. Just in the 'simple' USB audio case, some interop might be needed with the USB audio drivers for e.g. audio controls. Also the new VCM haptics seem to be reported as audio channels on this device as well. Should haptics really be audio? Or some new interface (a hypothetical EV_FF2)?

> Do you think you might be able to share the information regarding how
> the cable pairing is done, so we can add this support to bluez? I'm
> fine with only sharing the implementation if you prefer to give me the
> details privately (or through my employer).

> Cheers

Thanks,
Roderick

      reply	other threads:[~2020-12-20  0:47 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19  6:23 [PATCH 00/13] HID: new driver for PS5 'DualSense' controller Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 01/13] HID: playstation: initial DualSense USB support Roderick Colenbrander
2020-12-27 16:23   ` Barnabás Pőcze
2020-12-27 23:04     ` Roderick Colenbrander
2020-12-29 19:12       ` Barnabás Pőcze
2020-12-31  0:08   ` Barnabás Pőcze
2020-12-31  1:08     ` Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 02/13] HID: playstation: use DualSense MAC address as unique identifier Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 03/13] HID: playstation: add DualSense battery support Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 04/13] HID: playstation: add DualSense touchpad support Roderick Colenbrander
2020-12-26  2:14   ` Samuel Čavoj
2020-12-26 22:27     ` Roderick Colenbrander
2020-12-29 19:49   ` Barnabás Pőcze
2020-12-29 21:44     ` Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 05/13] HID: playstation: add DualSense accelerometer and gyroscope support Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 06/13] HID: playstation: track devices in list Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 07/13] HID: playstation: add DualSense Bluetooth support Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 08/13] HID: playstation: add DualSense classic rumble support Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 09/13] HID: playstation: add DualSense lightbar support Roderick Colenbrander
2020-12-27 14:41   ` Barnabás Pőcze
2020-12-28 21:26     ` Roderick Colenbrander
2020-12-29 18:59       ` Barnabás Pőcze
2020-12-29 19:54         ` Roderick Colenbrander
2020-12-29 20:22           ` Barnabás Pőcze
2020-12-19  6:23 ` [PATCH 10/13] HID: playstation: add microphone mute support for DualSense Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 11/13] HID: playstation: add DualSense player LEDs support Roderick Colenbrander
2020-12-26 19:27   ` Samuel Čavoj
2020-12-26 23:07     ` Roderick Colenbrander
2020-12-27 14:27   ` Barnabás Pőcze
2020-12-28 22:02     ` Roderick Colenbrander
2020-12-29 18:49       ` Barnabás Pőcze
2020-12-19  6:23 ` [PATCH 12/13] HID: playstation: DualSense set LEDs to default player id Roderick Colenbrander
2020-12-27  0:08   ` Samuel Čavoj
2020-12-27 23:07     ` Roderick Colenbrander
2020-12-19  6:23 ` [PATCH 13/13] HID: playstation: report DualSense hardware and firmware version Roderick Colenbrander
2020-12-27 17:06   ` Barnabás Pőcze
2020-12-27 22:21     ` Roderick Colenbrander
2020-12-27 22:27       ` Roderick Colenbrander
2020-12-27 22:37         ` Barnabás Pőcze
2020-12-28 22:45           ` Roderick Colenbrander
2020-12-29 15:10             ` Barnabás Pőcze
2020-12-19  8:38 ` [PATCH 00/13] HID: new driver for PS5 'DualSense' controller Bastien Nocera
2020-12-19 22:39   ` Roderick.Colenbrander [this message]

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=BY5PR13MB382659A203291542D7E469EB98C20@BY5PR13MB3826.namprd13.prod.outlook.com \
    --to=roderick.colenbrander@sony.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=hadess@hadess.net \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=lzye@google.com \
    --cc=roderick@gaikai.com \
    /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).