lr-PUAE Pi400 CD Audio jumps/mute in 50Hz
-
I take it nobody uses PUAE ! Here is a (very poor quality!) sample of what it sounds like. Is it another problem with alsa drivers and the Pi400 ?
-
@mitu Do you have any ideas on this ? I tried to replicate the problem on Amiberry but I couldn't even get that to run in 50Hz !
-
@maxbeanz Sorry, but I have no experience with
P-UAE
oramiberry
. Try getting a verbose log and post it on pastebin.com to take a look. -
-
@maxbeanz said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
@mitu Does the makefile look correct to you ? There's no Pi 4 defined and is there supposed to be a -fp-armv8 flag that i've seen other cores use ?
It's not relevant, RetroPie-Setup sets the proper compilation flags automatically.
Also, Retroarch is only version 1.8.8. Does the latest version not work on the Pi ?
1.9.0 has an issue on the Pi3, but it's fixed afterwards. Not sure if affects the emulation though or if the core needs a newer version.
-
@mitu
The runcommand log -Parameters: Executing: SDL_VIDEO_KMSDRM_CRTCID=87 SDL_VIDEO_KMSDRM_MODEID=6 /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-puae/puae_libretro.so --config /opt/retropie/configs/amiga/retroarch.cfg "/home/pi/RetroPie/roms/amigacd32/Pinball Fantasies (21st Century Entertainment).chd" --appendconfig /dev/shm/retroarch.cfg
the retroarch log -
https://pastebin.com/xAurTpigWhat does CRTCID=87 mean in that runcommand ? I'm using a TV with HDMI.
I assume it could only be the 'alsa' sound drivers ? Is there a way to go back to how it was on the Pi 3 ?
-
@maxbeanz said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
the retroarch log -
https://pastebin.com/xAurTpigThe log shows some errors reading for
chd
file - maybe they are not properly supported or not correctly created.What does CRTCID=87 mean in that runcommand ? I'm using a TV with HDMI.
It's an internal DRM ID, used for setting the resolution.
I assume it could only be the 'alsa' sound drivers ? Is there a way to go back to how it was on the Pi 3 ?
Why is that ? If other (non-50hz) games are working fine, then the sound (and
alsa
) is fine. Pi3 uses alsoalsa
, I'm not sure what you mean by 'like it was on the Pi3' - did these games work(ed) on a Pi3 withlr-puae
? -
@mitu
I asked the dev about those 'PG missing sector: LBA 2208, trklog 2208' and he said it was nothing to worry about. The sound also mutes (for a fraction of a second) whenever the PUAE core changes the resolution on any game (ADF,LHA etc.)It only seems to happen when the TV is at 50Hz (in PUAE). I tried a MegaCD PAL game on lr-genesisgx in 50Hz and it sounds fine. This is why it made me think the makefile was missing something.
-
Merged
-
@mitu
I just dug out my old Pi 3 (not plus), installed the latest image.This needs updating in the es_systems.cfg -
Add .chd to the supported extensions.I notice that the default Retroarch Audio driver on the Pi 3 is 'Alsathread'.
On the Pi 400 it's just 'Alsa'. This makes the CD Audio jump/mute. Why has the Pi400 been set differently ?
-
@maxbeanz said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
On the Pi 400 it's just 'Alsa'. This makes the CD Audio jump/mute. Why has the Pi400 been set differently ?
I don't think it's ALSA - my guess is that the resolution change doesn't actually switch to a 50hz mode or the core tries to change the resolution to something else and the audio/video sync is broken, hence the audio jumps:
[INFO] [Video]: Average monitor Hz: 49.992501 Hz. (4.532 % frame time deviation, based on 2048 last samples).
Your verbose log is truncated, so I can't say which resolution is set up in RetroArch - can you re-upload the full log ?
-
@mitu How do I do a full log ? I selected '0 Debug' in Retroarch.
And the thing is, if I change the audio driver to 'alsathread' (which is how it's set by default on the Pi 3) or 'sdl2' then it doesn't jump/mute randomly but still doesn't sound quite right.
Are you thinking this could be related to the audio skewing option ?
-
@maxbeanz said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
How do I do a full log ? I selected '0 Debug' in Retroarch.
See https://retropie.org.uk/docs/Runcommand/#launch-with-verbose-logging
-
@mitu Here it is -
https://pastebin.com/WbCPkxdm -
@mitu No ideas then ?
-
I haven't got to test the game on a 50hz display, just ran it normally (at @60hz) and the music seems fine to me - the intro plays without any skips or stutters. Did you try doing the same - just run the game without any special resolution set-up ?
-
@mitu Yeah, as I said in my first post, it doesn't happen at 60Hz. (And also doesn't happen if you set the audio driver to anything but 'alsa').
-
I managed to reproduce the issue on a 50hz resolution and it's strange that it only happens with
alsa
. Switching toalsathread
as audio driver (you can do that from the configuration editor) fixes this.
I don't know well enough how RetroArch configured both drivers and which parameters affect how they're configured, it looks like the threaded ALSA driver has a shorter buffer and may synchronize the audio better (?):-
with alsathread
[INFO] ALSA: Using signed 16-bit format.
[INFO] ALSA: Period size: 480 frames
[INFO] ALSA: Buffer size: 1536 frames -
with alsa
[INFO] [ALSA]: Using signed 16-bit format.
[INFO] [ALSA]: Period size: 768 frames
[INFO] [ALSA]: Buffer size: 3072 frames
-
-
@mitu Thanks for confirming, now we know that it's a problem with Raspberry Pi. As I said, it's weird how a clean install on a Pi 3 sets it as 'alsathread' but the Pi 4/400 sets it as 'alsa' ('sdl2' also works better than 'alsa'). The CD audio still doesn't sound clean in 'alsathread' (like it does at 60Hz). Have you also noticed that the audio quickly mutes whenever the core changes the resolution ? This seems to only happen on the RPi too (can be quite annoying when watching demos that switch res a lot).
I tried Android at 50Hz and it sounds fine, (Android uses 'opensl').
I take it this is a problem that will never be fixed ? Is it RetroPie or Raspian ?
-
@maxbeanz said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
Have you also noticed that the audio quickly mutes whenever the core changes the resolution ?
Yes, but I expect this to happen with emulation, since probably the emulator needs to re-calibrate and re-sync the audio to the video.
it's weird how a clean install on a Pi 3 sets it as 'alsathread'
Not sure which version of RetroPie you're installing, but
alsathread
is not explicitly set as default anywhere in the latest version, regardless of Pi version. Could be that RetroArch chooses it as best at runtime.I take it this is a problem that will never be fixed ? Is it RetroPie or Raspian ?
Given that I don't know why the issue occurs, I can't say.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.