feat(libSceAudioOut): implement 13.60 validation gates for AudioOut2 inventory exports #27282

Open
gurtgg wants to merge 1 commit from upstream-pr/27282 into main
gurtgg commented 2026-11-25 18:35:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gurtgg on 2026-11-25T18:35:08Z.


What

  • Update InventoryExports.hpp and InventoryExports.cpp with firmware 13.60-verified parameter lists and deterministic validation gates for sceAudioOut2GetSystemDebugState, sceAudioOut2SetHrtfIdForCronos, sceAudioOut2AssignHRTF, and sceAudioOut2SetTvCorrectionInfo.
  • sceAudioOut2GetSystemDebugState(float*) checks AudioOut2IsInitialized_nid_no_patch() and returns 0x80268006 before initialization.
  • sceAudioOut2SetHrtfIdForCronos(int32_t, int32_t) and sceAudioOut2AssignHRTF(int32_t, int32_t) validate hrtfId (-1, 0x80, 1..5 -> else 0x80268001) before rejecting userId values 0xfe, 0xff, and -1 with 0x80268010.
  • sceAudioOut2SetTvCorrectionInfo(uint32_t, const void*) checks null info (0x8026800c) before mode > 1 (0x80268001).
  • Document the remaining post-gate audio-server IPC / shared-memory stubs in docs/dev/debt/changes/feat-audioout-inventory-1360.md.

Tested

  • Added TestInventoryExportValidationGates to core/libs/prx/libSceAudioOut/tests/AudioOut2PortBuffers.cpp (audio_out2_port_buffers_tests), exercising pre-init, null-pointer, invalid-argument, invalid-user, and validation precedence behavior across all four exports.

  • Negative control: unpatched InventoryExports.cpp aborts via NotImplemented_nid_no_patch on every assertion in TestInventoryExportValidationGates.

  • Local Windows Ninja/GCC 15.2.0 Release build (libSceAudioOut, audio_out2_port_buffers_tests, audio_out2_timing_tests, guest_audio_out_tests, guest_audio_out2_latency_attributes_bounds_tests) + ctest passed (4/4 in 8.10s total); signature negative control fails to compile against origin/main headers; tools/check_conventions.py passed.

Checklist

  • tools/check_conventions.py rules verified (zero added C++ comments, UTF-8 LF, Conventional Commit title)
  • AI-assisted: yes
  • Depends on: none
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5496996850 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27282). Originally posted by [gurtgg](https://github.com/gurtgg) on 2026-11-25T18:35:08Z. --- ### What - Update `InventoryExports.hpp` and `InventoryExports.cpp` with firmware 13.60-verified parameter lists and deterministic validation gates for `sceAudioOut2GetSystemDebugState`, `sceAudioOut2SetHrtfIdForCronos`, `sceAudioOut2AssignHRTF`, and `sceAudioOut2SetTvCorrectionInfo`. - `sceAudioOut2GetSystemDebugState(float*)` checks `AudioOut2IsInitialized_nid_no_patch()` and returns `0x80268006` before initialization. - `sceAudioOut2SetHrtfIdForCronos(int32_t, int32_t)` and `sceAudioOut2AssignHRTF(int32_t, int32_t)` validate `hrtfId` (`-1`, `0x80`, `1..5` -> else `0x80268001`) before rejecting `userId` values `0xfe`, `0xff`, and `-1` with `0x80268010`. - `sceAudioOut2SetTvCorrectionInfo(uint32_t, const void*)` checks null `info` (`0x8026800c`) before `mode > 1` (`0x80268001`). - Document the remaining post-gate audio-server IPC / shared-memory stubs in `docs/dev/debt/changes/feat-audioout-inventory-1360.md`. ### Tested - Added `TestInventoryExportValidationGates` to `core/libs/prx/libSceAudioOut/tests/AudioOut2PortBuffers.cpp` (`audio_out2_port_buffers_tests`), exercising pre-init, null-pointer, invalid-argument, invalid-user, and validation precedence behavior across all four exports. - Negative control: unpatched `InventoryExports.cpp` aborts via `NotImplemented_nid_no_patch` on every assertion in `TestInventoryExportValidationGates`. - Local Windows Ninja/GCC 15.2.0 Release build (`libSceAudioOut`, `audio_out2_port_buffers_tests`, `audio_out2_timing_tests`, `guest_audio_out_tests`, `guest_audio_out2_latency_attributes_bounds_tests`) + `ctest` passed (4/4 in 8.10s total); signature negative control fails to compile against `origin/main` headers; `tools/check_conventions.py` passed. ### Checklist - [x] `tools/check_conventions.py` rules verified (zero added C++ comments, UTF-8 LF, Conventional Commit title) - [x] AI-assisted: yes - [x] Depends on: none
MarcZX10 commented 2026-11-25 18:50:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T18:50:29Z.

Review: APPROVED


Reviewed — looks good

The reviewed change at 462d51ee0c95159fd80855eb6effb79ad355f7be adds validation gates for four AudioOut2 exports; no verified blocking defects were found in the changed code inspected.

What I ran

No build or tests were run. I read the prepared diff and changed files through repo_read.py, and checked the initialization helper used by the new gate. The author reports adding tests and running a negative control; those runs were not independently verified.

Results

Check Result Note
Changed-file review passed All listed changed files read
Build and tests not run Author-reported test runs not verified
Negative control not run Author reports it failed as expected

Findings

Blocking

None.

Non-blocking

None.

Not verified

files.json was unavailable through the reader, so excluded files and the reviewed-versus-excluded inventory could not be confirmed. No build, test, firmware, or physical-console behavior was independently checked. The author’s firmware disassembly evidence and reported negative control were not independently verified.

Files read: core/libs/prx/libSceAudioOut/include/InventoryExports.hpp, core/libs/prx/libSceAudioOut/src/InventoryExports.cpp, core/libs/prx/libSceAudioOut/tests/AudioOut2PortBuffers.cpp, docs/dev/debt/changes/feat-audioout-inventory-1360.md, and core/libs/prx/libSceAudioOut/src/AudioOut.cpp (initialization helper). The complete contents for all changed files were provided in the prepared bundle; no changed files were excluded in the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6063193480 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27282#pullrequestreview-6063193480). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T18:50:29Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change at `462d51ee0c95159fd80855eb6effb79ad355f7be` adds validation gates for four AudioOut2 exports; no verified blocking defects were found in the changed code inspected. ## What I ran No build or tests were run. I read the prepared diff and changed files through `repo_read.py`, and checked the initialization helper used by the new gate. The author reports adding tests and running a negative control; those runs were not independently verified. ## Results | Check | Result | Note | |---|---|---| | Changed-file review | passed | All listed changed files read | | Build and tests | not run | Author-reported test runs not verified | | Negative control | not run | Author reports it failed as expected | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified `files.json` was unavailable through the reader, so excluded files and the reviewed-versus-excluded inventory could not be confirmed. No build, test, firmware, or physical-console behavior was independently checked. The author’s firmware disassembly evidence and reported negative control were not independently verified. Files read: `core/libs/prx/libSceAudioOut/include/InventoryExports.hpp`, `core/libs/prx/libSceAudioOut/src/InventoryExports.cpp`, `core/libs/prx/libSceAudioOut/tests/AudioOut2PortBuffers.cpp`, `docs/dev/debt/changes/feat-audioout-inventory-1360.md`, and `core/libs/prx/libSceAudioOut/src/AudioOut.cpp` (initialization helper). The complete contents for all changed files were provided in the prepared bundle; no changed files were excluded in the manifest. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-25 20:48:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T20:48:57Z.

Review: APPROVED


Reviewed — looks good

The changed validation gates match the stated argument and error precedence; I reviewed all four changed files at head 320b3a170f57c57a26fa9778bd7cfa664a1e0d6f.

What I ran

Read the prepared diff and all changed files, plus the initialization-state implementation and declaration. No build or tests were run in this review; reported build and test results are author-provided.

Results

Check Result Note
Changed-file review passed All four changed files read
Build and tests not run Results in description are author-reported
Negative control not run Could not independently reproduce

Findings

Blocking

None.

Non-blocking

None.

Not verified

Firmware 13.60 disassembly claims, physical-console behavior, and the author-reported Windows build, test, signature negative-control, and convention-check results were not independently verified. No files were excluded from review.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6064787737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27282#pullrequestreview-6064787737). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T20:48:57Z. **Review:** APPROVED --- # Reviewed — looks good The changed validation gates match the stated argument and error precedence; I reviewed all four changed files at head `320b3a170f57c57a26fa9778bd7cfa664a1e0d6f`. ## What I ran Read the prepared diff and all changed files, plus the initialization-state implementation and declaration. No build or tests were run in this review; reported build and test results are author-provided. ## Results | Check | Result | Note | |---|---|---| | Changed-file review | passed | All four changed files read | | Build and tests | not run | Results in description are author-reported | | Negative control | not run | Could not independently reproduce | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Firmware 13.60 disassembly claims, physical-console behavior, and the author-reported Windows build, test, signature negative-control, and convention-check results were not independently verified. No files were excluded from review. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 11:17:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T11:17:29Z.

Review: COMMENTED


Ran the submitted audio_out2_port_buffers CTest on Linux. It passed, including the new invalid-pointer, user and parameter cases for the AudioOut2 exports. I checked the debt entries that record where valid calls still require implementation.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6168680921 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27282#pullrequestreview-6168680921). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T11:17:29Z. **Review:** COMMENTED --- Ran the submitted `audio_out2_port_buffers` CTest on Linux. It passed, including the new invalid-pointer, user and parameter cases for the AudioOut2 exports. I checked the debt entries that record where valid calls still require implementation. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/27282:upstream-pr/27282'
git switch 'upstream-pr/27282'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/27282'
git switch 'upstream-pr/27282'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/27282'
git switch 'upstream-pr/27282'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/27282'
git switch 'main'
git merge --squash 'upstream-pr/27282'
git switch 'main'
git merge --ff-only 'upstream-pr/27282'
git switch 'main'
git merge 'upstream-pr/27282'
git push origin 'main'
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!27282
No description provided.