Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

PSX games audio cuts in and out randomly



  • • Pi Model: 3B+
    • Power Supply: Input 100-240V, 50/60Hz, 0.4A Max, Output: 5V 2500mA https://imgur.com/a/UY2T9ep
    • Version: 4.4.4
    • Built from: https://retropie.org.uk/download/ - Raspberry Pi 2/3 Download
    • USB Devices Connected: Slot 0: Micro SD Card
    • Slot 1: Official Sony PS4 DualShock Controller (Physical cable used, Bluetooth disabled)
    • Controller Used: Official Sony PS4 DualShock Controller
    • BIOS Used: SCPH1001.BIN
    • Disabled Over-Scan from Raspi-Config
    • Added the following line to /opt/retropie/configs/all/autostart.sh:
    emulationstation --no-splash #auto
    • Modified the line under /boot/cmdline.txt:
    dwc_otg.lpm_enable=0 console=serial0,115200 console=tty3 root=PARTUUID=f2d3cb4f-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait loglevel=3 consoleblank=0 plymouth.enable=0 logo.nologo
    • Modified config.txt file for audio (https://paste.ubuntu.com/p/j9jZ4Dgm6J/)
    • Uploaded music script for RetroPie Menu (RetroPie Menu does not affect in-game audio and has no issues) (http://www.hyperpie.org/forum/viewtopic.php?f=14&t=23&sid=084cc6f8e25a82f90381728d53da2aaf)
    Dropped music folder with script and mp4 files in: /home/pi/RetroPie/roms
    Used the following to get script working:
    sudo apt-get install python-pygame
    Entered: sudo nano /etc/rc.local
    Typed: (sudo python /home/pi/RetroPie/roms/music/Script/music.py) &
    Saved
    sudo reboot now
    • Used sudo apt-get update (15th of December 2018)
    • Used sudo apt-get upgrade (15th of December 2018)
    • Performed a basic install (15th of December 2018)
    • Installed lr-PCSX-ReArmed (15th of December 2018)
    • Installed Scraper (15th of December 2018)
    • Updated RetroPie-Setup Script (15th of December 2018)
    • Selected HDMI output from Retropie Setup  Configuration/Tools  Audiosettings
    • Selected ‘Force HDMI’ from Raspi-Config  Advanced Settings  A4 Audio
    • Selected HDMI from Audio
    • Enabled SSH

    Hello everyone,

    I have been running into audio issues with PS1 games on my Raspberry Pi. Looking at previous forums, this seems to be a common issue. I’ll explain below.

    The problem with the audio is that it cuts off randomly when playing PS1 games and then turns back on shortly after. However, the frequency of these audio cuts are not consistent. I could be playing a PS1 game for 30 minutes with no problem in audio but then it takes effect. It may do it three times in a row and then stop for 10 minutes. So yeah, just random occurrences.
    I've been trying to look into this issue and this is what I found so far. This only occurs with an HDMI connection. Something about the RetroPie software does not seem to ouput the audio properly at times. If you open my config.txt file, you will find what I have already entered.

    My roommate discussed this with a good friend of his that has built a lot of Raspberry Pi in the past and he also has come across this issue (just not with RetroPie software). He explained that this is a problem with the Raspberry PI device and how by default, all sound goes through the CPU before being passed on to the GPU. The reason why the audio cuts out is because the CPU and GPU at times are not in sync. This is a result of having to compress the audio many times before the output on the display screen (Smart TV in my case).

    If what he says is true, then the solution to this problem would be to tell the Raspberry Pi to pass all audio (or the PS1 audio but I think that's harder to write than a command for all audio) to the GPU only, bypassing the CPU process.

    I'm not sure if that is indeed the problem though. What do you think? And if it is the issue, what would be the command to write?

    Any answer to this problem is greatly appreciated.

    P.S. I have tried a normal TV as well as the Smart TV. Same issue. I'm thinking of overclocking but that might only reduce the frequency of the problem, not eliminate it.


  • Global Moderator

    A couple of suggestions

    • start with the default config.txt (disable BT if you wish), which has audio enabled by default anyway. Don't enable anything else.
    • disable the BG sound module.
    • uncomment in config.txt
    config_hdmi_boost=4
    

    Have you tried another HDMI cable ? What's the resolution of your display ?



  • @mitu hey so i did the following:

    #hdmi_drive=2
    #hdmi_force_hotplug=1
    #hdmi_force_edid_audio=1

    config_hdmi_boost=4. Also tried with hashtag in front

    #dtoverlay=sdtweak, overclock_50=80

    None of these fixed the issue.

    I then removed the music script from the RetroPie roms folder. Tried again and it didn't work.

    I should point out the audio works for quite a while but occasionally it will turn off and turn back on. Also, I would have thought that the quality of the audio would be reduced but it seems to be just fine without the above so I won't enable them again.


  • Global Moderator

    @FrenchAussie Have you tested another cable ? The settings you have are fine, they shouldn't yield any problems for your configuration - the error is somewhere else ? Does it happen for PS1 only games or for other games as well ?



  • @mitu Yeah I tried another HDMI cable it doesn't change anything. My emulator only has ps1 games on it so I'm not sure for other console games. I'm just wondering now if this is a reoccurring issue for anyone who plays ps1 games. I haven't changed anything else. Maybe retroarch? I've tried resetting to default but every time I do, it freezes the whole raspberry pi and I'm forced to restart from the safety switch. But I haven't changed anything apart from sound interpolation. But you never know. Is there perhaps a work around to resetting retroarch to default so I can double check on that?


  • Global Moderator

    @FrenchAussie You mentioned

    Looking at previous forums, this seems to be a common issue. I’ll explain below.

    Where is this reported ? Do you have any links ? In the forums here, there are a few reports of sound stopping working in Diablo PS1 or not working at all, but not something similar to your problem.

    Retroarch is minimally configured in RetroPie - you can reset to the default RetroPie settings by copying the /opt/retropie/configis/all/retroarch.cfg-dist over the /opt/retropie/configis/all/retroarch.cfg-dist file. How are you resetting it ?

    What format are your game images ? Iso/Cue & Bin/PBP ?



  • @mitu Here are a few links that I have found. Some of them start from a while ago but have been added with more recent comments. They are not PS1 games specifically but they talk about similar issues related to audio drops. One of them is an unanswered question though.

    https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=19852&start=50
    https://raspberrypi.stackexchange.com/questions/40672/audio-goes-in-and-out-on-retropie
    https://www.raspberrypi.org/forums/viewtopic.php?t=227548
    https://retropie.org.uk/forum/topic/10819/sometimes-no-sound-through-hdmi

    While in-game, I go into the Retroarch menu and click on configurations. There's an option there to reset to default settings. However, it makes my device freeze up and I have to restart the whole thing. I'll try and look at retroarch.cfg-dist and see if resetting the RetroPie that way will fix it.

    All my PS1 games are either BIN/CUE files or PBP files. I used PBP files to fit in more games for my 64GB Micro SD Card.


  • Global Moderator

    @FrenchAussie I don't see a definite cause for all the topics posted. 2 of them are without any solutions (the empty post and the stackexchange one).
    The other links suggest to (actually mostly the 1st one, started in 2015)

    • use hdmi_config_boost (which you tried and didn't work)
    • problems with the TV's own audio processing
    • use hdmi_clock_change_limit=20 (dunno what it does ?)
    • overclock (!)

    Note that most result come from the 2015 thread, when no PI3 was available, so heavy processing might had an impact on the overall perfomance - but none of the posted forum posts are an indication of a reproducible problem with the PI.

    My suggestion is to exclude any hardware faults - TV or HDMI cables - and try to set the audio_driver to alsathread with the Configuration Editor.



  • @FrenchAussie said in PSX games audio cuts in and out randomly:

    config_hdmi_boost=4

    config_hdmi_boost can be set all the way up to a value of 11. According to the official raspberry pi documents the default value is 5. Maybe try running it at a couple different values and see what happens. There should be no # in front by the way.



  • So I've spent the whole day trying to fix this. I tried all of the above. I have noticed that the audio is much better on more modern TVs. One TV I tried it on has standalone speakers and its been performing worse. Might have to do with the compression of audio passing too many times.

    honestly i feel like none of the above helped me. In fact, the hdmi_config_boost made the audio cut more frequent for some reason. Even at different numbers. Having it off seemed better.

    I have just finished overclocking at 1550MHz. I will thoroughly test it tomorrow and see if it gets better.



  • Update: With the right TV, overclocking has fixed it. I haven't noticed any major audio turning off and if it did it was very short and hardly noticeable. Just to let you know what I added:

    To overclock:

    sudo nano /boot/config.txt

    Under 'uncomment to Overclock the arm. 700 MHz is the default', I added the following lines:

    arm_freq=1550
    gpu_freq=500
    core_freq=500
    sdram_freq=500
    sdram_schmoo=0x02000020
    over_voltage=6
    sdram_over_voltage=2

    Note: The arm_freq by default is NOT 700MHz. That's the default of the original Raspberry Pi 3 model. The 3B+ model has a default of 1400MHz and therefore has already been overclocked...but not enough it seems.

    The arm_freq at 1550 seems to be a common number to overclock to. For some Raspberry Pis it may not reach that number but I have seen multiple comments mentioning that they couldn't go above that. Either way, it works for me and the issue is resolved.

    Benchmark:

    sudo apt-get install sysbench (To install benchmarking)

    sysbench --test=cpu --cpu-max-prime=20000 --num-threads=4 --validate run (To run the benchmarking program. This is a common command I found on the web across multiple sites.)

    CPU temperature script:

    Followed this guide:
    https://medium.com/@kevalpatel2106/monitor-the-core-temperature-of-your-raspberry-pi-3ddfdf82989f

    The gentleman who wrote this explains how to type the CPU temperature one-time check command and how to add a python script for 1 second interval of the CPU temperature being updated. It was very useful to use.

    If you plan to overclock your device like I did, make sure you have a nicely fat heatsink and powerful CPU fan. If you type 'Raspberry Pi 3B+ Fan Case' into google, I'm sure you'll get what you're looking for. My heatsink measured '6.2mm x 21mm x 21mm. You may not get that heatsink size with the case kit though and end up purchasing it separately. That's what I did. You can also have a heatsink for the GPU as an option. You can never have too many heatsinks. With all of the above mentioned, my CPU was staying at 40 degrees Celcius before and after being overclocked.

    I hope this helps anyone else who runs into similar problems like I did. With the 3B+ model, it doesn't seem like adding any hdmi lines to the config.txt does anything. But I could be wrong.


  • Global Moderator

    Thank you for providing the solution that worked for you. Just out of curiosity - what's the resolution used for the TV ?



  • @mitu I first tried 4:3 as that's the standard for PS1 games. Everything worked fine so I upgraded to to 16:9. That one was also working very well so I'm now using it.


  • Global Moderator

    @FrenchAussie Well, I was interested in the resolution and not the aspect ratio. I'm curious if dropping the resolution down a bit and choosing Game Mode on the TV (thus disabling any post-processing on the TV side) would make this work without overclocking.



  • Oh sorry misunderstood. Well, it's a little bit all over the place. Before overclocking, one TV I tried had 720p. It had occasional audio cut outs. Another TV had external speakers and had a resolution of 1920x1080. That one had terrible audio drop outs that lasted the longest. The last one I tried was at 3,840x2,160 and was working better than the other two. The audio dropouts were there but they didn't last as long.

    Since that 720p TV still had audio drop outs, I don't think that could be the solution. But I haven't tried changing the resolution for any of the TVs so I'm not 100% sure.



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.