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 - [PATCH] Fix Dualshock 4 handling of BT packets when headset mic is active
Summary: [PATCH] Fix Dualshock 4 handling of BT packets when headset mic is active
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.0
Hardware: x86_64 Windows 10
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-11 10:11 UTC by John Klein
Modified: 2020-11-11 23:38 UTC (History)
0 users

See Also:


Attachments
Patch (2.19 KB, patch)
2020-11-11 10:11 UTC, John Klein
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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