Files
AnyPS5/docs/dev/debt/libSceVoice.md
T
zaryabzip 7d1bb9c3d3 feat(libSceVoice): answer the adjustment, QA recording, customer data and memory size calls as firmware 13.42 does
A firmware 13.42 run of the module shows the two VAD adjustments only
storing their floats, QA recording setting a flag after the
initialization check, customer data checking its pointers, gain and
port before a device that isn't bound, and the memory size writing 0
and refusing a library initialized with version 100.
2026-11-01 05:05:41 +05:00

7.0 KiB

libSceVoice technical debt

Functional

  • Voice resource and port state: resource information is eight bytes containing four 16-bit limits selected by initialization mode. Reset, pause and resume use confirmed initialization, range and missing-port errors; repeated pause/resume succeed. GetPortInfo preserves unused output fields and reports native frame sizes, but still reports a constant ready state and does not reproduce stopped-state or snapshot-slot errors. The host has no buffered voice processing or device reset backend, so reset only covers empty software ports and pause flags currently affect no audio. Initialization validates native modes and version 100, but still lacks event callback delivery and backend creation. Port creation enforces recovered format and resource limits, but does not allocate device or codec backends.
  • sceVoiceEnableChat and sceVoiceDisableChat: zero-argument signatures and the not-initialized error are confirmed. Initialized calls throw because the required audio chat backend is not implemented; they no longer report success for a local flag change.

Unknown function info

  • sceVoiceVADAdjustment, sceVoiceVADPVTAdjustment and sceVoiceQAEnableRecording (libSceVoice) - follow @BunnyFl's firmware 13.42 run under an emulator with imports stubbed, not on a console. VADAdjustment(float, float) and VADPVTAdjustment (four floats) store their arguments, one copy for the library, with no argument or initialization check, and set no return value (rax came back unchanged), so they return void here; nothing reads the values. QAEnableRecording() returns 0x804E0801 before initialization and otherwise sets the recording flag and returns 0. Its busy answer (0x804E080C) and a state that returns 0 without setting the flag come from the disassembly and aren't reachable here.

  • sceVoiceDeviceInCustomerData and sceVoiceGetMemorySize (libSceVoice) - same run. DeviceInCustomerData(uint32_t port, const void* data, uint32_t size, float* gain) checks initialization (0x804E0801), a null data or gain and a *gain that is infinite, NaN or negative (0x804E0805) and an unknown port (0x804E0804), then returns 0x804E0803 for an input device port, which has no device bound here. Other port types weren't run and throw; the busy check and gain write-back past that didn't run. GetMemorySize takes nine uint32_t counts and a uint32_t*: after the initialization and null checks it writes 0 and returns 0x804E080F, as it needs initialization with version 200 and sceVoiceInit accepts only 100.

  • sceVoiceInit, sceVoiceStart, sceVoiceCreatePort, sceVoiceGetPortInfo (libSceVoice) - a second sceVoiceInit returns 0x804E0802, and Start, CreatePort and GetPortInfo return 0x804E0801 before checking any argument while the library is not initialized, as prosper reads them from the shipped module. The other port and lifecycle calls still throw when the library is not initialized, since prosper gives no module address for them. Whether sceVoiceInit checks a null param before its state is unknown, so a null param still throws first, and that sceVoiceEnd returns the library to the not-initialized state is assumed. Closes when: the other entry points are read from the module or measured on a PS5

  • sceVoiceInitHQ, sceVoiceVADSetVersion (libSceVoice) - not measured on a PS5: the signatures and rules follow shadPS4. sceVoiceInitHQ runs sceVoiceInit, as shadPS4's two share one path. sceVoiceVADSetVersion accepts versions 0 and 1 and returns 0x804E0805 for any other; nothing uses the version, as no voice activity detection runs

  • sceVoicePausePortAll, sceVoiceResumePortAll (libSceVoice) - not measured on a PS5: both return 0x804E0801 while the library is not initialized and 0 otherwise, as in shadPS4; prosper reads the same code for sceVoiceStart, and the PS3 calls in RPCS3 make the same check. Like sceVoicePausePort they change nothing that is reported: VitaSDK documents that pausing every port keeps the buffered data and the reported state, and nothing here processes port data

  • sceVoiceSetMuteFlagAll, sceVoiceSetBitRate, sceVoiceUpdatePort (libSceVoice) - not measured on a PS5; signatures follow Orbital, behaviour the Vita's VitaSDK. They return the not-initialized, port-range and missing-port codes the other port calls return. The mute-all flag makes sceVoiceGetMuteFlag report every port muted without changing port flags. A non-voice port, a bitrate sceVoiceCreatePort rejects, a null param or a different port type throw, since the console's codes for them are unknown

  • sceVoiceGetPortAttr: native initialization, port-range, pointer, attribute-size and port-type validation is implemented. Supported device attributes throw because the host has no device state or voice-activity processing. The former constant-zero voice-activity fallback is removed; failed calls leave output untouched.

  • sceVoiceSetThreadsParams: the priorities and affinity masks that mode 1 sets reach no host scheduling, because no voice worker threads run (see sceVoiceStart below). Mode 1 returns 0 for priorities 256-767 with non-zero masks within 0x1fff, the values a PS5 thread takes; the native result for other values is unverified, so they throw. The 32-byte event callback union is recovered, but callback delivery and device-state byte semantics remain unimplemented.

  • sceVoiceStart, sceVoiceStop and sceVoiceEnd validate initialization, container presence and native mode-dependent memory sizes, but do not partition guest working memory or run the audio workers. Start/stop currently change software state only; backend failures and active-stream shutdown are not reproduced.