input: HID gamepad quirk system for broken SDP records
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | input: add HID gamepad quirk system for broken SDP recordsprofiles/ profiles/ profiles/ | +346 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH BlueZ 0/1] input: HID gamepad quirk system for broken SDP records
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
Signature · 1 line
2.54.0