* [PATCH v3 0/2] Input: xpad - improve support for new Xbox One S pad @ 2016-11-25 22:18 Cameron Gutman 2016-11-25 22:18 ` [PATCH v3 1/2] Input: xpad - add product ID for " Cameron Gutman 2016-11-25 22:18 ` [PATCH v3 2/2] Input: xpad - fix Xbox One rumble stopping after 2.5 secs Cameron Gutman 0 siblings, 2 replies; 5+ messages in thread From: Cameron Gutman @ 2016-11-25 22:18 UTC (permalink / raw) To: dmitry.torokhov, rojtberg; +Cc: linux-input, Cameron Gutman This is another version of my Xbox One S support improvement series. Early this month, Microsoft released a firmware update that fixed the pad disconnect and stuck mode button issues. This considerably simplifies this patch series. As a result, I've removed these patches from the series: [PATCH v2 2/4] Input: xpad - fix One S pad disconnecting when not opened [PATCH v2 3/4] Input: xpad - fix stuck mode button on Xbox One S pad It's up for debate whether the 2 removed patches from v2 should still be merged to support older firmware, but for now I'm sticking to the simple patches still useful on the latest firmware. The rumble fix affects both Xbox One S and all previous Xbox One pads. Cameron Gutman (2): Input: xpad - add product ID for Xbox One S pad Input: xpad - fix Xbox One rumble stopping after 2.5 secs drivers/input/joystick/xpad.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.9.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/2] Input: xpad - add product ID for Xbox One S pad 2016-11-25 22:18 [PATCH v3 0/2] Input: xpad - improve support for new Xbox One S pad Cameron Gutman @ 2016-11-25 22:18 ` Cameron Gutman 2016-11-28 4:37 ` Dmitry Torokhov 2016-11-25 22:18 ` [PATCH v3 2/2] Input: xpad - fix Xbox One rumble stopping after 2.5 secs Cameron Gutman 1 sibling, 1 reply; 5+ messages in thread From: Cameron Gutman @ 2016-11-25 22:18 UTC (permalink / raw) To: dmitry.torokhov, rojtberg; +Cc: linux-input, Cameron Gutman This is the new gamepad that ships with the Xbox One S which includes Bluetooth functionality. Signed-off-by: Cameron Gutman <aicommander@gmail.com> --- No changes in v3. --- drivers/input/joystick/xpad.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 83af17a..19886db 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -134,6 +134,7 @@ static const struct xpad_device { { 0x045e, 0x02d1, "Microsoft X-Box One pad", 0, XTYPE_XBOXONE }, { 0x045e, 0x02dd, "Microsoft X-Box One pad (Firmware 2015)", 0, XTYPE_XBOXONE }, { 0x045e, 0x02e3, "Microsoft X-Box One Elite pad", 0, XTYPE_XBOXONE }, + { 0x045e, 0x02ea, "Microsoft X-Box One S pad", 0, XTYPE_XBOXONE }, { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX }, -- 2.9.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] Input: xpad - add product ID for Xbox One S pad 2016-11-25 22:18 ` [PATCH v3 1/2] Input: xpad - add product ID for " Cameron Gutman @ 2016-11-28 4:37 ` Dmitry Torokhov 0 siblings, 0 replies; 5+ messages in thread From: Dmitry Torokhov @ 2016-11-28 4:37 UTC (permalink / raw) To: Cameron Gutman; +Cc: rojtberg, linux-input On Fri, Nov 25, 2016 at 02:18:34PM -0800, Cameron Gutman wrote: > This is the new gamepad that ships with the Xbox One S which > includes Bluetooth functionality. > > Signed-off-by: Cameron Gutman <aicommander@gmail.com> Applied, thank you. > --- > No changes in v3. > > --- > drivers/input/joystick/xpad.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c > index 83af17a..19886db 100644 > --- a/drivers/input/joystick/xpad.c > +++ b/drivers/input/joystick/xpad.c > @@ -134,6 +134,7 @@ static const struct xpad_device { > { 0x045e, 0x02d1, "Microsoft X-Box One pad", 0, XTYPE_XBOXONE }, > { 0x045e, 0x02dd, "Microsoft X-Box One pad (Firmware 2015)", 0, XTYPE_XBOXONE }, > { 0x045e, 0x02e3, "Microsoft X-Box One Elite pad", 0, XTYPE_XBOXONE }, > + { 0x045e, 0x02ea, "Microsoft X-Box One S pad", 0, XTYPE_XBOXONE }, > { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, > { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, > { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX }, > -- > 2.9.3 > -- Dmitry ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 2/2] Input: xpad - fix Xbox One rumble stopping after 2.5 secs 2016-11-25 22:18 [PATCH v3 0/2] Input: xpad - improve support for new Xbox One S pad Cameron Gutman 2016-11-25 22:18 ` [PATCH v3 1/2] Input: xpad - add product ID for " Cameron Gutman @ 2016-11-25 22:18 ` Cameron Gutman 2016-11-28 4:38 ` Dmitry Torokhov 1 sibling, 1 reply; 5+ messages in thread From: Cameron Gutman @ 2016-11-25 22:18 UTC (permalink / raw) To: dmitry.torokhov, rojtberg; +Cc: linux-input, Cameron Gutman Unlike previous Xbox pads, the Xbox One pad doesn't have "sticky" rumble packets. The duration is encoded into the command and expiration is handled by the pad firmware. ff-memless needs pseudo-sticky behavior for rumble effects to behave properly for long duration effects. We already specify the maximum rumble on duration in the command packets, but it's still only good for about 2.5 seconds of rumble. This is easily reproducable running fftest's sine vibration test. It turns out there's a repeat count encoded in the rumble command. We can abuse that to get the pseudo-sticky behavior needed for rumble to behave as expected for effects with long duration. By my math, this change should allow a single ff_effect to rumble for 10 minutes straight, which should be more than enough for most needs. Signed-off-by: Cameron Gutman <aicommander@gmail.com> --- No changes in v3. --- drivers/input/joystick/xpad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 19886db..6d94996 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1045,9 +1045,9 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect packet->data[7] = 0x00; packet->data[8] = strong / 512; /* left actuator */ packet->data[9] = weak / 512; /* right actuator */ - packet->data[10] = 0xFF; - packet->data[11] = 0x00; - packet->data[12] = 0x00; + packet->data[10] = 0xFF; /* on period */ + packet->data[11] = 0x00; /* off period */ + packet->data[12] = 0xFF; /* repeat count */ packet->len = 13; packet->pending = true; break; -- 2.9.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 2/2] Input: xpad - fix Xbox One rumble stopping after 2.5 secs 2016-11-25 22:18 ` [PATCH v3 2/2] Input: xpad - fix Xbox One rumble stopping after 2.5 secs Cameron Gutman @ 2016-11-28 4:38 ` Dmitry Torokhov 0 siblings, 0 replies; 5+ messages in thread From: Dmitry Torokhov @ 2016-11-28 4:38 UTC (permalink / raw) To: Cameron Gutman; +Cc: rojtberg, linux-input On Fri, Nov 25, 2016 at 02:18:35PM -0800, Cameron Gutman wrote: > Unlike previous Xbox pads, the Xbox One pad doesn't have > "sticky" rumble packets. The duration is encoded into > the command and expiration is handled by the pad firmware. > > ff-memless needs pseudo-sticky behavior for rumble effects > to behave properly for long duration effects. We already > specify the maximum rumble on duration in the command > packets, but it's still only good for about 2.5 seconds > of rumble. This is easily reproducable running fftest's > sine vibration test. > > It turns out there's a repeat count encoded in the rumble > command. We can abuse that to get the pseudo-sticky behavior > needed for rumble to behave as expected for effects with long > duration. > > By my math, this change should allow a single ff_effect to > rumble for 10 minutes straight, which should be more than > enough for most needs. > > Signed-off-by: Cameron Gutman <aicommander@gmail.com> Applied, thank you. > --- > No changes in v3. > > --- > drivers/input/joystick/xpad.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c > index 19886db..6d94996 100644 > --- a/drivers/input/joystick/xpad.c > +++ b/drivers/input/joystick/xpad.c > @@ -1045,9 +1045,9 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect > packet->data[7] = 0x00; > packet->data[8] = strong / 512; /* left actuator */ > packet->data[9] = weak / 512; /* right actuator */ > - packet->data[10] = 0xFF; > - packet->data[11] = 0x00; > - packet->data[12] = 0x00; > + packet->data[10] = 0xFF; /* on period */ > + packet->data[11] = 0x00; /* off period */ > + packet->data[12] = 0xFF; /* repeat count */ > packet->len = 13; > packet->pending = true; > break; > -- > 2.9.3 > -- Dmitry ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-28 4:39 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-11-25 22:18 [PATCH v3 0/2] Input: xpad - improve support for new Xbox One S pad Cameron Gutman 2016-11-25 22:18 ` [PATCH v3 1/2] Input: xpad - add product ID for " Cameron Gutman 2016-11-28 4:37 ` Dmitry Torokhov 2016-11-25 22:18 ` [PATCH v3 2/2] Input: xpad - fix Xbox One rumble stopping after 2.5 secs Cameron Gutman 2016-11-28 4:38 ` 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).