We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5348

Summary: [PATCH] Fix Dualshock 4 handling of BT packets when headset mic is active
Product: SDL Reporter: John Klein <development+libsdl>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Windows 10   
Attachments: Patch

Description John Klein 2020-11-11 10:11:14 UTC
Created attachment 4513 [details]
Patch

When the headset mic is active, the DS4 will use reports 17 though 25, rather than just 17, and some reports will contain just audio data. This patch modifies SDL_hidapi_ps4.c to use all 9 incoming report IDs and to skip those report instances that contain no HID data.

If you would like to force a DS4 into this mode for testing, use a normal report 5 write, similar to setting rumble, with byte index 2 (the 3rd byte) set with bit 0x01 high. This will enable the SBC audio encoder in the DS4 and begin appending or replacing the HID reports with audio data and enable the expanded report IDs.
Comment 1 Sam Lantinga 2020-11-11 23:38:54 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/2b7ff2062700