linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Siarhei Vishniakou <svv@google.com>
To: Bastien Nocera <hadess@hadess.net>
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Android Framework Input <android-framework-input@google.com>
Subject: Re: [PATCH] Add rumble support to latest xbox controllers
Date: Thu, 20 Oct 2022 13:48:27 -0700	[thread overview]
Message-ID: <CAKF84v2Ohcy2MH=0tjiMr6oHWtZd9r3mGF6Ve5MinkivSaudpA@mail.gmail.com> (raw)
In-Reply-To: <d2085225eb652a885b9c2b5700175ab820a35a35.camel@hadess.net>

Hi Bastien,

I prefer to keep the various names in the commit message, just so that
it's easier to find the commit later when searching for the patch.
I found that various teams refer to various controllers in a different way.
Happy to rename the variables in the code, though.

How about something like:
USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708
USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708_FIRMWARE_2021
USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1914
?

I tested this on an Android device, with a simple rumble test app that I wrote.
A better way would probably be to write some EV_FF events to
/dev/input/eventX node.
You could try the "python-evdev" module, which provides a sample rumble script:
https://python-evdev.readthedocs.io/en/latest/tutorial.html#injecting-an-ff-event-into-first-ff-capable-device-found
I haven't tried that since there's no python on Android.

Here's the list of controllers where this could also work:

Controller VID PID Classic/BLE
Xbox One S 0x045E 0x02E0 Classic
Xbox One S 0x045E 0x02FD Classic
Xbox One S 0x045E 0x0B20 BLE
Xbox Elite Series 2 0x045E 0x0B05 Classic
Xbox Elite Series 2 0x045E 0x0B22 BLE
Xbox Series S|X 0x045E 0x0B13 BLE


On Thu, Oct 20, 2022 at 10:33 AM Bastien Nocera <hadess@hadess.net> wrote:
>
> On Thu, 2022-10-20 at 09:14 -0700, Siarhei Vishniakou wrote:
> > Currently, rumble is only supported via bluetooth on a single xbox
> > controller, called 'model 1708'. On the back of the device, it's
> > named
> > 'wireless controller for xbox one'. However, in 2021, Microsoft
> > released
> > a firmware update for this controller. As part of this update, the
> > HID
> > descriptor of the device changed. The product ID was also changed
> > from
> > 0x02fd to 0x0b20. On this controller, rumble was supported via
> > hid-microsoft, which matched against the old product id (0x02fd). As
> > a
> > result, the firmware update broke rumble support on this controller.
> >
> > The hid-microsoft driver actually supports rumble on the new
> > firmware,
> > as well. So simply adding new product id is sufficient to bring back
> > this support.
> >
> > After discussing further with the xbox team, it was pointed out that
> > other xbox controllers, such as xbox elite, should also be possible
> > to
> > support in a similar way. However, I could only verify this on 2
> > controllers so far.
> >
> > In this patch, add rumble support for the following 2 controllers:
> > 1. 'wireless controller for xbox one', model 1708, after applying the
> >    most recent firmware update as of 2022-10-20.
> > 2. 'xbox wireless controller', model 1914. This is also sometimes
> >    referred to as 'xbox series S|X'.
>
> This is a good summary of the different models:
> https://en.wikipedia.org/wiki/Xbox_Wireless_Controller#Summary
>
> You can remove the mention of the other names it might have, or the
> names at the back of the joypad, and use the model numbers instead.
>
> I think I have a model of each one of the devices in the list (except
> 1797 and 1537 IIRC), so I could test this if needed. Do you have a good
> test case for the various forces of rumble that would exercise both
> motors?

  reply	other threads:[~2022-10-20 20:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 16:14 [PATCH] Add rumble support to latest xbox controllers Siarhei Vishniakou
2022-10-20 17:33 ` Bastien Nocera
2022-10-20 20:48   ` Siarhei Vishniakou [this message]
2023-02-15 20:46 Edward Matijevic

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='CAKF84v2Ohcy2MH=0tjiMr6oHWtZd9r3mGF6Ve5MinkivSaudpA@mail.gmail.com' \
    --to=svv@google.com \
    --cc=android-framework-input@google.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=hadess@hadess.net \
    --cc=jikos@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).