Repository navigation
feat(libSceVoiceQoS): keep connection attributes and read stored attributes back - #8656
nikowolf123 wants to merge 1 commit into
Conversation
|
Windows run of d81593d merged onto Built |
…ibutes back sceVoiceQoSSetConnectionAttribute threw "not implemented". It now stores the attribute through the locked SetAttribute helper that the endpoint setters use, and each connection keeps its own attributes from sceVoiceQoSConnect until sceVoiceQoSDisconnect or sceVoiceQoSEnd. As for the endpoint setters, an unknown id or a null value returns 0x804E0902, a non-positive size clears the attribute, and the call returns 0x804E0901 before sceVoiceQoSInit. sceVoiceQoSGetRemoteEndpointAttribute and sceVoiceQoSGetConnectionAttribute now read back what sceVoiceQoSSetRemoteEndpointAttribute and sceVoiceQoSSetConnectionAttribute stored, through the GetAttribute helper of sceVoiceQoSGetLocalEndpointAttribute: at most size bytes are copied and the rest of the buffer is zero-filled, an unknown id, a null value or a non-positive size returns 0x804E0902, and 0x804E0901 comes before sceVoiceQoSInit. What the console reports for an attribute that was never set or was cleared is unknown, so for it both getters still call NotImplemented_nid_no_patch without writing the buffer; the local getter keeps its zero-fill. The signatures are the PS4 SDK prototypes in Orbital's tools/ida/db_types.json (lines 2436, 2440 and 2444 at b321fcd), which mark the remote getter's value pointer const; it receives the attribute here, as in the local getter. The unknowns are recorded in the library's debt file. GuestVoiceQoS checks that both getters report not implemented under their own names for an attribute never set or cleared and leave the buffer untouched, that their argument errors come first, a remote attribute read back, a short and a long read of a connection attribute, that a second connection between the same endpoints keeps its own attributes, every error path with the output left untouched, that Disconnect, End and deleting the remote endpoint drop the attributes, and the not-initialized result after End. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d81593d to
8e2de02
Compare
|
Cross-checked these against a decrypted Local endpoint ( Remote endpoint (set @0x1300, get @0x13b0): Connection (get @0x1980, set @0x1660): |
|
@nikowolf123 I checked akkadbakkad89’s firmware 4.03 report against 8e2de02. It changes my assessment: the generic byte-map behavior is broader than the reported API. Connection attributes are reported as IDs 4 and 9 with size 4; the remote surface is attribute 7 with size 1. The current code accepts arbitrary IDs and sizes, and the tests require remote attribute 3 plus partial or oversized connection reads to succeed. Please reconcile those paths with the reported typed validation, preserve unsupported voice-port behavior where its semantics are still unknown, and replace the generic round-trip assumptions with supported typed cases and invalid-argument checks. Please also remove the new ReportsNotImplemented assertions that pin unset attributes to an unimplemented throw. Current main already contains typed local/remote validation, so the rebase should retain it and its debt rather than restoring the old generic setters. I have not independently run the firmware module; the report is the new evidence being checked here. |
|
@nikowolf123 This PR now conflicts with main in |
|
Heads-up on overlap: #14277 implements |
|
Thank you for your work on this. Main has moved, and the PR now conflicts in:
Could you merge current Thank you! |
|
@nikowolf123 I read 8e2de02. Removing the SetConnectionAttribute stub is wanted, since PPSA04159 imports it and fails to load without it. The generic byte store is the part I would change. The branch now conflicts with main in Export.cpp, tests/GuestVoiceQoS.cpp and docs/dev/debt/libSceVoiceQoS.md. Main rewrote the model (typed local setter, endpointLimit, declarations in Api.hpp) and this PR is built on the removed std::map store, so it needs a real rebase onto main's guards. @akkadbakkad89's firmware 4.03 report shows the console accepts only connection attributes 4 and 9 at size 4, and remote attribute 7 at size 1. Please accept exactly those, return ARGUMENT_INVALID otherwise, keep unsupported voice port paths throwing, and drop the arbitrary size tests and the ReportsNotImplemented asserts. Update the debt doc to match. I will review the new head. |
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
The change adds per connection attributes and reads back stored remote and connection attributes at head 8e2de02b9ad8cc1458b3b00ca6d9346f37c549f3; no concrete defect was verified, though behavior remains unverified on console hardware.
What I ran
No commands or tests were run. I read the prepared diff and changed files through repo_read.py.
Results
| Check | Result | Note |
|---|---|---|
| Source review | passed | Changed implementation and tests read |
| Build and tests | not run | Only author reported results are available |
| Console behavior | not run | No title or console run was reported |
Negative control
Not run by this review. The description reports that the updated test file aborts against the main library, but that result was not independently checked.
Findings
Blocking
None verified.
Non-blocking
- The pointer signature for
sceVoiceQoSGetRemoteEndpointAttributediffers from the cited PS4 SDK prototype, and console behavior is not verified. The PR documents the inference that the pointer is an output, following the local getter. Retain that limitation until validated against console behavior. Changed lines:core/libs/prx/libSceVoiceQoS/Export.cpp:196.
Sources
- Changed implementation:
core/libs/prx/libSceVoiceQoS/Export.cpp. - Changed tests:
core/libs/tests/GuestVoiceQoS.cpp. - Changed behavior notes:
docs/dev/debt/libSceVoiceQoS.md.
Not verified
- Build, tests, Windows, and PS5 console behavior were not run in this review. The description reports Linux build and test success, but that is author supplied.
- Read all three changed files listed as reviewed in
manifest.json. No files were excluded (files.jsonwas not present in the prepared material read here).
To get this to a good state
Nothing is required. The pointer direction and unset attribute behavior remain documented as unverified on hardware.
|
Superseded: 35e7ddd on main implements the connection attributes from the PS4 module, and the remote endpoint setter this getter read back no longer stores anything. |
What
sceVoiceQoSSetConnectionAttributethrewnot implemented. It now stores attributes per connection through the lockedSetAttributehelper thatsceVoiceQoSSetLocalEndpointAttributeandsceVoiceQoSSetRemoteEndpointAttributeuse.sceVoiceQoSGetRemoteEndpointAttributeandsceVoiceQoSGetConnectionAttribute, which threw for every call, now read back what the two setters stored, through theGetAttributehelper ofsceVoiceQoSGetLocalEndpointAttribute; for an attribute that was never set or was cleared they still throw.sceVoiceQoSSetConnectionAttribute(connectionId, attributeId, value, size)storessizebytes fromvaluefor that connection. A non-positive size clears the attribute and returns 0, as the endpoint setters do.sceVoiceQoSGetRemoteEndpointAttribute(remoteId, attributeId, value, size)andsceVoiceQoSGetConnectionAttribute(connectionId, attributeId, value, size)copy at mostsizebytes of a stored attribute and zero-fill the rest of the buffer, as the local getter does.NotImplemented_nid_no_patch(__func__)once the library lock is released, because what the console reports there is unknown. A newGetStoredAttributehelper reads throughGetAttributebut reports an unset attribute instead of zero-filling, soGetAttributeandsceVoiceQoSGetLocalEndpointAttribute, which reads such an attribute as zeros since feat(libSceVoiceQoS): implement packet and local endpoint attribute functions to unblock Aliens: Fireteam Elite #7727, are unchanged.0x804E0901(not initialized) beforesceVoiceQoSInitand aftersceVoiceQoSEnd;0x804E0902(ARGUMENT_INVALID) for an unknown id or a nullvalue, and from a getter also forsize <= 0. A getter checks these before it looks at the attribute, so they are also returned for an unset attribute. No output is written on an error.sceVoiceQoSConnectstarts them empty;sceVoiceQoSDisconnectandsceVoiceQoSEnddrop them. Deleting a remote endpoint drops its attributes, as before.Why the getters stay partly unimplemented: #7321 kept them as throwing stubs because "endpoint and connection attribute storage is unverified on hardware", and AGENTS.md forbids a made-up success. This PR keeps the read it has no source for, the value of an attribute nobody stored, on
NotImplemented_nid_no_patch. It only reads back what the library's own setters stored, with the storage model that the merged setters (#6026, #7231) andGetAttribute(#7727) already use.tools/progress.pytherefore counts onlysceVoiceQoSSetConnectionAttributeas newly done.Sources:
db_types.jsonL2436-L2444 (GetConnectionAttributeL2436,GetRemoteEndpointAttributeL2440,SetConnectionAttributeL2444). TheGetRemoteEndpointAttributeprototype declares its value pointerconst; here that pointer receives the attribute, as insceVoiceQoSGetLocalEndpointAttribute; no cited source has a non-constversion of this call. RPCS3's PS VitaSceVoiceQoSmodule has no remote endpoint attribute calls; it declares the same two connection calls (connectionId, attributeId, value, size), with a non-constpointer for the getter (sceVoiceQoS.cppL69-L77; the module was later removed from RPCS3).SetAttributefrom feat(libSceVoiceQoS): implement endpoints and connections to unblock #6026 (used for remote endpoints since feat(libSceVoiceQoS): implement sceVoiceQoSSetRemoteEndpointAttribute #7231) andGetAttributefrom feat(libSceVoiceQoS): implement packet and local endpoint attribute functions to unblock Aliens: Fireteam Elite #7727.Unverified, recorded in a new Functional entry in
docs/dev/debt/libSceVoiceQoS.md: what the console reports for an attribute that was never set or was cleared (both getters throw there), which attribute ids it accepts on each object (any id is accepted here; in RPCS3's PS Vita enumeration id 4 isDESIRED_OUT_BIT_RATE), whether it checks a value or its size, and how it reads a stored attribute into a buffer of another size. Nothing here was measured on a PS5, and this PR names no title that makes these three calls. PPSA04159 importssceVoiceQoSSetConnectionAttribute, which is why #4314 exported it as a stub; no call to it is known, soUnblocksstays none.Other debt edits: the
sceVoiceQoSSetConnectionAttributeentry (throwing stub, signature unknown) is removed. The firmware exports entry is cut tosceVoiceQoSGetStatusand the six parameterless calls; its sentence that the two getters "remain throwing stubs as endpoint and connection attribute storage is unverified on hardware" goes with them, and the new entry records what is still unverified and which reads still throw. In thesceVoiceQoSInitentry, Aliens: Fireteam Elite (PPSA03393) now "uses the calls named above" instead of "all implemented calls", because that wording would now include the calls changed here.Open #6044 renames
core/libs/tests/GuestVoiceQoS.cpptocore/libs/tests/media/GuestVoiceQoS.cpp; whichever of the two lands second rebases.Tested
BUILD_TESTING=ON. Built thelibSceVoiceQoSandguest_voice_qos_teststargets;ctest -R '^guest_voice_qos'runsguest_voice_qosandguest_voice_qos_app_type_0x10000000, and both pass, also at 8e2de02 onmain2c4b116.GuestVoiceQoS.cppnow checks: both getters throw<function name> not implementedfor an attribute never set and for one cleared by a non-positive size, without writing the buffer; their argument errors (nullvalue, size 0, size -1, unknown id) return0x804E0902with the output left untouched while the attribute is unset; a remote attribute read back, and the error after the remote endpoint is deleted; a 2-byte read of a connection attribute that leaves the rest of the buffer alone and an 8-byte read that zero-fills it; a second connection between the same endpoints that starts unset, reads back its own value and leaves the first one's unchanged; both connection calls failing aftersceVoiceQoSDisconnect; the setter's nullvalueand unknown-id errors, size 0 clearing the attribute and size -1 accepted; aftersceVoiceQoSEnd, the three calls return0x804E0901without writing, and a connection attribute set beforesceVoiceQoSEndis gone after a newsceVoiceQoSInit. These replace the twoNotImplementedchecks for the remote and connection getters.main's library (main2185dbf plus only thisGuestVoiceQoS.cpp): both tests abort withwhat(): sceVoiceQoSGetRemoteEndpointAttribute not implemented.tools/check_conventions.py --base origin/main: 0 errors and onedebt-lengthwarning for thesceVoiceQoSInitentry, which is 1702 characters, as onmain; this PR changes one phrase in it. The new entry is 982 characters.tools/progress.py --module libSceVoiceQoS: 16 of 25 functions done (15 onmain);sceVoiceQoSSetConnectionAttributeis the new one.sceVoiceQoSGetRemoteEndpointAttributeandsceVoiceQoSGetConnectionAttributestay todo, because their unset path callsNotImplemented_nid_no_patch.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code