Skip to content

Commit 764f7f9

Browse files
luk1337dtor
authored andcommitted
Input: xpad - add custom init packet for Xbox One S controllers
Sending [ 0x05, 0x20, 0x00, 0x0f, 0x06 ] packet for Xbox One S controllers fixes an issue where controller is stuck in Bluetooth mode and not sending any inputs. Signed-off-by: Łukasz Patron <[email protected]> Reviewed-by: Cameron Gutman <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 0926409 commit 764f7f9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/input/joystick/xpad.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,16 @@ static const u8 xboxone_fw2015_init[] = {
458458
0x05, 0x20, 0x00, 0x01, 0x00
459459
};
460460

461+
/*
462+
* This packet is required for Xbox One S (0x045e:0x02ea)
463+
* and Xbox One Elite Series 2 (0x045e:0x0b00) pads to
464+
* initialize the controller that was previously used in
465+
* Bluetooth mode.
466+
*/
467+
static const u8 xboxone_s_init[] = {
468+
0x05, 0x20, 0x00, 0x0f, 0x06
469+
};
470+
461471
/*
462472
* This packet is required for the Titanfall 2 Xbox One pads
463473
* (0x0e6f:0x0165) to finish initialization and for Hori pads
@@ -516,6 +526,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {
516526
XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init),
517527
XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init),
518528
XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init),
529+
XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init),
530+
XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init),
519531
XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1),
520532
XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2),
521533
XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),

0 commit comments

Comments
 (0)