feat(libSceVoice): implement sceVoicePausePortAll and sceVoiceResumePortAll #8852

Merged
nikowolf123 merged 1 commit from upstream-pr/8852 into main 2026-10-21 10:46:23 +00:00
nikowolf123 commented 2026-10-21 03:07:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-21T03:07:16Z.


What

sceVoicePausePortAll and sceVoiceResumePortAll threw not implemented. Both now take no arguments and return 0x804E0801 while the library is not initialized, and 0 otherwise. They change no state that any other call reports, like sceVoicePausePort and sceVoiceResumePort on main.

  • Behaviour and error code: shadPS4's PS4 sceVoicePausePortAll / sceVoiceResumePortAll check only that the library is initialized and return ORBIS_VOICE_ERROR_NOT_INIT, which its voice_error.h defines as 0x804E0801. That is the code VoiceErrorNotInitialized already returns for sceVoiceStart, sceVoiceCreatePort and sceVoiceGetPortInfo, from prosper. RPCS3's PS3 cellVoicePausePortAll / cellVoiceResumePortAll make the same single check.
  • Why nothing else changes: VitaSDK documents that pausing every port keeps the buffered data and the reported port state. Nothing in this library processes port data, so there is nothing to stop or restart. This is the same reasoning the existing sceVoicePausePort debt entry gives.
  • Unverified on a PS5: the console's behaviour, recorded in docs/dev/debt/libSceVoice.md in a new entry next to the sceVoicePausePort, sceVoiceResumePort one. The two "unknown signature" lines are removed.
  • Not included: sceVoiceSetMuteFlagAll. shadPS4 sets every port's flag, RPCS3 leaves the port flags alone, and VitaSDK describes a process-wide override of what sceVoiceGetMuteFlag reports. With the sources disagreeing, it keeps throwing.
  • Overlap: the open PRs that touch libSceVoice (#8688, #6090, #6044) do not change these two functions.

Tested

Linux: WSL2 Ubuntu 26.04, GCC 15.2.0 (Ubuntu 15.2.0-16ubuntu1), Release. I built the libSceVoice and guest_voice_tests targets and ran ctest -R '^guest_voice$' --output-on-failure --timeout 120: guest_voice passes (1/1) on this branch, which is based on main cd700fe9e.

guest_voice now calls both functions:

  • before sceVoiceInit and again after sceVoiceEnd, expecting 0x804E0801;
  • twice each with an input and an output port open, expecting 0, and checks that sceVoiceGetPortInfo still reports the same type, state and frame size while all ports are paused.

I did not run the test against main. There, both functions call NotImplemented_nid_no_patch, so the first new call would end the test with that exception.

tools/check_conventions.py --base origin/main passes. tools/progress.py --module libSceVoice: done goes from 23 to 25, and the only newly done functions are these two.

Windows: not built. No title was run.

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4945761411 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8852). Originally posted by [nikowolf123](https://github.com/nikowolf123) on 2026-10-21T03:07:16Z. --- ### What `sceVoicePausePortAll` and `sceVoiceResumePortAll` threw `not implemented`. Both now take no arguments and return `0x804E0801` while the library is not initialized, and 0 otherwise. They change no state that any other call reports, like `sceVoicePausePort` and `sceVoiceResumePort` on `main`. - Behaviour and error code: shadPS4's PS4 [`sceVoicePausePortAll` / `sceVoiceResumePortAll`](https://github.com/shadps4-emu/shadPS4/blob/c1b26558352b863f80142256e4df38585aa7d727/src/core/libraries/voice/voice.cpp#L356-L437) check only that the library is initialized and return `ORBIS_VOICE_ERROR_NOT_INIT`, which its [`voice_error.h`](https://github.com/shadps4-emu/shadPS4/blob/c1b26558352b863f80142256e4df38585aa7d727/src/core/libraries/voice/voice_error.h) defines as `0x804E0801`. That is the code `VoiceErrorNotInitialized` already returns for `sceVoiceStart`, `sceVoiceCreatePort` and `sceVoiceGetPortInfo`, from prosper. RPCS3's PS3 [`cellVoicePausePortAll` / `cellVoiceResumePortAll`](https://github.com/RPCS3/rpcs3/blob/be69c054eeac57e2e671697a463473d37fe5a7b2/rpcs3/Emu/Cell/Modules/cellVoice.cpp#L462-L543) make the same single check. - Why nothing else changes: [VitaSDK](https://github.com/vitasdk/vita-headers/blob/ae5808f3105c42fa3373ba4ab64ab54e2e3ca848/include/psp2/voice.h#L540-L557) documents that pausing every port keeps the buffered data and the reported port state. Nothing in this library processes port data, so there is nothing to stop or restart. This is the same reasoning the existing `sceVoicePausePort` debt entry gives. - Unverified on a PS5: the console's behaviour, recorded in `docs/dev/debt/libSceVoice.md` in a new entry next to the `sceVoicePausePort, sceVoiceResumePort` one. The two "unknown signature" lines are removed. - Not included: `sceVoiceSetMuteFlagAll`. shadPS4 sets every port's flag, RPCS3 leaves the port flags alone, and VitaSDK describes a process-wide override of what `sceVoiceGetMuteFlag` reports. With the sources disagreeing, it keeps throwing. - Overlap: the open PRs that touch `libSceVoice` (#8688, #6090, #6044) do not change these two functions. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Linux: WSL2 Ubuntu 26.04, GCC 15.2.0 (Ubuntu 15.2.0-16ubuntu1), Release. I built the `libSceVoice` and `guest_voice_tests` targets and ran `ctest -R '^guest_voice$' --output-on-failure --timeout 120`: `guest_voice` passes (1/1) on this branch, which is based on `main` cd700fe9e. `guest_voice` now calls both functions: - before `sceVoiceInit` and again after `sceVoiceEnd`, expecting `0x804E0801`; - twice each with an input and an output port open, expecting 0, and checks that `sceVoiceGetPortInfo` still reports the same type, state and frame size while all ports are paused. I did not run the test against `main`. There, both functions call `NotImplemented_nid_no_patch`, so the first new call would end the test with that exception. `tools/check_conventions.py --base origin/main` passes. `tools/progress.py --module libSceVoice`: done goes from 23 to 25, and the only newly done functions are these two. Windows: not built. No title was run. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-21 03:07:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T03:07:58Z.


Progress report (a683688 → cfb371d)

📈 System libraries: 62.15% (+0.03%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceVoice sceVoicePausePortAll
libSceVoice sceVoiceResumePortAll
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6307033918 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8852#issuecomment-6307033918). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T03:07:58Z. --- <!-- progress-report --> ### Progress report (a683688 → cfb371d) 📈 **System libraries**: 62.15% (+0.03%, +2 implemented functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | libSceVoice | `sceVoicePausePortAll` | | libSceVoice | `sceVoiceResumePortAll` | </details>
github-actions[bot] commented 2026-10-21 03:22:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T03:22:13Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8989 docs/dev/debt/libSceVoice.md L13, L21-25

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestVoice.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6307218473 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8852#issuecomment-6307218473). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T03:22:13Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 8989](https://www.github.com/boykopovar/AnyPS5/pull/8989) | `docs/dev/debt/libSceVoice.md` [L13](https://github.com/boykopovar/AnyPS5/blob/b6fe513b9abbfe78d6a9fed442113538fa75939c/docs/dev/debt/libSceVoice.md#L13), [L21-25](https://github.com/boykopovar/AnyPS5/blob/b6fe513b9abbfe78d6a9fed442113538fa75939c/docs/dev/debt/libSceVoice.md#L21-L25) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestVoice.cpp` |
MarcZX10 commented 2026-10-21 03:23:57 +00:00 (Migrated from github.com)

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

Review: APPROVED


The implementation follows the available references: shadPS4 and RPCS3 both return the not-initialized error before success, and VitaSDK documents that pausing all ports retains buffered data and the reported state. The implementation matches the library's existing lock and initialization model, and the regression checks both pre-init behavior and idempotent calls with live ports. The PR reports a Linux guest_voice pass; hosted runtime jobs are skipped, so I did not independently reproduce that test here. I found no correctness issue in this diff.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5594590922 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8852#pullrequestreview-5594590922). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T03:23:57Z. **Review:** APPROVED --- The implementation follows the available references: shadPS4 and RPCS3 both return the not-initialized error before success, and VitaSDK documents that pausing all ports retains buffered data and the reported state. The implementation matches the library's existing lock and initialization model, and the regression checks both pre-init behavior and idempotent calls with live ports. The PR reports a Linux guest_voice pass; hosted runtime jobs are skipped, so I did not independently reproduce that test here. I found no correctness issue in this diff.
ycbuzi commented 2026-10-21 06:58:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-21T06:58:17Z.


Windows run of cfb371d5e1 merged onto main ec7eacc62d (3e7bd33b01, clean), the build the description lists as not done. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, BUILD_TESTING=ON.

Built libSceVoice and guest_voice_tests with no errors or warnings; ctest --repeat until-fail:2 on guest_voice: passes on both repeats. Not run: the negative control against main's library, a title.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310057975 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8852#issuecomment-6310057975). Originally posted by [ycbuzi](https://github.com/ycbuzi) on 2026-10-21T06:58:17Z. --- Windows run of cfb371d5e1 merged onto `main` ec7eacc62d (3e7bd33b01, clean), the build the description lists as not done. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, `BUILD_TESTING=ON`. Built `libSceVoice` and `guest_voice_tests` with no errors or warnings; `ctest --repeat until-fail:2` on `guest_voice`: passes on both repeats. Not run: the negative control against `main`'s library, a title.
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!8852
No description provided.