From ef9d02700f2a2533f3968db7e39f183e27434ccf Mon Sep 17 00:00:00 2001 From: ntamas94 Date: Fri, 30 Oct 2026 11:32:48 +0100 Subject: [PATCH 1/2] docs(libSceAudiodec): confirm sceAudiodecCreateDecoder word lengths on PS4 10.71 The iBwPcm entry was measured on a PS5 (firmware 13.60). A PS4 Pro (firmware 10.71) confirms it for MP3 and M4AAC over iBwPcm -1 to 3: MP3 accepts only 16-bit (1), M4AAC accepts 16-bit and float (1 and 2), and every other value returns ERROR_INVALID_WORD_LENGTH. ATRAC9's word length is not reachable with invalid config data: the console returns ERROR_AT9_INVALID_CONFIG_DATA for every word length, so it validates the AT9 config before the word size. Measured with a homebrew probe calling the console's libSceAudiodec (valid ctrl, no null pointer to an sce API); source and results can be attached on request. Co-Authored-By: Claude Opus 4.8 --- docs/dev/debt/libSceAudiodec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/debt/libSceAudiodec.md b/docs/dev/debt/libSceAudiodec.md index ea126704da..4e2f61433c 100644 --- a/docs/dev/debt/libSceAudiodec.md +++ b/docs/dev/debt/libSceAudiodec.md @@ -10,4 +10,4 @@ ### Functional - [sceAudiodecDecode](../../../core/libs/prx/libSceAudiodec/src/Codecs.cpp) (libSceAudiodec) - an ADTS stream with channel configuration 0 (layout in a program config element) is still parsed by FFmpeg, so `ui_enable_heaac` 0 does not remove its SBR and a mono one with Parametric Stereo comes out as stereo. -- [libSceAudiodec](../../../core/libs/prx/libSceAudiodec/Export.cpp) accepts only 16-bit PCM, and float PCM for ATRAC9 and M4AAC, as `sceAudiodecCreateDecoder` did in a payload process on a PS5 (firmware 13.60), which returned `ERROR_INVALID_WORD_LENGTH` for `iBwPcm` 0, 3 and -1 with each codec and for float with MP3; other word sizes are assumed to fail the same way. ATRAC9 decoding is covered only by configuration and error tests, as no ATRAC9 encoder is available for a fixture. +- [libSceAudiodec](../../../core/libs/prx/libSceAudiodec/Export.cpp) accepts only 16-bit PCM, and float PCM for ATRAC9 and M4AAC, as `sceAudiodecCreateDecoder` did in a payload process on a PS5 (firmware 13.60), which returned `ERROR_INVALID_WORD_LENGTH` for `iBwPcm` 0, 3 and -1 with each codec and for float with MP3; other word sizes are assumed to fail the same way. Confirmed on PS4 (firmware 10.71) for MP3 and M4AAC over `iBwPcm` -1 to 3: MP3 accepts only 16-bit (1), M4AAC accepts 16-bit and float (1 and 2), and every other value returns `ERROR_INVALID_WORD_LENGTH`. ATRAC9's word length is not reached there: with invalid config data the console returns `ERROR_AT9_INVALID_CONFIG_DATA` for every word length, so it validates the config before the word size. ATRAC9 decoding is covered only by configuration and error tests, as no ATRAC9 encoder is available for a fixture. From d29c2d79dcc5b554d2e3568689ebb4036a63769f Mon Sep 17 00:00:00 2001 From: ntamas94 Date: Fri, 30 Oct 2026 15:04:40 +0100 Subject: [PATCH 2/2] docs(libSceAudiodec): mark the iBwPcm rows as a PS4 10.71 measurement, PS5 stays 13.60 Co-Authored-By: Claude Opus 4.8 --- docs/dev/debt/libSceAudiodec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/debt/libSceAudiodec.md b/docs/dev/debt/libSceAudiodec.md index 65917ad8a8..a786d0e8d9 100644 --- a/docs/dev/debt/libSceAudiodec.md +++ b/docs/dev/debt/libSceAudiodec.md @@ -13,4 +13,4 @@ ### Functional - [sceAudiodecDecode](../../../core/libs/prx/libSceAudiodec/src/Codecs.cpp) (libSceAudiodec) - an ADTS stream with channel configuration 0 (layout in a program config element) is still parsed by FFmpeg, so `ui_enable_heaac` 0 does not remove its SBR and a mono one with Parametric Stereo comes out as stereo. -- [libSceAudiodec](../../../core/libs/prx/libSceAudiodec/Export.cpp) accepts only 16-bit PCM, and float PCM for ATRAC9 and M4AAC, as `sceAudiodecCreateDecoder` did in a payload process on a PS5 (firmware 13.60), which returned `ERROR_INVALID_WORD_LENGTH` for `iBwPcm` 0, 3 and -1 with each codec and for float with MP3; other word sizes are assumed to fail the same way. Confirmed on PS4 (firmware 10.71) for MP3 and M4AAC over `iBwPcm` -1 to 3: MP3 accepts only 16-bit (1), M4AAC accepts 16-bit and float (1 and 2), and every other value returns `ERROR_INVALID_WORD_LENGTH`. ATRAC9's word length is not reached there: with invalid config data the console returns `ERROR_AT9_INVALID_CONFIG_DATA` for every word length, so it validates the config before the word size. ATRAC9 decoding is covered only by configuration and error tests, as no ATRAC9 encoder is available for a fixture. +- [libSceAudiodec](../../../core/libs/prx/libSceAudiodec/Export.cpp) accepts only 16-bit PCM, and float PCM for ATRAC9 and M4AAC, as `sceAudiodecCreateDecoder` did in a payload process on a PS5 (firmware 13.60), which returned `ERROR_INVALID_WORD_LENGTH` for `iBwPcm` 0, 3 and -1 with each codec and for float with MP3; other word sizes are assumed to fail the same way. Separately measured on PS4 (firmware 10.71) for MP3 and M4AAC over `iBwPcm` -1 to 3: MP3 accepts only 16-bit (1), M4AAC accepts 16-bit and float (1 and 2), and every other value returns `ERROR_INVALID_WORD_LENGTH`. ATRAC9's word length is not reached there: with invalid config data the console returns `ERROR_AT9_INVALID_CONFIG_DATA` for every word length, so it validates the config before the word size. This is a PS4 10.71 measurement; the PS5 behaviour for these cases is still the 13.60 one above, not re-confirmed on current PS5 firmware. ATRAC9 decoding is covered only by configuration and error tests, as no ATRAC9 encoder is available for a fixture.