GRIS (PPSA09804): no audio at all on Linux, AJM/ATRAC9 never receives input #823

Closed
opened 2026-11-26 09:33:54 +00:00 by github-bot · 3 comments
Owner

@⁠6d4m on GitHub · 2026-09-25 05:52 UTC · original

Game: GRIS (PPSA09804)
Version: 01.001
Type: Bug
Platform: Linux

Description

No audio at all in GRIS on Linux. The game runs, and the emulator reports audio activity the whole time, but nothing ever reaches the speakers.

Steps to reproduce

  1. Launch GRIS with any build from the last few weeks
  2. Play through the intro
  3. No sound at any point

Additional info

I instrumented QueueSdlAudio to dump what the guest actually hands to the audio backend, per port, and every sample is exactly zero. So the guest is not producing audio data, it is producing silence. The writes themselves look completely normal: 187.6 buffers/s, which is real time for 256-frame blocks at 48 kHz, a steady queue around 14 KB, no timeouts, no errors.

GRIS opens a stereo port and a mono port, and it leans on AJM/ATRAC9 for its music. The AJM path logs around 870,000 instance operations in a single run, and every one of them reports input_num = 0, as in it is being created and cycled without ever being given input to decode. No errors or "unsupported" warnings are printed along the way.

I don't think this is related to the AudioOut pacing problem I reported in #819 and fixed in #822. That one was about the guest's audio thread being serviced in bursts, which changes timing but cannot change sample values, and here the values are all zero. The two games from that issue (3D Mini Golf and Ghost Song) play correctly with that fix.

My guess is the game is creating AJM instances in a loop because it never gets an input buffer it recognises, but I have not dug into the AJM implementation enough to say more than that. Happy to provide the instrumented build, the captured PCM, or the scripted run if that helps.

Gameplay, graphics and performance all look otherwise fine, which is why I am reporting this as audio only rather than as a compatibility status report.

AI assistance (OpenCode) was used for the measurements and this report; I reviewed the results before posting.

**@⁠6d4m** on GitHub · 2026-09-25 05:52 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/823) **Game**: GRIS (PPSA09804) **Version**: 01.001 **Type**: Bug **Platform**: Linux ## Description No audio at all in GRIS on Linux. The game runs, and the emulator reports audio activity the whole time, but nothing ever reaches the speakers. ## Steps to reproduce 1. Launch GRIS with any build from the last few weeks 2. Play through the intro 3. No sound at any point ## Additional info I instrumented `QueueSdlAudio` to dump what the guest actually hands to the audio backend, per port, and every sample is exactly zero. So the guest is not producing audio data, it is producing silence. The writes themselves look completely normal: 187.6 buffers/s, which is real time for 256-frame blocks at 48 kHz, a steady queue around 14 KB, no timeouts, no errors. GRIS opens a stereo port and a mono port, and it leans on AJM/ATRAC9 for its music. The AJM path logs around 870,000 instance operations in a single run, and every one of them reports `input_num = 0`, as in it is being created and cycled without ever being given input to decode. No errors or "unsupported" warnings are printed along the way. I don't think this is related to the AudioOut pacing problem I reported in #819 and fixed in #822. That one was about the guest's audio thread being serviced in bursts, which changes timing but cannot change sample values, and here the values are all zero. The two games from that issue (3D Mini Golf and Ghost Song) play correctly with that fix. My guess is the game is creating AJM instances in a loop because it never gets an input buffer it recognises, but I have not dug into the AJM implementation enough to say more than that. Happy to provide the instrumented build, the captured PCM, or the scripted run if that helps. Gameplay, graphics and performance all look otherwise fine, which is why I am reporting this as audio only rather than as a compatibility status report. AI assistance (OpenCode) was used for the measurements and this report; I reviewed the results before posting.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:33:54 +00:00
Author
Owner

@⁠6d4m on GitHub · 2026-09-25 05:58 UTC · original

Update after a longer session, and this corrects part of what I posted above.

Audio is not completely absent. Capturing the guest PCM per second over a full run shows:

seconds 0-51    rms 0.000000   peak 0.0000    0.00% non-zero
second 52       rms 0.000051   peak 0.0008    8.03% non-zero
seconds 53-86   rms 0.003-0.005 peak 0.03-0.045  ~17-19% non-zero

So there is silence through boot and the menus, and then audio starts once the game gets into actual gameplay. That matches what I hear: starting a new game brings the sound back for a while.

The problem is that what comes through is not usable music. Only about 17-19% of the samples are non-zero, the level is very low (rms around 0.004, peak 0.045), and it stays that way for as long as I can capture. Real music from this game should be continuous, so this looks like the ATRAC9 decoder producing fragments rather than whole blocks, not like a level or mixing problem.

A second run of the same build was silent for its entire duration, so the behaviour is not consistent between runs. I do not have a save file I can delete to force a clean new game, so I cannot say reliably what puts it into the working state.

I have amended my earlier claim that the AJM path never receives input. It does produce output sometimes. What is still true: the write rate is a healthy real time 187.6 buffers/s, the queue never backs up, there are no errors, and the AJM path logs several hundred thousand instance operations per run, all reporting input_num = 0. The pacing fix in #822 is not involved, since that changes when buffers are submitted and not their contents.

Still happy to provide the instrumented build, the per-port captures or the run script if any of that is useful.

AI assistance (OpenCode) was used for the measurements and this update; I reviewed the results before posting.

**@⁠6d4m** on GitHub · 2026-09-25 05:58 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/823#issuecomment-5827592783) Update after a longer session, and this corrects part of what I posted above. Audio is not completely absent. Capturing the guest PCM per second over a full run shows: ``` seconds 0-51 rms 0.000000 peak 0.0000 0.00% non-zero second 52 rms 0.000051 peak 0.0008 8.03% non-zero seconds 53-86 rms 0.003-0.005 peak 0.03-0.045 ~17-19% non-zero ``` So there is silence through boot and the menus, and then audio starts once the game gets into actual gameplay. That matches what I hear: starting a new game brings the sound back for a while. The problem is that what comes through is not usable music. Only about 17-19% of the samples are non-zero, the level is very low (rms around 0.004, peak 0.045), and it stays that way for as long as I can capture. Real music from this game should be continuous, so this looks like the ATRAC9 decoder producing fragments rather than whole blocks, not like a level or mixing problem. A second run of the same build was silent for its entire duration, so the behaviour is not consistent between runs. I do not have a save file I can delete to force a clean new game, so I cannot say reliably what puts it into the working state. I have amended my earlier claim that the AJM path never receives input. It does produce output sometimes. What is still true: the write rate is a healthy real time 187.6 buffers/s, the queue never backs up, there are no errors, and the AJM path logs several hundred thousand instance operations per run, all reporting `input_num = 0`. The pacing fix in #822 is not involved, since that changes when buffers are submitted and not their contents. Still happy to provide the instrumented build, the per-port captures or the run script if any of that is useful. AI assistance (OpenCode) was used for the measurements and this update; I reviewed the results before posting.
Author
Owner

@⁠joaodiaslobo on GitHub · 2026-09-26 23:19 UTC · original

Thanks for the capture. Gris uses the AJM Opus decoder which was never actually implemented. It was a placeholder that zeroed its output buffer and reported success, so anything going through it came out silent.

I opened #858 which implements it. Menu and gameplay music both play fine for me on Windows. Feel free to build that branch and try it, a Linux capture would be useful since I could only test on Windows.

**@⁠joaodiaslobo** on GitHub · 2026-09-26 23:19 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/823#issuecomment-5850839751) Thanks for the capture. Gris uses the AJM Opus decoder which was never actually implemented. It was a placeholder that zeroed its output buffer and reported success, so anything going through it came out silent. I opened #858 which implements it. Menu and gameplay music both play fine for me on Windows. Feel free to build that branch and try it, a Linux capture would be useful since I could only test on Windows.
Author
Owner

@⁠6d4m on GitHub · 2026-09-27 00:25 UTC · original

Built your branch and tested it on Linux with GRIS (PPSA09804). Audio is correct here - music plays in the menus and in gameplay, nothing missing or distorted.

For the record, what changed on the guest side:

  • The AJM decode calls now carry input. In my run the log shows input_num = 3 on 30292 calls, 1 on 5727, 2 on 1508, 4 on 1180 and only 55 calls with no input, where the placeholder build reported input_num = 0 on every call.
  • Output starts about 20 s into the run (silence through boot) and is non-silent from there on.

Tested on bec67b7 with only your two files applied, Release build, no other changes. The ffmpeg-based decoder built and ran without issues on Linux.

AI assistance (OpenCode) was used for the build and the log analysis; I reviewed the results before posting.

**@⁠6d4m** on GitHub · 2026-09-27 00:25 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/823#issuecomment-5851250832) Built your branch and tested it on Linux with GRIS (PPSA09804). Audio is correct here - music plays in the menus and in gameplay, nothing missing or distorted. For the record, what changed on the guest side: - The AJM decode calls now carry input. In my run the log shows `input_num = 3` on 30292 calls, `1` on 5727, `2` on 1508, `4` on 1180 and only 55 calls with no input, where the placeholder build reported `input_num = 0` on every call. - Output starts about 20 s into the run (silence through boot) and is non-silent from there on. Tested on `bec67b7` with only your two files applied, Release build, no other changes. The ffmpeg-based decoder built and ran without issues on Linux. AI assistance (OpenCode) was used for the build and the log analysis; I reviewed the results before posting.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/KytyPS5--KytyPS5#823
No description provided.