[PATCH] Input: xpad - fix input from Covert Forces Xbox One controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Covert Forces edition of the Xbox One controller requires the full 5
byte initialization packet to work at all. The 5 byte packet was known to
be needed for proper rumble support, but it looks like it's needed even
without rumble on these controllers.

Signed-off-by: Cameron Gutman <aicommander@xxxxxxxxx>
---
 drivers/input/joystick/xpad.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index fd4100d..de89de0 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1052,7 +1052,10 @@ static int xpad_open(struct input_dev *dev)
 		/* Xbox one controller needs to be initialized. */
 		xpad->odata[0] = 0x05;
 		xpad->odata[1] = 0x20;
-		xpad->irq_out->transfer_buffer_length = 2;
+		xpad->odata[2] = 0x00;
+		xpad->odata[3] = 0x01;
+		xpad->odata[4] = 0x00;
+		xpad->irq_out->transfer_buffer_length = 5;
 		return usb_submit_urb(xpad->irq_out, GFP_KERNEL);
 	}

--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux