fix(audio): route legacy vibration PCM to controller output #6839

Closed
MarcZX10 wants to merge 1 commit from upstream-pr/6839 into main
MarcZX10 commented 2026-10-16 13:53:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T13:53:54Z.


What

Closes #6824. Legacy type-10 vibration ports previously paced accepted PCM as virtual output without publishing it to the controller. For mono and stereo S16/F32 buffers, route the submitted samples through the existing AudioOut2 pad-vibration mix and RMS-to-motor conversion, applying the legacy per-channel volume and mix level first. Both sceAudioOutOutput and sceAudioOutOutputs use the same path. Speaker ports and regular motor state remain separate.

The controller bridge retains its existing 80 ms haptic hold behavior; this change does not claim a console-derived waveform or motor mapping. Legacy vibration formats with more than two channels are not routed by this change.

Tested

Linux x86_64, GCC 12.2, Release, BUILD_TESTING=ON: built audio_out_vibration_tests and its production library dependencies. All five focused CTest cases passed (S16, F32, batched S16, batched F32 and the existing Pad bridge control). This host lacks AVX2 and other required PS5 CPU features, so the tests could only run after a temporary local-only bypass of the static host CPU guard; that bypass was restored and is not part of this PR. git diff --check, conventions and open-PR overlap checks passed. No physical controller or Windows validation.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4889381403 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6839). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T13:53:54Z. --- ### What Closes #6824. Legacy type-10 vibration ports previously paced accepted PCM as virtual output without publishing it to the controller. For mono and stereo S16/F32 buffers, route the submitted samples through the existing AudioOut2 pad-vibration mix and RMS-to-motor conversion, applying the legacy per-channel volume and mix level first. Both `sceAudioOutOutput` and `sceAudioOutOutputs` use the same path. Speaker ports and regular motor state remain separate. The controller bridge retains its existing 80 ms haptic hold behavior; this change does not claim a console-derived waveform or motor mapping. Legacy vibration formats with more than two channels are not routed by this change. ### Tested Linux x86_64, GCC 12.2, Release, `BUILD_TESTING=ON`: built `audio_out_vibration_tests` and its production library dependencies. All five focused CTest cases passed (S16, F32, batched S16, batched F32 and the existing Pad bridge control). This host lacks AVX2 and other required PS5 CPU features, so the tests could only run after a temporary local-only bypass of the static host CPU guard; that bypass was restored and is not part of this PR. `git diff --check`, conventions and open-PR overlap checks passed. No physical controller or Windows validation. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-16 13:57:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T13:57:23Z.


Closing this PR after the new #6824 discussion clarified the intended legacy timing contract and disclosed an in-progress production prototype. My branch reused AudioOut2's 80 ms haptic hold, which does not match the source-owned frame intervals and per-port drain/close behavior now being specified. I don't want this parallel implementation to compete with that work.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6217094066 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6839#issuecomment-6217094066). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T13:57:23Z. --- Closing this PR after the new #6824 discussion clarified the intended legacy timing contract and disclosed an in-progress production prototype. My branch reused AudioOut2's 80 ms haptic hold, which does not match the source-owned frame intervals and per-port drain/close behavior now being specified. I don't want this parallel implementation to compete with that work.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!6839
No description provided.