linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: xpad - fix input from Covert Forces Xbox One controller
@ 2015-12-06  8:02 Cameron Gutman
  2015-12-10  6:47 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Cameron Gutman @ 2015-12-06  8:02 UTC (permalink / raw)
  To: linux-input; +Cc: dmitry.torokhov

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@gmail.com>
---
  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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: xpad - fix input from Covert Forces Xbox One controller
  2015-12-06  8:02 [PATCH] Input: xpad - fix input from Covert Forces Xbox One controller Cameron Gutman
@ 2015-12-10  6:47 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2015-12-10  6:47 UTC (permalink / raw)
  To: Cameron Gutman; +Cc: linux-input

Hi Cameron,

On Sun, Dec 06, 2015 at 12:02:31AM -0800, Cameron Gutman wrote:
> 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.

I already have a patch that does this and rumble for these controllers
in my queue (in xpad branch) so this one is not needed.

Thank you.

> 
> Signed-off-by: Cameron Gutman <aicommander@gmail.com>
> ---
>  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

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-10  6:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-06  8:02 [PATCH] Input: xpad - fix input from Covert Forces Xbox One controller Cameron Gutman
2015-12-10  6:47 ` Dmitry Torokhov

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).