From: Rosalie Wanders <rosalie@mailbox.org>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: Rosalie Wanders <rosalie@mailbox.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] HID: sony: add support for bluetooth Rock Band 4 PS4 guitars
Date: Sun, 11 Jan 2026 22:00:50 +0100 [thread overview]
Message-ID: <20260111210051.51743-2-rosalie@mailbox.org> (raw)
This commit adds support for the PDP Jaguar and MadCatz Stratocaster.
Signed-off-by: Rosalie Wanders <rosalie@mailbox.org>
---
drivers/hid/hid-ids.h | 12 ++++++++----
drivers/hid/hid-sony.c | 24 +++++++++++++++---------
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index d95768c8fe06..43f86061cab2 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -1101,6 +1101,11 @@
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
#define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S 0x8003
+#define USB_VENDOR_ID_PDP 0x0e6F
+#define USB_DEVICE_ID_PDP_PS4_JAGUAR 0x0173
+#define USB_DEVICE_ID_PDP_PS4_RIFFMASTER 0x024a
+#define USB_DEVICE_ID_PDP_PS5_RIFFMASTER 0x0249
+
#define USB_VENDOR_ID_PLANTRONICS 0x047f
#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES 0xc055
#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES 0xc056
@@ -1149,10 +1154,6 @@
#define USB_VENDOR_ID_POWERCOM 0x0d9f
#define USB_DEVICE_ID_POWERCOM_UPS 0x0002
-#define USB_VENDOR_ID_PDP 0x0e6F
-#define USB_DEVICE_ID_PDP_PS4_RIFFMASTER 0x024a
-#define USB_DEVICE_ID_PDP_PS5_RIFFMASTER 0x0249
-
#define USB_VENDOR_ID_PRODIGE 0x05af
#define USB_DEVICE_ID_PRODIGE_CORDLESS 0x3062
@@ -1539,6 +1540,9 @@
#define USB_VENDOR_ID_RISO_KAGAKU 0x1294 /* Riso Kagaku Corp. */
#define USB_DEVICE_ID_RI_KA_WEBMAIL 0x1320 /* Webmail Notifier */
+#define USB_VENDOR_ID_MADCATZ 0x0738
+#define USB_DEVICE_ID_MADCATZ_PS4_STRATOCASTER 0x8261
+
#define USB_VENDOR_ID_MULTIPLE_1781 0x1781
#define USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD 0x0a9d
#define USB_DEVICE_ID_PHOENIXRC 0x0898
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index e2f17a99fa42..d0270ffec4f4 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -62,8 +62,9 @@
#define GH_GUITAR_CONTROLLER BIT(14)
#define GHL_GUITAR_PS3WIIU BIT(15)
#define GHL_GUITAR_PS4 BIT(16)
-#define RB4_GUITAR_PS4 BIT(17)
-#define RB4_GUITAR_PS5 BIT(18)
+#define RB4_GUITAR_PS4_USB BIT(17)
+#define RB4_GUITAR_PS4_BT BIT(18)
+#define RB4_GUITAR_PS5 BIT(19)
#define SIXAXIS_CONTROLLER (SIXAXIS_CONTROLLER_USB | SIXAXIS_CONTROLLER_BT)
#define MOTION_CONTROLLER (MOTION_CONTROLLER_USB | MOTION_CONTROLLER_BT)
@@ -627,7 +628,6 @@ static int gh_guitar_mapping(struct hid_device *hdev, struct hid_input *hi,
static int rb4_guitar_mapping(struct hid_device *hdev, struct hid_input *hi,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
-
{
if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {
unsigned int key = usage->hid & HID_USAGE;
@@ -1041,7 +1041,10 @@ static int sony_raw_event(struct hid_device *hdev, struct hid_report *report,
} else if ((sc->quirks & NSG_MRXU_REMOTE) && rd[0] == 0x02) {
nsg_mrxu_parse_report(sc, rd, size);
return 1;
- } else if ((sc->quirks & RB4_GUITAR_PS4) && rd[0] == 0x01 && size == 64) {
+ } else if ((sc->quirks & RB4_GUITAR_PS4_USB) && rd[0] == 0x01 && size == 64) {
+ rb4_ps4_guitar_parse_report(sc, rd, size);
+ return 1;
+ } else if ((sc->quirks & RB4_GUITAR_PS4_BT) && rd[0] == 0x01 && size == 78) {
rb4_ps4_guitar_parse_report(sc, rd, size);
return 1;
} else if ((sc->quirks & RB4_GUITAR_PS5) && rd[0] == 0x01 && size == 64) {
@@ -1098,7 +1101,7 @@ static int sony_mapping(struct hid_device *hdev, struct hid_input *hi,
if (sc->quirks & GH_GUITAR_CONTROLLER)
return gh_guitar_mapping(hdev, hi, field, usage, bit, max);
- if (sc->quirks & RB4_GUITAR_PS4)
+ if (sc->quirks & (RB4_GUITAR_PS4_USB | RB4_GUITAR_PS4_BT))
return rb4_guitar_mapping(hdev, hi, field, usage, bit, max);
if (sc->quirks & RB4_GUITAR_PS5)
@@ -2119,8 +2122,6 @@ static int sony_input_configured(struct hid_device *hdev,
} else if (sc->quirks & MOTION_CONTROLLER) {
sony_init_output_report(sc, motion_send_output_report);
- } else if (sc->quirks & (RB4_GUITAR_PS4 | RB4_GUITAR_PS5)) {
- sc->input_dev = hidinput->input;
}
if (sc->quirks & SONY_LED_SUPPORT) {
@@ -2148,6 +2149,7 @@ static int sony_input_configured(struct hid_device *hdev,
goto err_close;
}
+ sc->input_dev = hidinput->input;
return 0;
err_close:
hid_hw_close(hdev);
@@ -2378,9 +2380,13 @@ static const struct hid_device_id sony_devices[] = {
.driver_data = GHL_GUITAR_PS4 | GH_GUITAR_CONTROLLER },
/* Rock Band 4 PS4 guitars */
{ HID_USB_DEVICE(USB_VENDOR_ID_PDP, USB_DEVICE_ID_PDP_PS4_RIFFMASTER),
- .driver_data = RB4_GUITAR_PS4 },
+ .driver_data = RB4_GUITAR_PS4_USB },
{ HID_USB_DEVICE(USB_VENDOR_ID_CRKD, USB_DEVICE_ID_CRKD_PS4_GIBSON_SG),
- .driver_data = RB4_GUITAR_PS4 },
+ .driver_data = RB4_GUITAR_PS4_USB },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_PDP, USB_DEVICE_ID_PDP_PS4_JAGUAR),
+ .driver_data = RB4_GUITAR_PS4_BT },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_PS4_STRATOCASTER),
+ .driver_data = RB4_GUITAR_PS4_BT },
/* Rock Band 4 PS5 guitars */
{ HID_USB_DEVICE(USB_VENDOR_ID_PDP, USB_DEVICE_ID_PDP_PS5_RIFFMASTER),
.driver_data = RB4_GUITAR_PS5 },
--
2.52.0
next reply other threads:[~2026-01-11 21:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-11 21:00 Rosalie Wanders [this message]
2026-01-12 16:46 ` [PATCH] HID: sony: add support for bluetooth Rock Band 4 PS4 guitars Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260111210051.51743-2-rosalie@mailbox.org \
--to=rosalie@mailbox.org \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox