HID: hid-sony: Fix DS4 controller reporting rate issues
PATCH 1/1 HID: hid-sony: Fix DS4 controller reporting rate issues
This commit removes the cap on the DualShock 4 controller reporting
rate when connected using Bluetooth. The previous value of '0xB0' capped the rate to only 20.83 Hz which many userspace utilities mistook as a sign of a bad signal. Since a 'B' and an '8' can look similar it's possible that someone mistook the one for another. The new value of '0x80' enables the full 1000 Hz peak reporting rate that the controller is capable of.
--- drivers/hid/hid-sony.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-sony.c +1 -1
@@ -1836,7 +1836,7 @@ static void dualshock4_state_worker(struct work_struct *work) }else {memset (buf,0 , DS4_REPORT_0x11_SIZE); buf[0 ] =0x11 ; - buf[1 ] =0xB0 ; + buf[1 ] =0x80 ; buf[3 ] =0x0F ; offset =6 ; }
Signature · 1 line
2.5.0.rc2.392.g76e840b
Quoted 18 lines · Rostislav Pehlivanov
This commit removes the cap on the DualShock 4 controller reporting
rate when connected using Bluetooth. The previous value of '0xB0' capped the rate to only 20.83 Hz which many userspace utilities mistook as a sign of a bad signal. Since a 'B' and an '8' can look similar it's possible that someone mistook the one for another. The new value of '0x80' enables the full 1000 Hz peak reporting rate that the controller is capable of.Signed-off-by Rostislav Pehlivanov <[email protected]>--- drivers/hid/hid-sony.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/hid-sony.c +0
-0
drivers/hid/hid-sony.c static void dualshock4_state_worker(struct work_struct *work) · line 1841
Quoted 7 lines
drivers/hid/hid-sony.c +1
-1@@ -1836,7 +1836,7 @@ static void dualshock4_state_worker(struct work_struct *work) }else {memset (buf,0 , DS4_REPORT_0x11_SIZE); buf[0 ] =0x11 ; - buf[1 ] =0xB0 ; + buf[1 ] =0x80 ; buf[3 ] =0x0F ; offset =6 ;
This got added by Frank in commit fdcf105d3d ("HID: sony: Add Dualshock 4 Bluetooth output report formatting"). Adding him to CC to double-check.
Signature · 2 lines
Jiri Kosina SUSE Labs
Frank Praznik
Acked-byQuoted 15 lines · Jiri Kosina
Quoted 13 lines · Rostislav Pehlivanov
This commit removes the cap on the DualShock 4 controller reporting
rate when connected using Bluetooth. The previous value of '0xB0' capped the rate to only 20.83 Hz which many userspace utilities mistook as a sign of a bad signal. Since a 'B' and an '8' can look similar it's possible that someone mistook the one for another. The new value of '0x80' enables the full 1000 Hz peak reporting rate that the controller is capable of.Signed-off-by Rostislav Pehlivanov <[email protected]>--- drivers/hid/hid-sony.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
drivers/hid/hid-sony.c static void dualshock4_state_worker(struct work_struct *work) · line 1841
Quoted 12 lines
drivers/hid/hid-sony.c +1
-1@@ -1836,7 +1836,7 @@ static void dualshock4_state_worker(struct work_struct *work) }else {memset (buf,0 , DS4_REPORT_0x11_SIZE); buf[0 ] =0x11 ; - buf[1 ] =0xB0 ; + buf[1 ] =0x80 ; buf[3 ] =0x0F ; offset =6 ;This got added by Frank in commit
fdcf105d3d("HID: sony: Add Dualshock 4 Bluetooth output report formatting"). Adding him to CC to double-check.
I had some private communication with Rostislav about this fix and it looks good to me. Back when the original code was written the purpose of that value was unknown and 0xB0 seemed to work so that's what ended up being used. Now that we know what it actually does and that 0x80 is a better choice I support this patch.
Quoted 30 lines · Frank Praznik
Quoted 13 lines
Quoted 13 lines
This commit removes the cap on the DualShock 4 controller reporting
rate when connected using Bluetooth. The previous value of '0xB0' capped the rate to only 20.83 Hz which many userspace utilities mistook as a sign of a bad signal. Since a 'B' and an '8' can look similar it's possible that someone mistook the one for another. The new value of '0x80' enables the full 1000 Hz peak reporting rate that the controller is capable of.Signed-off-by Rostislav Pehlivanov <[email protected]>--- drivers/hid/hid-sony.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
drivers/hid/hid-sony.c static void dualshock4_state_worker(struct · line 1842
Quoted 13 lines
drivers/hid/hid-sony.c +1
-1@@ -1836,7 +1836,7 @@ static void dualshock4_state_worker(struct work_struct *work) }else {memset (buf,0 , DS4_REPORT_0x11_SIZE); buf[0 ] =0x11 ; - buf[1 ] =0xB0 ; + buf[1 ] =0x80 ; buf[3 ] =0x0F ; offset =6 ;This got added by Frank in commit
fdcf105d3d("HID: sony: Add Dualshock 4 Bluetooth output report formatting"). Adding him to CC to double-check.
Quoted 7 lines
I had some private communication with Rostislav about this fix and it looks good to me. Back when the original code was written the purpose of that value was unknown and
0xB0seemed to work so that's what ended up being used. Now that we know what it actually does and that0x80is a better choice I support this patch.Acked-by Frank Praznik <[email protected]>
Thanks. Applied to for-4.3/sony.
Signature · 2 lines
Jiri Kosina SUSE Labs