linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: hid-sony: Fix DS4 controller reporting rate issues
@ 2015-07-28  7:38 Rostislav Pehlivanov
  2015-07-29 12:19 ` Jiri Kosina
  0 siblings, 1 reply; 4+ messages in thread
From: Rostislav Pehlivanov @ 2015-07-28  7:38 UTC (permalink / raw)
  To: jkosina; +Cc: linux-input, linux-kernel, 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 <atomnuker@gmail.com>
---
 drivers/hid/hid-sony.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index ed2f008..3a6b6a9 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -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;
 	}
-- 
2.5.0.rc2.392.g76e840b


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

* Re: [PATCH] HID: hid-sony: Fix DS4 controller reporting rate issues
  2015-07-28  7:38 [PATCH] HID: hid-sony: Fix DS4 controller reporting rate issues Rostislav Pehlivanov
@ 2015-07-29 12:19 ` Jiri Kosina
  2015-07-29 14:28   ` Frank Praznik
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Kosina @ 2015-07-29 12:19 UTC (permalink / raw)
  To: Rostislav Pehlivanov; +Cc: linux-input, linux-kernel, Frank Praznik

On Tue, 28 Jul 2015, Rostislav Pehlivanov wrote:

>  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 <atomnuker@gmail.com>
> ---
>  drivers/hid/hid-sony.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> index ed2f008..3a6b6a9 100644
> --- a/drivers/hid/hid-sony.c
> +++ b/drivers/hid/hid-sony.c
> @@ -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.

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH] HID: hid-sony: Fix DS4 controller reporting rate issues
  2015-07-29 12:19 ` Jiri Kosina
@ 2015-07-29 14:28   ` Frank Praznik
  2015-07-31  7:38     ` Jiri Kosina
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Praznik @ 2015-07-29 14:28 UTC (permalink / raw)
  To: Jiri Kosina, Rostislav Pehlivanov
  Cc: linux-input, linux-kernel, Frank Praznik

On 7/29/2015 08:19, Jiri Kosina wrote:
> On Tue, 28 Jul 2015, Rostislav Pehlivanov wrote:
>
>>   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 <atomnuker@gmail.com>
>> ---
>>   drivers/hid/hid-sony.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
>> index ed2f008..3a6b6a9 100644
>> --- a/drivers/hid/hid-sony.c
>> +++ b/drivers/hid/hid-sony.c
>> @@ -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.

Acked-by: Frank Praznik <frank.praznik@gmail.com>

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

* Re: [PATCH] HID: hid-sony: Fix DS4 controller reporting rate issues
  2015-07-29 14:28   ` Frank Praznik
@ 2015-07-31  7:38     ` Jiri Kosina
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2015-07-31  7:38 UTC (permalink / raw)
  To: Frank Praznik
  Cc: Rostislav Pehlivanov, linux-input, linux-kernel, Frank Praznik

On Wed, 29 Jul 2015, Frank Praznik wrote:

> > >   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 <atomnuker@gmail.com>
> > > ---
> > >   drivers/hid/hid-sony.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> > > index ed2f008..3a6b6a9 100644
> > > --- a/drivers/hid/hid-sony.c
> > > +++ b/drivers/hid/hid-sony.c
> > > @@ -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.
> 
> Acked-by: Frank Praznik <frank.praznik@gmail.com>

Thanks. Applied to for-4.3/sony.

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2015-07-31  7:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28  7:38 [PATCH] HID: hid-sony: Fix DS4 controller reporting rate issues Rostislav Pehlivanov
2015-07-29 12:19 ` Jiri Kosina
2015-07-29 14:28   ` Frank Praznik
2015-07-31  7:38     ` Jiri Kosina

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