|
Takashi Iwai |
a92cf6 |
From: Siarhei Vishniakou <svv@google.com>
|
|
Takashi Iwai |
a92cf6 |
Date: Tue, 25 Apr 2023 09:38:44 -0700
|
|
Takashi Iwai |
a92cf6 |
Subject: [PATCH] HID: microsoft: Add rumble support to latest xbox controllers
|
|
Takashi Iwai |
a92cf6 |
Message-ID: <20230425163844.3711710-1-svv@google.com>
|
|
Takashi Iwai |
a92cf6 |
Patch-mainline: Submitted, linux-hid ML
|
|
Takashi Iwai |
a92cf6 |
References: bsc#1211280
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
Currently, rumble is only supported via bluetooth on a single xbox
|
|
Takashi Iwai |
a92cf6 |
controller, called 'model 1708'. On the back of the device, it's named
|
|
Takashi Iwai |
a92cf6 |
'wireless controller for xbox one'. However, in 2021, Microsoft released
|
|
Takashi Iwai |
a92cf6 |
a firmware update for this controller. As part of this update, the HID
|
|
Takashi Iwai |
a92cf6 |
descriptor of the device changed. The product ID was also changed from
|
|
Takashi Iwai |
a92cf6 |
0x02fd to 0x0b20. On this controller, rumble was supported via
|
|
Takashi Iwai |
a92cf6 |
hid-microsoft, which matched against the old product id (0x02fd). As a
|
|
Takashi Iwai |
a92cf6 |
result, the firmware update broke rumble support on this controller.
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
See:
|
|
Takashi Iwai |
a92cf6 |
https://news.xbox.com/en-us/2021/09/08/xbox-controller-firmware-update-rolling-out-to-insiders-starting-today/
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
The hid-microsoft driver actually supports rumble on the new firmware,
|
|
Takashi Iwai |
a92cf6 |
as well. So simply adding new product id is sufficient to bring back
|
|
Takashi Iwai |
a92cf6 |
this support.
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
After discussing further with the xbox team, it was pointed out that
|
|
Takashi Iwai |
a92cf6 |
another xbox controller, xbox elite series 2, can be supported in a
|
|
Takashi Iwai |
a92cf6 |
similar way.
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
Add rumble support for all of these devices in this patch. Two of the
|
|
Takashi Iwai |
a92cf6 |
devices have received firmware updates that caused their product id's to
|
|
Takashi Iwai |
a92cf6 |
change. Both old and new firmware versions of these devices were tested.
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
The tested controllers are:
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
1. 'wireless controller for xbox one', model 1708
|
|
Takashi Iwai |
a92cf6 |
2. 'xbox wireless controller', model 1914. This is also sometimes
|
|
Takashi Iwai |
a92cf6 |
referred to as 'xbox series S|X'.
|
|
Takashi Iwai |
a92cf6 |
3. 'elite series 2', model 1797.
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
The tested configurations are:
|
|
Takashi Iwai |
a92cf6 |
1. model 1708, pid 0x02fd (old firmware)
|
|
Takashi Iwai |
a92cf6 |
2. model 1708, pid 0x0b20 (new firmware)
|
|
Takashi Iwai |
a92cf6 |
3. model 1914, pid 0x0b13
|
|
Takashi Iwai |
a92cf6 |
4. model 1797, pid 0x0b05 (old firmware)
|
|
Takashi Iwai |
a92cf6 |
5. model 1797, pid 0x0b22 (new firmware)
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
I verified rumble support on both bluetooth and usb.
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
Reviewed-by: Bastien Nocera <hadess@hadess.net>
|
|
Takashi Iwai |
a92cf6 |
Signed-off-by: Siarhei Vishniakou <svv@google.com>
|
|
Takashi Iwai |
a92cf6 |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
---
|
|
Takashi Iwai |
a92cf6 |
drivers/hid/hid-ids.h | 10 +++++++++-
|
|
Takashi Iwai |
a92cf6 |
drivers/hid/hid-microsoft.c | 11 ++++++++++-
|
|
Takashi Iwai |
a92cf6 |
2 files changed, 19 insertions(+), 2 deletions(-)
|
|
Takashi Iwai |
a92cf6 |
|
|
Takashi Iwai |
a92cf6 |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
|
Takashi Iwai |
a92cf6 |
index d79e946acdcb..4ce6e78a5665 100644
|
|
Takashi Iwai |
a92cf6 |
--- a/drivers/hid/hid-ids.h
|
|
Takashi Iwai |
a92cf6 |
+++ b/drivers/hid/hid-ids.h
|
|
Takashi Iwai |
a92cf6 |
@@ -933,7 +933,15 @@
|
|
Takashi Iwai |
a92cf6 |
#define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9
|
|
Takashi Iwai |
a92cf6 |
#define USB_DEVICE_ID_MS_POWER_COVER 0x07da
|
|
Takashi Iwai |
a92cf6 |
#define USB_DEVICE_ID_MS_SURFACE3_COVER 0x07de
|
|
Takashi Iwai |
a92cf6 |
-#define USB_DEVICE_ID_MS_XBOX_ONE_S_CONTROLLER 0x02fd
|
|
Takashi Iwai |
a92cf6 |
+/*
|
|
Takashi Iwai |
a92cf6 |
+ * For a description of the Xbox controller models, refer to:
|
|
Takashi Iwai |
a92cf6 |
+ * https://en.wikipedia.org/wiki/Xbox_Wireless_Controller#Summary
|
|
Takashi Iwai |
a92cf6 |
+ */
|
|
Takashi Iwai |
a92cf6 |
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708 0x02fd
|
|
Takashi Iwai |
a92cf6 |
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708_BLE 0x0b20
|
|
Takashi Iwai |
a92cf6 |
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1914 0x0b13
|
|
Takashi Iwai |
a92cf6 |
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797 0x0b05
|
|
Takashi Iwai |
a92cf6 |
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797_BLE 0x0b22
|
|
Takashi Iwai |
a92cf6 |
#define USB_DEVICE_ID_MS_PIXART_MOUSE 0x00cb
|
|
Takashi Iwai |
a92cf6 |
#define USB_DEVICE_ID_8BITDO_SN30_PRO_PLUS 0x02e0
|
|
Takashi Iwai |
a92cf6 |
#define USB_DEVICE_ID_MS_MOUSE_0783 0x0783
|
|
Takashi Iwai |
a92cf6 |
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
|
|
Takashi Iwai |
a92cf6 |
index 071fd093a5f4..9345e2bfd56e 100644
|
|
Takashi Iwai |
a92cf6 |
--- a/drivers/hid/hid-microsoft.c
|
|
Takashi Iwai |
a92cf6 |
+++ b/drivers/hid/hid-microsoft.c
|
|
Takashi Iwai |
a92cf6 |
@@ -446,7 +446,16 @@ static const struct hid_device_id ms_devices[] = {
|
|
Takashi Iwai |
a92cf6 |
.driver_data = MS_PRESENTER },
|
|
Takashi Iwai |
a92cf6 |
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x091B),
|
|
Takashi Iwai |
a92cf6 |
.driver_data = MS_SURFACE_DIAL },
|
|
Takashi Iwai |
a92cf6 |
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_ONE_S_CONTROLLER),
|
|
Takashi Iwai |
a92cf6 |
+
|
|
Takashi Iwai |
a92cf6 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708),
|
|
Takashi Iwai |
a92cf6 |
+ .driver_data = MS_QUIRK_FF },
|
|
Takashi Iwai |
a92cf6 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708_BLE),
|
|
Takashi Iwai |
a92cf6 |
+ .driver_data = MS_QUIRK_FF },
|
|
Takashi Iwai |
a92cf6 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1914),
|
|
Takashi Iwai |
a92cf6 |
+ .driver_data = MS_QUIRK_FF },
|
|
Takashi Iwai |
a92cf6 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797),
|
|
Takashi Iwai |
a92cf6 |
+ .driver_data = MS_QUIRK_FF },
|
|
Takashi Iwai |
a92cf6 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797_BLE),
|
|
Takashi Iwai |
a92cf6 |
.driver_data = MS_QUIRK_FF },
|
|
Takashi Iwai |
a92cf6 |
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_8BITDO_SN30_PRO_PLUS),
|
|
Takashi Iwai |
a92cf6 |
.driver_data = MS_QUIRK_FF },
|
|
Takashi Iwai |
a92cf6 |
--
|
|
Takashi Iwai |
a92cf6 |
2.35.3
|
|
Takashi Iwai |
a92cf6 |
|