Bluetooth: hidp: sixaxis dualshock report via ctrl quirk
Subsystems (2)
PATCH 1/1 Bluetooth: hidp: sixaxis dualshock report via ctrl quirk
From: vivek <[email protected]>
The Sixaxis and Dualshock 4 wants report sent via the ctrl channel.
This patch has been used in the SteamOS kernel for a while now.
<https://github.com/ValveSoftware/steamos_kernel/commit/6e215b67a13c85d0cf5a9e0970acd9df7d2b77bd>
--- net/bluetooth/hidp/core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
net/bluetooth/hidp/core.c +10 -3
@@ -379,9 +379,16 @@ static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count) {struct hidp_session *session = hid->driver_data; -return hidp_send_intr_message (session, -HIDP_TRANS_DATA |HIDP_DATA_RTYPE_OUPUT , - data, count); +/* The Sixaxis and Dualshock 4 wants report sent via the ctrl channel */ +if (hid->vendor ==0x54c && (hid->product ==0x5c4 || hid->product ==0x268 )) { +return hidp_send_ctrl_message (session, +HIDP_TRANS_SET_REPORT |HIDP_DATA_RTYPE_OUPUT , + data, count); + }else { +return hidp_send_intr_message (session, +HIDP_TRANS_DATA |HIDP_DATA_RTYPE_OUPUT , + data, count); + } } static int hidp_raw_request(struct hid_device *hid, unsigned char reportnum,
Signature · 1 line
2.16.2
Quoted 7 lines · Arnaud Rebillout
From: vivek <[email protected]>
The Sixaxis and Dualshock 4 wants report sent via the ctrl channel.
This patch has been used in the SteamOS kernel for a while now.
<https://github.com/ValveSoftware/steamos_kernel/commit/6e215b67a13c85d0cf5a9e0970acd9df7d2b77bd>
Given that both types of devices already work via Bluetooth, what is this supposed to fix? The commit message will need work.
Marcel Holtmann
maintainerHi Arnaud,
Quoted 23 lines
The Sixaxis and Dualshock 4 wants report sent via the ctrl channel.
This patch has been used in the SteamOS kernel for a while now.
<https://github.com/ValveSoftware/steamos_kernel/commit/6e215b67a13c85d0cf5a9e0970acd9df7d2b77bd>Signed-off-by Vivek Das Mohapatra <[email protected]>Signed-off-by Arnaud Rebillout <[email protected]>---
net/bluetooth/hidp/core.c| 13 ++++++++++---1 file changed, 10 insertions(+), 3 deletions(-)net/bluetooth/hidp/core.c +1
-3@@ -379,9 +379,16 @@ static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count) {struct hidp_session *session = hid->driver_data; -return hidp_send_intr_message (session, -HIDP_TRANS_DATA |HIDP_DATA_RTYPE_OUPUT , - data, count); +/* The Sixaxis and Dualshock 4 wants report sent via the ctrl channel */
net/bluetooth/hidp/core.c static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count) · line 392
Quoted 10 lines
net/bluetooth/hidp/core.c +9
-0+if (hid->vendor ==0x54c && (hid->product ==0x5c4 || hid->product ==0x268 )) { +return hidp_send_ctrl_message (session, +HIDP_TRANS_SET_REPORT |HIDP_DATA_RTYPE_OUPUT , + data, count); + }else { +return hidp_send_intr_message (session, +HIDP_TRANS_DATA |HIDP_DATA_RTYPE_OUPUT , + data, count); + } }
see the comment from Bastien, the HIDP layer is just a transport layer and should really not need to know about device specific quirks. Seems these quirks could be easily handled one layer about where the right channel is selected.
Regards
Marcel
Hi Marcel,
Quoted 21 lines · Marcel Holtmann
Hi Arnaud,
Quoted 19 lines
The Sixaxis and Dualshock 4 wants report sent via the ctrl channel.
This patch has been used in the SteamOS kernel for a while now.
<https://github.com/ValveSoftware/steamos_kernel/commit/6e215b67a13c85d0cf5a9e0970acd9df7d2b77bd>Signed-off-by Vivek Das Mohapatra <[email protected]>Signed-off-by Arnaud Rebillout <[email protected]>---
net/bluetooth/hidp/core.c| 13 ++++++++++---1 file changed, 10 insertions(+), 3 deletions(-)net/bluetooth/hidp/core.c +0
-0@@ -379,9 +379,16 @@ static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count) {struct hidp_session *session = hid->driver_data;
Quoted 15 lines
Quoted 4 lines
net/bluetooth/hidp/core.c +1
-3-return hidp_send_intr_message (session, -HIDP_TRANS_DATA |HIDP_DATA_RTYPE_OUPUT , - data, count); +/* The Sixaxis and Dualshock 4 wants report sent via the ctrl channel */ net/bluetooth/hidp/core.c static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count) · line 392
Quoted 10 lines
net/bluetooth/hidp/core.c +9
-0+if (hid->vendor ==0x54c && (hid->product ==0x5c4 || hid->product ==0x268 )) { +return hidp_send_ctrl_message (session, +HIDP_TRANS_SET_REPORT |HIDP_DATA_RTYPE_OUPUT , + data, count); + }else { +return hidp_send_intr_message (session, +HIDP_TRANS_DATA |HIDP_DATA_RTYPE_OUPUT , + data, count); + } }see the comment from Bastien, the HIDP layer is just a transport layer and should really not need to know about device specific quirks. Seems these quirks could be easily handled one layer about where the right channel is selected.
I noticed indeed that the fix for the Sixaxis is already present in drivers/hid/hid-sony.c. I'm not sure about the Dualshock 4, but I will investigate further. If there's anything to fix I will patch hid-sony.c.
Thanks for the feedback, and sorry for the noise :)
Arnaud