feat(pad): bridge controller audio haptics to motor rumble #5448
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5448"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by joelfernandes23 on 2026-10-13T20:02:25Z.
What
Convert controller vibration PCM into Xbox-compatible motor rumble when a DualSense audio device is absent. The two channels' RMS energy sets large/small motor intensity; near-silence is ignored and output expires after 80 ms. Regular vibration remains separate, with the stronger intensity used per motor on non-PS5 controllers. DualSense waveform routing and controller-speaker fallback are retained.
Supersedes closed #2467. Main already includes #2032's speaker muting; this adds the rumble bridge. No duplicate rumble implementation was found. The overlap bot flags #4789 (SDL initialization/include), #5021 (platform-specific audio library linking), and #5198 (captured PCM/gain in the mixer). These are independent changes; merge-order coordination with their authors is still pending. A separate local integration check reconciles both includes, retains libScePad in both platform link branches, and combines captured gain with haptic/speaker routing. This PR does not include those other implementations. Motor intensity approximates waveform energy and is peak-held while impulses remain active. Per-user/multi-controller routing follows the existing single-controller limitation.
Tested
Separate overlap integration on Windows GCC15.2: PR5448 + main
0aa4cb1c2+ PR47895031432db+ PR5198 79dae11d1, with only PR5021 platform-link reconciliation, passed 12/12 audio/controller tests (6.04 s). A new integration-only regression verifies captured haptic PCM/gain drives motors without speaker leakage; bypassing captured gain fails and restoring it passes. This validation is not a build of the unchanged isolated PR head; Linux/macOS and new title gameplay were not tested.Windows, MinGW-w64 GCC 15.2: 6/6 focused tests passed on today's current-main integration build: audio_out2_pad_mix, audio_out2_port_layouts, audio_out2_port_buffers, audio_out2_latency, audio_out2_timing and guest_pad (3.70 seconds). Bridge sources match that build after ignoring comments/whitespace. The integration includes separate 4K output edits and additional layout assertions excluded from this PR. The exact isolated contribution was not freshly rebuilt.
Earlier isolated rebase on main
ba2a0a31built audio/pad/video libraries and passed the same six tests.Earlier Windows Silksong PPSA12544 01.000.010 gameplay on Ryzen 7700X/RX 7900 XT with an Xbox controller: the user confirmed working rumble. That was the earlier runtime; no new gameplay validation is claimed.
Contribution conventions and whitespace checks passed. Full suite, Linux and physical DualSense audio not tested. No proprietary files included.
Checklist
Imported from boykopovar/AnyPS5. Originally posted by joelfernandes23 on 2026-10-13T21:16:18Z.
Checked the overlap warning in a separate Windows Release integration using GCC 15.2: this PR at d182fe25f, main
0aa4cb1c2, #4789 at5031432db, and #5198 at 79dae11d1. For #5021, I reconciled only its relevant CMake linking change, not its AOT implementation or dependency stack.All 12 audio/controller tests passed in 6.04 seconds. An integration-only regression snapshots haptic PCM, then overwrites the source buffer and sets gain to zero before Push: motors still receive the captured signal and the main output stays silent. Bypassing captured gain makes that regression fail; restoring it passes.
These changes remain on a local integration branch; this PR's source head is unchanged. Linux/macOS, physical controller output on this combined build, and new title gameplay were not tested.
Proposed merge order: keep this PR rumble-only and merge it first, with the other PRs retaining the reconciliation above when rebased. Would the authors of #4789, #5021 and #5198 prefer a different order? No functional dependency is required, but I will update Depends on once an order is agreed.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T11:48:41Z.
Checked on Linux (build +
audio_out2_pad_mix,guest_padand the rest of the audio/pad/video ctest scope, 61/61 after the rebase). The new tests need the new API, so they cannot pass without the change.Added as our own commits on your branch:
AudioOut2Context.cpp, both includes kept).Functionalline indocs/dev/TechnicalDebt.md: the RMS-to-motor mapping (2x scale, 0.01 floor, 80 ms hold) approximates waveform energy and is not measured against console hardware.Merging once the full Build (Windows) is green.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T11:51:10Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAudioOut/CMakeLists.txtL17core/libs/prx/libSceAudioOut/src/AudioOut2Port.cppL125-131