Repository navigation
fix(libSceAudioOut): track mastering initialization as the console does - #9027
Conversation
The PS5 module keeps one mastering-initialized flag. A repeated initialization returns 0 before the flags are checked; otherwise sceAudioOut2MasteringInit accepts only 0 and sceAudioOut2MasteringInitEx also bit 31, and other flags return 0x80268201. Term, GetState and SetParam return 0x80268203 before initialization, GetState returns 0x8026800C for a null state and SetParam 0x80268205 for flags above 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
|
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.
|
|
Linux data point for
|
|
Independent Windows run of this PR (data only). Environment: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Merge-tree of the PR head against PR head tested: Results (3 runs each):
GPU: the run output has no Not run: other platforms, the other tests in the same family, the full repository CTest, and any title or console run. AI-assisted (Claude Code). |
|
Hi — MarcZX10's review on my #9541 found that both PRs touch |
…ring-state # Conflicts: # docs/dev/debt/libSceAudioOut.md
|
@xdCloudy agreed: #9027 first, then #9541 rebased on top. I've merged |
…ring-state Keep the shared Init/InitEx validation over the InitEx body from boykopovar#9349. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SNqSvnFwRBz3D76n476yw6
|
Merged current What conflicted. #9349 (@MarcZX10) landed an
How I resolved it.
The description now says what Tests on the merge: Overlap: #9818 and #9826 only change how Init's non-zero-flag path throws, on the line this PR replaces. Whichever lands second takes this PR's version of that line. 🤖 Generated with Claude Code |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed exact current-main head 1cee26eba7766e0db2a3fb9123beacb62db394a3. The shared Init/InitEx routine models the initialized early return, checks distinct Init versus InitEx flag masks, and stores a single initialized state; Term/GetState/SetParam enforce the measured state/error order. Tests now cover pre-init calls, flag ordering, repeat initialization, non-counted Term and SetParam validation. The author reports the focused audio_out2_latency test and NID-patched PRX builds passing on Linux and Windows/Wine after merging current main; all 41 audio_out tests passed on Linux before that refresh, and the refreshed focused suite passed. Local diff-check, conventions and main-sync checks pass (3 ahead/0 behind). Product jobs are skipped by policy. #9818 and #9826 also touch the old Init flag path but request broad unsupported stub changes; their current reviews ask to retain throws. This review considers this evidence-backed implementation independently complete; if either shared-file PR is later revised/merged, preserve these measured semantics during integration. Approval applies to this exact head.
…ioOut2Initialize The PS5 module read for #9027 returns 0x80268006 from sceAudioOut2MasteringInit, sceAudioOut2MasteringInitEx, sceAudioOut2MasteringTerm, sceAudioOut2MasteringGetState and sceAudioOut2MasteringSetParam before sceAudioOut2Initialize. #9027 left the check out because AudioOut2 initialization was not tracked; AudioOut2IsInitialized_nid_no_patch now tracks it, so each of these returns 0x80268006 first, before its own mastering-state and argument checks, and changes no state. The debt entry drops the closed gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
sceAudioOut2MasteringInitthrew for any non-zero flags.sceAudioOut2MasteringInitExaccepts 0 and bit 31 since #9349 and throws for any other flag. This PR replaces that body with the shared Init/InitEx routine below, which returns0x80268201for those flags. Term, GetState and SetParam accepted calls in any state. All three of my title dumps importsceAudioOut2MasteringInit(PPSA03671, PPSA08427, PPSA29340).In the decrypted PS5 12.00
libSceAudioOut, both Init exports (XHl38ZNknbs0x22660 and7ukE-Yrzqog0x22650) jump into one routine at 0x22360. InitEx passes a flag that lets bit 31 through. The module keeps one mastering-initialized byte. Behaviour, with what this PR reproduces:0x802682010x80268201. Bit 31 is passed to the audio server as a mastering mode (SDK ≥ 3.0)2bbBBOkH4CY0x22690) before Init0x80268203; otherwise clears the flag and returns 0 (no count)VZidxi2cYh00x22da0)0x80268203before Init, checked before the pointer. A null state gives0x8026800C0x80268201beforev8iOE+j8a5o0x228e0)0x80268203before Init. Then0x80268201for a null parameter, then0x80268205for flags above 1The console also returns
0x80268006from all of these beforesceAudioOut2Initialize. This project does not track that initialization, so it is left out and noted in the debt file. The console'soutput/userchecks and its audio-server failures (0x80268000, -1) are not reproduced.The existing debt entry noted that PPSA01289 calls Init twice and then Term twice and only logs a non-zero result. By the module, that second Term gets
0x80268203.audio_out2_latencyasserted that it returns 0, so the test now follows the module.The code is written from the observed behaviour; nothing from the module is copied.
Tested
Linux (CachyOS, GCC, Release).
audio_out2_latencynow checks:All 41
audio_out*tests pass.Each negative control fails the test:
tools/check_conventions.pyis clean. Three-way merges with every open PR that touches these four files add no conflicts (#5021, #5965, #6879, #8098, #8525, #8652, #8693). #8525 implements the legacysceAudioOutMastering*calls in the same files and does not use these functions.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)sceAudioOut2MasteringInit; none was run with this change🤖 Generated with Claude Code
https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK