feat(libSceAudiodec): export missing firmware functions from database #6847

Closed
al3w0f205 wants to merge 1 commit from upstream-pr/6847 into main
al3w0f205 commented 2026-10-16 14:11:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by al3w0f205 on 2026-10-16T14:11:31Z.


What

Adds missing libSceAudiodec functions identified from firmware export databases (aerolib.csv) as explicit throwing stubs (NotImplemented_nid_no_patch(__func__)). Also documents the unverified guest signatures under ### Unknown function info in docs/dev/debt/libSceAudiodec.md and verifies throwing behavior in guest tests.

Exported functions:

  • sceAudiodReportLoudness
  • sceAudiodReportMasteringGetParams
  • sceAudiodReportMasteringSetParams
  • sceAudiodReportMasteringStates
  • sceAudiodReportOutput
  • sceAudiodReportRegisterHandler
  • sceAudiodReportSetEnableFlag
  • sceAudiodReportUnregisterHandler
  • sceAudiodecClearContextEx
  • sceAudiodecCpuClearContext
  • sceAudiodecCpuDecode
  • sceAudiodecCpuInitDecoder
  • sceAudiodecCpuQueryMemSize
  • sceAudiodecCreateDecoderEx
  • sceAudiodecDecode2
  • sceAudiodecDecode2Ex
  • sceAudiodecDecode2WithPriority
  • sceAudiodecDecode2WithPriorityEx
  • sceAudiodecDecodeEx
  • sceAudiodecDecodeWithPriority
  • sceAudiodecDecodeWithPriorityEx
  • sceAudiodecDeleteDecoderEx
  • sceAudiodecGetContext
  • sceAudiodecInitialize
  • sceAudiodecRegisterCodec
  • sceAudiodecTerminate
  • sceAudiodecMp4aacGetCodecInfo
  • sceAudiodecMp4aacGetDecodedInformation
  • sceAudiodecMp4aacGetDefaultChannels
  • sceAudiodecMp4aacGetOutputBufferSize
  • sceAudiodecMp4aacGetSidebandSize
  • sceAudiodecMp4aacGetStateSize
  • sceAudiodecMp4aacGetStream
  • sceAudiodecMp4aacInitialize
  • sceAudiodecMp4aacParameterSet
  • sceAudiodecMp4aacRun
  • sceAudiodecGetAjmContext
  • sceAudiodecUnregisterCodec

Tested

  • Windows 11, MinGW64 Ninja build
  • CTest test suite passed 100%
  • tools/check_conventions.py --base origin/main passed with 0 errors

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 under Silent stubs in their library's technical debt file
  • 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
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4889597404 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6847). Originally posted by [al3w0f205](https://github.com/al3w0f205) on 2026-10-16T14:11:31Z. --- ### What Adds missing `libSceAudiodec` functions identified from firmware export databases (`aerolib.csv`) as explicit throwing stubs (`NotImplemented_nid_no_patch(__func__)`). Also documents the unverified guest signatures under `### Unknown function info` in `docs/dev/debt/libSceAudiodec.md` and verifies throwing behavior in guest tests. Exported functions: - `sceAudiodReportLoudness` - `sceAudiodReportMasteringGetParams` - `sceAudiodReportMasteringSetParams` - `sceAudiodReportMasteringStates` - `sceAudiodReportOutput` - `sceAudiodReportRegisterHandler` - `sceAudiodReportSetEnableFlag` - `sceAudiodReportUnregisterHandler` - `sceAudiodecClearContextEx` - `sceAudiodecCpuClearContext` - `sceAudiodecCpuDecode` - `sceAudiodecCpuInitDecoder` - `sceAudiodecCpuQueryMemSize` - `sceAudiodecCreateDecoderEx` - `sceAudiodecDecode2` - `sceAudiodecDecode2Ex` - `sceAudiodecDecode2WithPriority` - `sceAudiodecDecode2WithPriorityEx` - `sceAudiodecDecodeEx` - `sceAudiodecDecodeWithPriority` - `sceAudiodecDecodeWithPriorityEx` - `sceAudiodecDeleteDecoderEx` - `sceAudiodecGetContext` - `sceAudiodecInitialize` - `sceAudiodecRegisterCodec` - `sceAudiodecTerminate` - `sceAudiodecMp4aacGetCodecInfo` - `sceAudiodecMp4aacGetDecodedInformation` - `sceAudiodecMp4aacGetDefaultChannels` - `sceAudiodecMp4aacGetOutputBufferSize` - `sceAudiodecMp4aacGetSidebandSize` - `sceAudiodecMp4aacGetStateSize` - `sceAudiodecMp4aacGetStream` - `sceAudiodecMp4aacInitialize` - `sceAudiodecMp4aacParameterSet` - `sceAudiodecMp4aacRun` - `sceAudiodecGetAjmContext` - `sceAudiodecUnregisterCodec` ### Tested - Windows 11, MinGW64 Ninja build - CTest test suite passed 100% - `tools/check_conventions.py --base origin/main` passed with 0 errors ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-16 14:12:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T14:12:15Z.


Progress report (82ddae7 → 33f12e5)

📉 System libraries: 87.93% (-0.9%, +38 declared functions)

🆕 38 declared as stubs
Library Name
libSceAudiodec sceAudiodReportLoudness
libSceAudiodec sceAudiodReportMasteringGetParams
libSceAudiodec sceAudiodReportMasteringSetParams
libSceAudiodec sceAudiodReportMasteringStates
libSceAudiodec sceAudiodReportOutput
libSceAudiodec sceAudiodReportRegisterHandler
libSceAudiodec sceAudiodReportSetEnableFlag
libSceAudiodec sceAudiodReportUnregisterHandler
libSceAudiodec sceAudiodecClearContextEx
libSceAudiodec sceAudiodecCpuClearContext
libSceAudiodec sceAudiodecCpuDecode
libSceAudiodec sceAudiodecCpuInitDecoder
libSceAudiodec sceAudiodecCpuQueryMemSize
libSceAudiodec sceAudiodecCreateDecoderEx
libSceAudiodec sceAudiodecDecode2
libSceAudiodec sceAudiodecDecode2Ex
libSceAudiodec sceAudiodecDecode2WithPriority
libSceAudiodec sceAudiodecDecode2WithPriorityEx
libSceAudiodec sceAudiodecDecodeEx
libSceAudiodec sceAudiodecDecodeWithPriority
libSceAudiodec sceAudiodecDecodeWithPriorityEx
libSceAudiodec sceAudiodecDeleteDecoderEx
libSceAudiodec sceAudiodecGetAjmContext
libSceAudiodec sceAudiodecGetContext
libSceAudiodec sceAudiodecInitialize
libSceAudiodec sceAudiodecMp4aacGetCodecInfo
libSceAudiodec sceAudiodecMp4aacGetDecodedInformation
libSceAudiodec sceAudiodecMp4aacGetDefaultChannels
libSceAudiodec sceAudiodecMp4aacGetOutputBufferSize
libSceAudiodec sceAudiodecMp4aacGetSidebandSize
libSceAudiodec sceAudiodecMp4aacGetStateSize
libSceAudiodec sceAudiodecMp4aacGetStream
libSceAudiodec sceAudiodecMp4aacInitialize
libSceAudiodec sceAudiodecMp4aacParameterSet
libSceAudiodec sceAudiodecMp4aacRun
libSceAudiodec sceAudiodecRegisterCodec
libSceAudiodec sceAudiodecTerminate
libSceAudiodec sceAudiodecUnregisterCodec
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6217370591 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6847#issuecomment-6217370591). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-16T14:12:15Z. --- <!-- progress-report --> ### Progress report (82ddae7 → 33f12e5) 📉 **System libraries**: 87.93% (-0.9%, +38 declared functions) <details> <summary>🆕 38 declared as stubs</summary> | Library | Name | | - | - | | libSceAudiodec | `sceAudiodReportLoudness` | | libSceAudiodec | `sceAudiodReportMasteringGetParams` | | libSceAudiodec | `sceAudiodReportMasteringSetParams` | | libSceAudiodec | `sceAudiodReportMasteringStates` | | libSceAudiodec | `sceAudiodReportOutput` | | libSceAudiodec | `sceAudiodReportRegisterHandler` | | libSceAudiodec | `sceAudiodReportSetEnableFlag` | | libSceAudiodec | `sceAudiodReportUnregisterHandler` | | libSceAudiodec | `sceAudiodecClearContextEx` | | libSceAudiodec | `sceAudiodecCpuClearContext` | | libSceAudiodec | `sceAudiodecCpuDecode` | | libSceAudiodec | `sceAudiodecCpuInitDecoder` | | libSceAudiodec | `sceAudiodecCpuQueryMemSize` | | libSceAudiodec | `sceAudiodecCreateDecoderEx` | | libSceAudiodec | `sceAudiodecDecode2` | | libSceAudiodec | `sceAudiodecDecode2Ex` | | libSceAudiodec | `sceAudiodecDecode2WithPriority` | | libSceAudiodec | `sceAudiodecDecode2WithPriorityEx` | | libSceAudiodec | `sceAudiodecDecodeEx` | | libSceAudiodec | `sceAudiodecDecodeWithPriority` | | libSceAudiodec | `sceAudiodecDecodeWithPriorityEx` | | libSceAudiodec | `sceAudiodecDeleteDecoderEx` | | libSceAudiodec | `sceAudiodecGetAjmContext` | | libSceAudiodec | `sceAudiodecGetContext` | | libSceAudiodec | `sceAudiodecInitialize` | | libSceAudiodec | `sceAudiodecMp4aacGetCodecInfo` | | libSceAudiodec | `sceAudiodecMp4aacGetDecodedInformation` | | libSceAudiodec | `sceAudiodecMp4aacGetDefaultChannels` | | libSceAudiodec | `sceAudiodecMp4aacGetOutputBufferSize` | | libSceAudiodec | `sceAudiodecMp4aacGetSidebandSize` | | libSceAudiodec | `sceAudiodecMp4aacGetStateSize` | | libSceAudiodec | `sceAudiodecMp4aacGetStream` | | libSceAudiodec | `sceAudiodecMp4aacInitialize` | | libSceAudiodec | `sceAudiodecMp4aacParameterSet` | | libSceAudiodec | `sceAudiodecMp4aacRun` | | libSceAudiodec | `sceAudiodecRegisterCodec` | | libSceAudiodec | `sceAudiodecTerminate` | | libSceAudiodec | `sceAudiodecUnregisterCodec` | </details>
github-actions[bot] commented 2026-10-16 14:39:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T14:39:57Z.


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
PR 7416 sceAudiodecCpuClearContext
sceAudiodecCpuDecode
sceAudiodecCpuInitDecoder
sceAudiodecCpuQueryMemSize

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.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestAudiodec.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6217904579 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6847#issuecomment-6217904579). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-16T14:39:57Z. --- <!-- pr-overlap --> 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 | |---|---|---|---| | [PR 7416](https://www.github.com/boykopovar/AnyPS5/pull/7416) | | `sceAudiodecCpuClearContext`<br>`sceAudiodecCpuDecode`<br>`sceAudiodecCpuInitDecoder`<br>`sceAudiodecCpuQueryMemSize` | | 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. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestAudiodec.cpp` |
adriadam10 commented 2026-10-19 10:16:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T10:16:49Z.

Review: CHANGES_REQUESTED


Thanks for the PR. Requested changes:

  • 38 exports are added as parameterless stubs that only throw. Nothing in KytyPS5, shadPS4, fpPS4 or the other references gives signatures or behaviour for them, and the debt line says the signatures are unverified. This only raises the "declared stubs" count and changes no behaviour: a title that calls them still throws exactly as before. Please add exports together with their real signature/behaviour and a source (reference, SDK header, disassembly), and a title or test that uses them.
  • sceAudiodecCpuClearContext, sceAudiodecCpuDecode, sceAudiodecCpuInitDecoder and sceAudiodecCpuQueryMemSize are also implemented in #7416 (see the overlap bot comment). Drop those or coordinate with that PR.
  • core/libs/tests/GuestAudiodec.cpp: only 3 of the 38 stubs are tested, and a throw-only test pins no value.

Feel free to resubmit with a smaller set that has sources and behaviour.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5570072855 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6847#pullrequestreview-5570072855). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T10:16:49Z. **Review:** CHANGES_REQUESTED --- Thanks for the PR. Requested changes: - 38 exports are added as parameterless stubs that only throw. Nothing in KytyPS5, shadPS4, fpPS4 or the other references gives signatures or behaviour for them, and the debt line says the signatures are unverified. This only raises the "declared stubs" count and changes no behaviour: a title that calls them still throws exactly as before. Please add exports together with their real signature/behaviour and a source (reference, SDK header, disassembly), and a title or test that uses them. - `sceAudiodecCpuClearContext`, `sceAudiodecCpuDecode`, `sceAudiodecCpuInitDecoder` and `sceAudiodecCpuQueryMemSize` are also implemented in #7416 (see the overlap bot comment). Drop those or coordinate with that PR. - `core/libs/tests/GuestAudiodec.cpp`: only 3 of the 38 stubs are tested, and a throw-only test pins no value. Feel free to resubmit with a smaller set that has sources and behaviour.
al3w0f205 commented 2026-10-20 02:02:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by al3w0f205 on 2026-10-20T02:02:00Z.


Closing in favor of coordinating with #7416 and focusing on verified decoder functions with real signatures.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6281595430 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6847#issuecomment-6281595430). Originally posted by [al3w0f205](https://github.com/al3w0f205) on 2026-10-20T02:02:00Z. --- Closing in favor of coordinating with #7416 and focusing on verified decoder functions with real signatures.

Pull request closed

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!6847
No description provided.