Audio performance - Awful

I’m running RetroPie 3.0 on a Raspberry 2b and everything is working, except the audio performance via 3.5 audio jack is awful.

N64 Emulator Mupen64plus runs very smooth with the default output via HDMI but when you change “/opt/retropie/configs/n64/mupen64plus.cfg” to output via analogue:-

Audio output to go to (0) Analogue jack, (1) HDMI
OUTPUT_PORT = 0

The emulator lags really badly due to the picade bootloader (BL) light flashing. Is there any way to resolve this issue ?

This is present on all emulators where you have the Raspberry volume (AlsaMixer) above 44 (in the green zone), but more of an issue with demanding emulators such as N64, Playstation etc

I can drop the AlsaMixer down to 5-10 and the performance improves, but the volume is so low you cannot hear it without putting your ear next to a speaker.

If anyone has any suggestions that would be great,

I had a similar issue with boot loader flashing when audio turned up, I was advised that boot loader flashing means the board is rebooting. A better power supply and usb micro cable sorted it out for me.

I read your issue and actually purchased an official Pi PSU hoping it would fix the problem.

Unfortunately, the issue remains… HDMI audio = no lag, Analogue audio = BL light flashing.

I’m wondering if the 12.1" display can output the audio to the speakers ?

Would smaller speakers be better ? Maybe the ones provided need too much juice to drive ?

Keeping the volume in Retropie @ 80% via GUI or audio setup mixer @ 44 is the sweet spot allowing the PiCade board to run at 100% without the BL light flashing.

It would appear that the N64 emulator is totally ignoring the system mixer volume. I’m guessing that if I could lower the volume in a config file then maybe the performance would be much improved.

Anyone know where to look ?

The Pi will actually, by default, cut out the power supply to its USB power at anything above 600mA. It’s possible to double this to 1.2A in software by turning on a transistor, which connects another resistor in parallel with the one that sets the current limit.

So, yes, the issue is that the Picade PCB draws a lot of juice when it’s driven to maximum volume, and even with a decent power supply the Pi will not only potentially not supply enough current, but actually cut the board off when it tries to draw what it needs.

I’m guessing then that the emulator lag comes from the constant re-enumeration of the board, which is a bit like you unplugging and replugging a USB keyboard 10 times a second. Do the controls even work at all under those conditions?

You can raise the current limit via config.txt ( documented here: https://projects.drogon.net/testing-setting-the-usb-current-limiter-on-the-raspberry-pi-b/ ) by adding:

safe_mode_gpio=4
max_usb_current=1

I’m not sure which of these is the correct setting for the present-day Pi, I believe it’s the latter. Give it a go, and let me know how you get on! ( Note: The ability to raise the limit is a by-design feature of the Pi and not some undocumented voodoo )

Thanks, also, for posting your findings thus far. I haven’t personally clocked many hours with a Picade, at least not many where I haven’t been working on the firmware, so many of you are now more experienced with how it handles than I am!

Changing the USB to output more power results in under voltage to the Raspberry as the PiCade pulls more juice.

This results in the rainbow block showing in the top right of the display as soon as the PiCade draws more juice.

I would advise avoiding as you’ll end up with a FUBAR Micro SD.

Undervoltage on the Pi means your power supply (assuming it is the 5V 2A one() is not strong enough. You need something which delivers more than 2A at 5V then.

It’s a hungry, hungry amplifier at higher amplification levels- 600mA and upwards, which doesn’t leave much headroom for a Pi 2 running CPU-intensive emulators.

Pi’s party line is to use a powered USB hub, but that’s a little less than ideal in the Picade, where having one power supply ( or two with a 12v screen ) is nice and tidy.

Turning the Pi volume down is what we tend to do, but if the N64 emulator is ignoring the system mixer then that warrants some investigation. The Picade doesn’t lend itself particularly well to N64/PSX era games, and I’ve not tried any on it yet ( actually the only one I own is Super Mario 64 )- but I’ll try and find the time to poke into it.

Gadgetoid,

As the Picade is so hungry would it be possible to limit via firmware what its maximum output volume is ?

It would appear that there are 4 presses of the volume buttons to go from minimum to maximum (or back).

I would like to be able to use the full range but without it dragging its self down due to the power requirements.

Could a Picade firmware be created that sets the output to 50% of what it currently is ?

It might then be possible to use the Raspberry mixer above (44) which I’m guessing would move the power load onto the Raspberry.

Just a thought, and although it wont help N64 emulation (with it ignoring the Pi volume) it might help with FBA and Mame emulators which do utilise the Pi mixer settings.

Spacemonkey

It’s definitely something I can look into. The Amp doesn’t have many volume steps; only 32. In the latest firmware I changed the volume buttons to continue to step through levels when you press-and-hold which might not be the right approach- it could well be that it’s skipping through multiple steps every press and I’ll have to find the right balance.

The exact steps, from the Amp datasheet, are as follows ( gain figures are in dB ):

STEP Gain   STEP  Gain STEP Gain
1    24     12    7.5  23  -10
2    22.5   13    6    24  -12
3    21     14    4.5  25  -14
4    19.5   15    3    26  -16
5    18     16    1.5  27  -18
6    16.5   17    0    28  -20
7    15     18   -1.5  29  -22
8    13.5   19   -3    30  -24
9    12*    20   -4.5  31  -26
10   10.36  21   -6    32  -80
11   9      22   -8 - - 

The * denotes default gain

1 Like

Well, if you need a beta tester for a volume limited firmware ;o)

I posted previously that running the Retropie mixer at 44 (or 80% in GUI) allowed the Picade to run at full volume without hanging the controls and dragging the power down. However, after much testing I have found that you have much better quality audio (with disable_audio_dither=1 in \boot\config.txt) if you set the audio mixer to have a dB gain of “0” or as close to as possible.

If you do this the audio is much improved but you MUST turn the Picade volume down to prevent lockups when it needs more power. A volume limited Picade firmware would help loads in this situation as you would then be able to max out the Vol+ button.

Monkey

Hi spacemonkey. Your post says you have n64 emulation working fine on picade. Please share your configs as my n64 emulator doesn’t seem to respond to the picade standard joystick. Thx.