All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/1] input: HID gamepad quirk system for broken SDP records
@ 2026-07-22  8:52 Pakrohk
  2026-07-22  8:52 ` [PATCH BlueZ 1/1] input: add " Pakrohk
  0 siblings, 1 reply; 3+ messages in thread
From: Pakrohk @ 2026-07-22  8:52 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pakrohk

Some Bluetooth gamepads (like DualShock 4 v2) have incomplete or malformed
HID SDP records, causing BlueZ to fail with -ENOENT. Windows and Android
handle this gracefully; Linux does not.

This patch adds a minimal quirk system that only activates for specifically
matched devices. When extract_hid_record() fails, the dispatcher tries
built-in quirks before giving up. The quirk injects the correct BT HID
report descriptor so the kernel's hid-playstation driver can create an
input device.

The patch includes one quirk (TG170W / DualShock 4 v2) as an example.
The system is modular -- new quirks can be added as separate files in
quirks/.

I previously included an external quirk profile system (JSON + HMAC
signatures) and a crypto extension to bt_crypto. Based on your feedback,
I've stripped those out. The core quirk system works without them.

Questions:
1. Is this approach acceptable for upstream?
2. For external quirk profiles (user-installable via JSON), what crypto
   approach does BlueZ prefer? The existing bt_crypto uses AF_ALG which
   is being deprecated. Should I wait for an upstream decision, use a
   different library, or skip signatures entirely?

Pakrohk (1):
  input: add HID gamepad quirk system for broken SDP records

 profiles/input/quirk.c         |  77 +++++++++++
 profiles/input/quirk.h         |  37 ++++++
 profiles/input/quirks/tg170w.c | 232 +++++++++++++++++++++++++++++++++
 3 files changed, 346 insertions(+)
 create mode 100644 profiles/input/quirk.c
 create mode 100644 profiles/input/quirk.h
 create mode 100644 profiles/input/quirks/tg170w.c

-- 
2.54.0


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH BlueZ 0/1] input: HID gamepad quirk system for broken SDP records
@ 2026-07-22  9:03 Pakrohk
  2026-07-22  9:03 ` [PATCH BlueZ 1/1] input: add " Pakrohk
  0 siblings, 1 reply; 3+ messages in thread
From: Pakrohk @ 2026-07-22  9:03 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pakrohk

Some Bluetooth gamepads (like DualShock 4 v2) have incomplete or malformed
HID SDP records, causing BlueZ to fail with -ENOENT. Windows and Android
handle this gracefully; Linux does not.

This patch adds a minimal quirk system that only activates for specifically
matched devices. When extract_hid_record() fails, the dispatcher tries
built-in quirks before giving up. The quirk injects the correct BT HID
report descriptor so the kernel's hid-playstation driver can create an
input device.

The patch includes one quirk (TG170W / DualShock 4 v2) as an example.
The system is modular -- new quirks can be added as separate files in
quirks/.

I previously included an external quirk profile system (JSON + HMAC
signatures) and a crypto extension to bt_crypto. Based on your feedback,
I've stripped those out. The core quirk system works without them.

Questions:
1. Is this approach acceptable for upstream?
2. For external quirk profiles (user-installable via JSON), what crypto
   approach does BlueZ prefer? The existing bt_crypto uses AF_ALG which
   is being deprecated. Should I wait for an upstream decision, use a
   different library, or skip signatures entirely?

Pakrohk (1):
  input: add HID gamepad quirk system for broken SDP records

 profiles/input/quirk.c         |  77 +++++++++++
 profiles/input/quirk.h         |  37 ++++++
 profiles/input/quirks/tg170w.c | 232 +++++++++++++++++++++++++++++++++
 3 files changed, 346 insertions(+)
 create mode 100644 profiles/input/quirk.c
 create mode 100644 profiles/input/quirk.h
 create mode 100644 profiles/input/quirks/tg170w.c

-- 
2.54.0


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

end of thread, other threads:[~2026-07-22  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22  8:52 [PATCH BlueZ 0/1] input: HID gamepad quirk system for broken SDP records Pakrohk
2026-07-22  8:52 ` [PATCH BlueZ 1/1] input: add " Pakrohk
  -- strict thread matches above, loose matches on Subject: below --
2026-07-22  9:03 [PATCH BlueZ 0/1] input: " Pakrohk
2026-07-22  9:03 ` [PATCH BlueZ 1/1] input: add " Pakrohk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.