feat(libSceVoice): implement sceVoiceGetPortAttr #5956

Merged
alexpournaras merged 2 commits from upstream-pr/5956 into main 2026-10-16 21:29:52 +00:00
alexpournaras commented 2026-10-14 17:02:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alexpournaras on 2026-10-14T17:02:40Z.


What

Handle attribute 1001 in sceVoiceGetPortAttr for an existing voice port.

Call of Duty: Black Ops (PPSA34501) requests this attribute during startup after the first intro.

Previously, the call threw:

sceVoiceGetPortAttr: attribute 1001 not implemented

The implementation now:

  • Validates the port and requires a non-null output buffer of size 1.
  • Writes one zero byte and returns 0 (SCE_OK) for attribute 1001.
  • Keeps other attributes unsupported.
  • Adds a guest test covering the fallback, output boundaries, and invalid port handling.
  • Documents the fallback under libSceVoice technical debt.

Attribute 1001 is identified as Voice Activity Detection (VAD) in RPCS3. Its exact PS5 semantics remain unverified. This is a compatibility fallback, not a complete voice implementation.

Tested

Windows 11 Pro, Ryzen 9 9900X, RTX 2060.

  • Without the changes: crashes after intro with the unimplemented attribute log.
  • With the changes: Port with attribute 1001 returns 0 (SCE_OK) on success
  • Build and test results: Build succeeded; All tests passed including guest_voice_port_attr

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: PPSA34501
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4861465886 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5956). Originally posted by [alexpournaras](https://github.com/alexpournaras) on 2026-10-14T17:02:40Z. --- ### What Handle attribute `1001` in `sceVoiceGetPortAttr` for an existing voice port. [Call of Duty: Black Ops (PPSA34501)](https://github.com/boykopovar/AnyPS5/discussions/5389) requests this attribute during startup after the first intro. Previously, the call threw: ``` sceVoiceGetPortAttr: attribute 1001 not implemented ``` The implementation now: - Validates the port and requires a non-null output buffer of size 1. - Writes one zero byte and returns `0` (`SCE_OK`) for attribute `1001`. - Keeps other attributes unsupported. - Adds a guest test covering the fallback, output boundaries, and invalid port handling. - Documents the fallback under `libSceVoice` technical debt. Attribute `1001` is identified as Voice Activity Detection (VAD) in RPCS3. Its exact PS5 semantics remain unverified. This is a compatibility fallback, not a complete voice implementation. ### Tested Windows 11 Pro, Ryzen 9 9900X, RTX 2060. - Without the changes: crashes after intro with the unimplemented attribute log. - With the changes: Port with attribute 1001 returns `0` (`SCE_OK`) on success - Build and test results: Build succeeded; All tests passed including `guest_voice_port_attr` ### 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: none - [x] Unblocks: PPSA34501 - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-14 17:17:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T17:17:49Z.


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 5962 core/libs/CMakeLists.txt L283
PR 6461 docs/dev/debt/libSceVoice.md L2

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 5021 core/libs/CMakeLists.txt
PR 6044 core/libs/CMakeLists.txt
PR 6104 core/libs/CMakeLists.txt
PR 6222 core/libs/CMakeLists.txt
PR 6447 core/libs/prx/libSceVoice/Export.cpp
docs/dev/debt/libSceVoice.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6174091347 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5956#issuecomment-6174091347). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T17:17:49Z. --- <!-- 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 5962](https://www.github.com/boykopovar/AnyPS5/pull/5962) | `core/libs/CMakeLists.txt` [L283](https://github.com/boykopovar/AnyPS5/blob/4986aca62e5984de1a34531648af7c987e40eb5d/core/libs/CMakeLists.txt#L283) | | | | [PR 6461](https://www.github.com/boykopovar/AnyPS5/pull/6461) | `docs/dev/debt/libSceVoice.md` [L2](https://github.com/boykopovar/AnyPS5/blob/4986aca62e5984de1a34531648af7c987e40eb5d/docs/dev/debt/libSceVoice.md#L2) | | | 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 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/CMakeLists.txt` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/CMakeLists.txt` | | [PR 6104](https://www.github.com/boykopovar/AnyPS5/pull/6104) | `core/libs/CMakeLists.txt` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/CMakeLists.txt` | | [PR 6447](https://www.github.com/boykopovar/AnyPS5/pull/6447) | `core/libs/prx/libSceVoice/Export.cpp`<br>`docs/dev/debt/libSceVoice.md` |
milescoviello commented 2026-10-14 22:19:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-14T22:19:50Z.


A second title with the same stop: Call of Duty: Black Ops II (PPSA34502), on Linux (Ubuntu 24.04, RTX 4070 Ti, NVIDIA 595.99.02, GCC 13.3, Release). The base is main fa539dd9b plus a few of my open PRs unrelated to libSceVoice, relinked with --to-intel, under a 15 GiB cap.

  • Without this PR it aborts at 51 s with sceVoiceGetPortAttr: attribute 1001 not implemented, after it has opened its treyarch.bk2 and intro.bk2 videos.
  • With it merged, the title runs the full 180 s, with no further throw or unresolved import.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6179770688 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5956#issuecomment-6179770688). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-14T22:19:50Z. --- A second title with the same stop: Call of Duty: Black Ops II (PPSA34502), on Linux (Ubuntu 24.04, RTX 4070 Ti, NVIDIA 595.99.02, GCC 13.3, Release). The base is `main` fa539dd9b plus a few of my open PRs unrelated to libSceVoice, relinked with `--to-intel`, under a 15 GiB cap. - Without this PR it aborts at 51 s with `sceVoiceGetPortAttr: attribute 1001 not implemented`, after it has opened its `treyarch.bk2` and `intro.bk2` videos. - With it merged, the title runs the full 180 s, with no further throw or unresolved import. AI-assisted: yes
adriadam10 commented 2026-10-16 19:03:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T19:03:28Z.


Checked the build, the voice tests (34 pass, guest_voice_port_attr included) and that the new test fails without the change. Attribute 1001 behaviour matches the PR description, and the debt entry documents the unverified semantics (KytyPS5 returns 1 here; the PR returns 0).

Added one commit: the debt line ended with ; and now ends with a period. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6222694951 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5956#issuecomment-6222694951). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T19:03:28Z. --- Checked the build, the voice tests (34 pass, `guest_voice_port_attr` included) and that the new test fails without the change. Attribute 1001 behaviour matches the PR description, and the debt entry documents the unverified semantics (KytyPS5 returns 1 here; the PR returns 0). Added one commit: the debt line ended with `;` and now ends with a period. Merging once CI is green.
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!5956
No description provided.