History

Input: xpad - send LED and auth done packets to all Xbox One controllers

This mirrors what SDL does, and is closer to Windows's behavior as-is.

Vicki Pfau committed 1 year ago

Commit 0d5c6041 parent 898170c1 file · +8 −13Browse files

Unified · Split

drivers/input/joystick/xpad.c+8−13
@@ -676,20 +676,19 @@ static const u8 xboxone_hori_ack_id[] = { · 675 unmodified lines
676};676};
677 677
678/*678/*
679 * This packet is required for most (all?) of the PDP pads to start679 * This packet is sent by default on Windows, and is required for some pads to
680 * sending input reports. These pads include: (0x0e6f:0x02ab),680 * start sending input reports, including most (all?) of the PDP. These pads
681 * (0x0e6f:0x02a4), (0x0e6f:0x02a6).681 * include: (0x0e6f:0x02ab), (0x0e6f:0x02a4), (0x0e6f:0x02a6).
682 */682 */
683static const u8 xboxone_pdp_led_on[] = {683static const u8 xboxone_led_on[] = { GIP_CMD_LED, GIP_OPT_INTERNAL, GIP_SEQ0,
684 GIP_CMD_LED, GIP_OPT_INTERNAL, GIP_SEQ0, GIP_PL_LEN(3), 0x00, GIP_LED_ON, 0x14684GIP_PL_LEN(3), 0x00, GIP_LED_ON, 0x14 };
685};
686 685
687/*686/*
688 * This packet is required for most (all?) of the PDP pads to start687 * This packet is required for most (all?) of the PDP pads to start
689 * sending input reports. These pads include: (0x0e6f:0x02ab),688 * sending input reports. These pads include: (0x0e6f:0x02ab),
690 * (0x0e6f:0x02a4), (0x0e6f:0x02a6).689 * (0x0e6f:0x02a4), (0x0e6f:0x02a6).
691 */690 */
692static const u8 xboxone_pdp_auth[] = {691static const u8 xboxone_auth_done[] = {
693 GIP_CMD_AUTHENTICATE, GIP_OPT_INTERNAL, GIP_SEQ0, GIP_PL_LEN(2), 0x01, 0x00692 GIP_CMD_AUTHENTICATE, GIP_OPT_INTERNAL, GIP_SEQ0, GIP_PL_LEN(2), 0x01, 0x00
694};693};
695 694
@@ -726,12 +725,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { · 30 unmodified lines
726 XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init),725 XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init),
727 XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init),726 XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init),
728 XBOXONE_INIT_PKT(0x045e, 0x0b00, extra_input_packet_init),727 XBOXONE_INIT_PKT(0x045e, 0x0b00, extra_input_packet_init),
729 XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_led_on),728 XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_led_on),
730 XBOXONE_INIT_PKT(0x0f0d, 0x01b2, xboxone_pdp_led_on),729 XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_auth_done),
731 XBOXONE_INIT_PKT(0x20d6, 0xa01a, xboxone_pdp_led_on),
732 XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_auth),
733 XBOXONE_INIT_PKT(0x0f0d, 0x01b2, xboxone_pdp_auth),
734 XBOXONE_INIT_PKT(0x20d6, 0xa01a, xboxone_pdp_auth),
735 XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),730 XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
736 XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),731 XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
737 XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),732 XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t