Skip to content

feat(libSceVoiceQoS): implement endpoints and connections - #4301

Closed
utkuhalis wants to merge 1 commit into
boykopovar:mainfrom
AnyTogether:pr/voiceqos-endpoints
Closed

utkuhalis wants to merge 1 commit into
boykopovar:mainfrom
AnyTogether:pr/voiceqos-endpoints

Conversation

@utkuhalis

@utkuhalis utkuhalis commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

This implements the libSceVoiceQoS endpoint and connection calls, which threw before. They are bookkeeping only: the host has no microphone to encode from and no voice output for received packets.

  • sceVoiceQoSCreateLocalEndpoint(int* id, user, device) and sceVoiceQoSCreateRemoteEndpoint(int* id) hand out new ids.
  • sceVoiceQoSDeleteLocalEndpoint and sceVoiceQoSDeleteRemoteEndpoint remove an endpoint. They refuse an unknown endpoint, and one that a connection still uses.
  • sceVoiceQoSConnect(int* id, local, remote) connects a local endpoint to a remote one. A pair can be connected only once. sceVoiceQoSDisconnect removes the connection.
  • sceVoiceQoSSetLocalEndpointAttribute, sceVoiceQoSSetRemoteEndpointAttribute and sceVoiceQoSGetLocalEndpointAttribute take (id, attribute, value, size). Attributes are stored as given. One can be read back only if it was set before with the same size, because the attribute ids and their defaults are unknown.
  • sceVoiceQoSReadPacket(connection, data, uint32_t* size) never has a packet, so it returns with *size set to 0. sceVoiceQoSWritePacket drops the packet.
  • Every call returns 0x804E0901 (not initialized) outside sceVoiceQoSInit/sceVoiceQoSEnd. Unknown ids and null pointers return ARGUMENT_INVALID (0x804E0902).
  • sceVoiceQoSEnd drops all endpoints and connections.

The signatures are the PS4 libSceVoiceQoS ones and are not confirmed on a PS5 title. That, the not-initialized error for these calls (assumed from the 0x804E09xx numbering) and the attribute handling are recorded in the existing sceVoiceQoSInit/sceVoiceQoSEnd TechnicalDebt entries.

#4183 also touches these functions. It adds the not-initialized result while they keep throwing after initialization. This PR covers that path too, so whichever lands second needs a small rebase.

Tested

  • Checked locally on macOS: tools/check_conventions.py passes, and clang++ -fsyntax-only passes on both changed files with the build's flags.
  • guest_voice_qos_tests (existing executable, extended) covers:
    • create, connect and duplicate-connect;
    • deleting an endpoint that is in use;
    • attribute set and get, including a size mismatch and a never-set attribute;
    • read and write packets;
    • disconnect and delete;
    • every call returning not-initialized after sceVoiceQoSEnd;
    • an id from before an End/Init cycle being rejected.
  • The code comes from my fork, where it is built and the test passes on macOS x86-64 under Rosetta 2. Upstream's libraries do not build on macOS, so Linux and Windows rely on CI.
  • No title-level behaviour was verified on a console.

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

#4183 changes the same stubs in core/libs/prx/libSceVoiceQoS/Export.cpp: it makes them return the not-initialized error before sceVoiceQoSInit. This PR implements the endpoint, connection, attribute and packet calls, and keeps that not-initialized check, so it covers what #4183 adds. The two cannot both merge as they are. If the maintainers prefer #4183 first, I will rebase this PR onto it and list it under Depends on.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Progress report (8c4a295 → 35ac8da)

📈 System libraries: 86.78% (+0.32%, +11 implemented functions)

✅ 11 implemented
Library Name
libSceVoiceQoS sceVoiceQoSConnect
libSceVoiceQoS sceVoiceQoSCreateLocalEndpoint
libSceVoiceQoS sceVoiceQoSCreateRemoteEndpoint
libSceVoiceQoS sceVoiceQoSDeleteLocalEndpoint
libSceVoiceQoS sceVoiceQoSDeleteRemoteEndpoint
libSceVoiceQoS sceVoiceQoSDisconnect
libSceVoiceQoS sceVoiceQoSGetLocalEndpointAttribute
libSceVoiceQoS sceVoiceQoSReadPacket
libSceVoiceQoS sceVoiceQoSSetLocalEndpointAttribute
libSceVoiceQoS sceVoiceQoSSetRemoteEndpointAttribute
libSceVoiceQoS sceVoiceQoSWritePacket

@utkuhalis
utkuhalis force-pushed the pr/voiceqos-endpoints branch from 217c436 to 35ac8da Compare October 12, 2026 07:58
@utkuhalis

Copy link
Copy Markdown
Contributor Author

Rebased onto current main after #4314 was merged. Its sceVoiceQoSSetConnectionAttribute stub and TechnicalDebt line are kept unchanged; this PR still changes only the endpoint, connection and packet calls. tools/check_conventions.py --base upstream/main passes.

@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
#4101 docs/dev/TechnicalDebt.md L692-693

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: no title is shown to reach the endpoint, connection or packet calls on main, and their signatures, the not-initialized result and the attribute handling are assumed from the PS4 library. Reopen with the title ID and the log line when one stops there.

@utkuhalis
utkuhalis deleted the pr/voiceqos-endpoints 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