Skip to content

feat(libSceVoice): implement sceVoiceResetPort and sceVoiceWriteToIPort - #4302

Closed
utkuhalis wants to merge 1 commit into
boykopovar:mainfrom
AnyTogether:pr/voice-reset-write-iport
Closed

utkuhalis wants to merge 1 commit into
boykopovar:mainfrom
AnyTogether:pr/voice-reset-write-iport

Conversation

@utkuhalis

@utkuhalis utkuhalis commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

  • sceVoiceResetPort(uint32_t port_id) checks that the library is initialized and that the port exists, then returns 0. An uninitialized library or an unknown port throws, as sceVoiceDeletePort does. Ports here buffer nothing and are always READY, so there is nothing to clear; volume, mute flag, bit rate and connections stay as they are.
    • Signature from the PS4 prototype in Orbital; the PS5 export udAxvCePkUs is listed by ps5rs.
    • What a reset does comes from the vitasdk description (clears buffered data, an ACTIVE port becomes IDLE). That the other port settings survive is inferred; RPCS3's cellVoiceResetPort also only validates the port.
  • sceVoiceWriteToIPort accepts data written to a PCM or voice input port and drops it: nothing reaches a host output, so sceVoiceReadFromOPort still reports no data. The size is left as given. A null data or size pointer is an invalid argument; writing to a port that is not a PCM or voice input port throws.

Both assumptions are recorded in docs/dev/TechnicalDebt.md (the write path under silent stubs), and sceVoiceResetPort is removed from the list of PPSA23566 imports without a signature.

The new guest_voice test (registered in a new libSceVoice/CMakeLists.txt, following the other libraries) covers reset before and after init, unknown and deleted ports, settings surviving a reset, and a PCM write followed by an empty read from the connected output port.

Tested

  • The implementation comes from my fork, where it was built and tested on macOS x86-64 under Rosetta 2. Upstream's full build does not compile on macOS.
  • On this branch: check_conventions.py --base upstream/main passes; Export.cpp and GuestVoice.cpp pass clang++ -std=gnu++20 -fsyntax-only; the test, compiled on the host together with libSceVoice/Export.cpp (a small shim standing in for NotImplemented_nid_no_patch), exits 0.
  • Not built or run on Linux or Windows; CI covers those.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes

Overlap

The overlap check lists #3747, #3795, #4089 and #4165 for neighbouring lines in docs/dev/TechnicalDebt.md only. None of them implements sceVoiceResetPort or sceVoiceWriteToIPort, and they share no exports or new files with this PR. Whichever lands first, I will rebase the other side's TechnicalDebt lines.

@github-actions

Copy link
Copy Markdown

Progress report (e013f8c → 99e367b)

📈 System libraries: 86.61% (+0.06%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceVoice sceVoiceResetPort
libSceVoice sceVoiceWriteToIPort

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

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
#3747 docs/dev/TechnicalDebt.md L379-380
#3795 docs/dev/TechnicalDebt.md L379-380
#4089 docs/dev/TechnicalDebt.md L49
#4165 docs/dev/TechnicalDebt.md L103-104
#4326 docs/dev/TechnicalDebt.md L49

@oneandonlydean

oneandonlydean commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Closing: PPSA23566 imports sceVoiceResetPort but no run stops in it or in sceVoiceWriteToIPort, and the write would become a silent drop. Reopen with the log line when a title reaches one.

@utkuhalis
utkuhalis deleted the pr/voice-reset-write-iport branch October 12, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants