feat(libSceAudioOut): support mastering InitEx flags #9349

Merged
MarcZX10 merged 1 commit from upstream-pr/9349 into main 2026-10-22 23:57:52 +00:00
MarcZX10 commented 2026-10-21 19:05:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T19:05:30Z.


What

Implements sceAudioOut2MasteringInitEx with its observed one-uint32_t flag argument and the shared Init/InitEx validation described in #9027's analysis of the decrypted PS5 12.00 libSceAudioOut: only bit 31 is accepted. The mode is not applied because this implementation has no mastering stage. Other firmware versions are unverified.

Moves the export from the unknown-signature throwing stubs into AudioOut2Mastering.cpp, adds accepted and rejected flag-mask regressions, and updates the technical-debt entry.

Tested

python3 tools/check_conventions.py --base upstream/main passes; git diff --check passes. The PR overlap tool stalled while checking the repository's 997 open PRs, so the focused open-PR search checked exact InitEx names and mastering-related PRs #8525 and #9027; neither changes this export.

A full CMake configure was attempted with Ninja, Release, testing enabled and bundled dependencies. It stopped because the SDL2 submodule lacks CMakeLists.txt and the host lacks XRandR development support, so audio_out2_latency could not be built or run here. No PS5 runtime test was performed.

Checklist

  • Based on current main; no competing PR for this export found
  • One topic per PR
  • No code comments added
  • Unsupported flag bits throw rather than being silently accepted
  • No investigation files or generated artifacts added
  • No third-party code added
  • Generic behavior, not title-specific
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4956888525 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9349). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T19:05:30Z. --- ### What Implements `sceAudioOut2MasteringInitEx` with its observed one-`uint32_t` flag argument and the shared Init/InitEx validation described in #9027's analysis of the decrypted PS5 12.00 `libSceAudioOut`: only bit 31 is accepted. The mode is not applied because this implementation has no mastering stage. Other firmware versions are unverified. Moves the export from the unknown-signature throwing stubs into `AudioOut2Mastering.cpp`, adds accepted and rejected flag-mask regressions, and updates the technical-debt entry. ### Tested `python3 tools/check_conventions.py --base upstream/main` passes; `git diff --check` passes. The PR overlap tool stalled while checking the repository's 997 open PRs, so the focused open-PR search checked exact InitEx names and mastering-related PRs #8525 and #9027; neither changes this export. A full CMake configure was attempted with Ninja, Release, testing enabled and bundled dependencies. It stopped because the SDL2 submodule lacks `CMakeLists.txt` and the host lacks XRandR development support, so `audio_out2_latency` could not be built or run here. No PS5 runtime test was performed. ### Checklist - [x] Based on current `main`; no competing PR for this export found - [x] One topic per PR - [x] No code comments added - [x] Unsupported flag bits throw rather than being silently accepted - [x] No investigation files or generated artifacts added - [x] No third-party code added - [x] Generic behavior, not title-specific - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
xXPBSXx commented 2026-10-21 20:41:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T20:41:28Z.


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 main is clean. I built only audio_out2_latency_tests; ctest -N -R audio_out2_latency lists exactly one test.

PR head tested: 023139d12ce4aa15935e7bd8e3178964977e4224.

Results (3 runs each):

  • PR head: audio_out2_latency passes 3/3.
  • Baseline: I kept the PR's test and replaced only these production files: core/libs/prx/libSceAudioOut/src/AudioOut2Mastering.cpp, core/libs/prx/libSceAudioOut/src/Unimplemented.cpp with the version from the PR's merge base (3d29fe0825), then rebuilt. The test fails 3/3 (exit 0xc0000409). I restored the PR's files afterwards.

GPU: the run output has no Selected GPU line; no GPU claim is made.

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).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6326088231 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9349#issuecomment-6326088231). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T20:41:28Z. --- 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 `main` is clean. I built only `audio_out2_latency_tests`; `ctest -N -R audio_out2_latency` lists exactly one test. **PR head tested:** `023139d12ce4aa15935e7bd8e3178964977e4224`. **Results (3 runs each):** - PR head: `audio_out2_latency` passes 3/3. - Baseline: I kept the PR's test and replaced only these production files: `core/libs/prx/libSceAudioOut/src/AudioOut2Mastering.cpp`, `core/libs/prx/libSceAudioOut/src/Unimplemented.cpp` with the version from the PR's merge base (`3d29fe0825`), then rebuilt. The test fails 3/3 (exit 0xc0000409). I restored the PR's files afterwards. **GPU:** the run output has no `Selected GPU` line; no GPU claim is made. **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).
harisibrar1 commented 2026-10-22 13:40:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-22T13:40:02Z.

Review: COMMENTED


Checked against main 8b3e39832a, shadPS4 c1b26558 (audioout.cpp) and ps5-payload-dev/sdk a7685ce8:

  • Main still has the throwing sceAudioOut2MasteringInitEx(void) in Unimplemented.cpp:368, and this merges cleanly with 8b3e39832a.
  • This looks like a subset of #9027. That PR is still open, implements the same export with the same bit-31 rule from the same 12.00 module analysis this PR cites, and also tracks the initialised state. The two conflict in AudioOut2Latency.cpp and the debt entry, so only one can land as-is. Could the checklist line saying there is no competing PR be updated, and could you coordinate with @hypermoist on whether to close this in favour of #9027?
  • By #9027's description, other bits return 0x80268201, and an already-initialised stage returns 0 before the flags are checked. Throwing here is the safe direction, but it differs from the documented console result.
  • Neither shadPS4 nor the payload SDK has a signature or flag semantics for this export, so #9027's module reading is the only source. The debt entry saying bit 31's mode is not applied is accurate.

Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5615135959 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9349#pullrequestreview-5615135959). Originally posted by [harisibrar1](https://github.com/harisibrar1) on 2026-10-22T13:40:02Z. **Review:** COMMENTED --- Checked against main 8b3e39832a, shadPS4 c1b26558 (`audioout.cpp`) and ps5-payload-dev/sdk a7685ce8: - Main still has the throwing `sceAudioOut2MasteringInitEx(void)` in `Unimplemented.cpp:368`, and this merges cleanly with 8b3e39832a. - This looks like a subset of #9027. That PR is still open, implements the same export with the same bit-31 rule from the same 12.00 module analysis this PR cites, and also tracks the initialised state. The two conflict in `AudioOut2Latency.cpp` and the debt entry, so only one can land as-is. Could the checklist line saying there is no competing PR be updated, and could you coordinate with @hypermoist on whether to close this in favour of #9027? - By #9027's description, other bits return `0x80268201`, and an already-initialised stage returns 0 before the flags are checked. Throwing here is the safe direction, but it differs from the documented console result. - Neither shadPS4 nor the payload SDK has a signature or flag semantics for this export, so #9027's module reading is the only source. The debt entry saying bit 31's mode is not applied is accurate. Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
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!9349
No description provided.