No audio / audio crackle on Pi4

I’ve got the latest SonicPi 3.2.2_4 and the latest Raspbian on a Pi4 and there is no audio from SonicPi via HDMI or headhones/AUX.

The speaker-test -t wav -c 2 test plays audio ok.

I really would like AUX output to work.

This is related to: No audio through headphones

UPDATE: Workaround: Raspberry Pi, Pulse Audio Workaround with USB soundcard - #10 by robin.newman

Just saw this post, which has a reply to a another post with a fix that worked (albeit crackly audio) for me: SonicPi 3.2.2 on fresh Raspberry 3B+ no sound

hi @Wayne

Can you add [Solved] at the end of your subject ?

Hi Wayne. I notice you still have crackly audio. It may be that jack is not running quite properly. You could also try
sudo dpkg-reconfigure jackd2
from a terminal
when the Package configuration window appears select:
Enable realtime process priority?
and press enter.
Then reboot your Pi and see if that helps at all.

Hi Robin,

Thanks for the tip, but it didn’t make any difference to the audio.
It’s definitely a software, not jack, related issue as there are no audio artefacts when using a built-in shell based audio test tool.
The system eventually locked up (as the warning in the jackd2 config util said it might) requiring a cold reboot.


Hm I’ve just tried moving an SD card with patched SP3.2.2 to a Pi3B+ and it runs fine without crackling audio so it is possibile.
Could you get SP running and THEN startup Qjackctl which should inherit the already running jackd. Have a look at the messages and status and see if that gives a clue.

11:55:06.505 ALSA connection change.
11:55:06.583 JACK connection change.
11:55:06.596 Client activated.
11:55:06.597 Patchbay deactivated.
11:55:07.073 ALSA connection graph change.

Status: Pasteboard - Uploaded Image

anything else you need to see?

Hi @nlb, I put solved, although there is still an issue, audio crackles.

That looks OK. what does the Status window contain? And the Connect window?
EDIT what audio device are you using and how is it connected? HDMI? external usb card?3.5mm audio jack?

You can see the status in the screenshot linked to (Pasteboard link)
I’m using the Pi’s 3.5mm AUX

I’ll re-test and send the connect info.

Ah OK: sorry missed that. It looks OK. Well I’m not sure why you are breaking up. Is this so for everything, or only for high loads on SP. ie lost of fx and synths sounding. Do you get berakup playing a simple scale for example.
there have been quite a lot of upgrades to the OS since it was launched, some to do with pulseaudio and sound. Worth doing another

sudo apt update
sudo apt upgrade

and seeing if you get any difference.

The jack audio output on raspberry pi is not very good and I have already noticed that , some crackles, for many years. May I suggest you to use a USB external card. Scarlett Focusrite or hdmi output.

There is still crackling when using HDMI output.

@nlb I use other audio programs via the 3.5mm AUX that do not crackle (e.g. a builtin test program & an Amiga mod player in X windows via SDL)

@robin.newman I have uploaded the screen shots here (Output via HDMI this time, not AUX):

messages: Pasteboard - Uploaded Image
status: Pasteboard - Uploaded Image
connection: Pasteboard - Uploaded Image

all the best

The ‘Jungle’ demo is a very good example of it crackling, a lot.
Some of the pure synth demos (with less effect) don’t crackle nearly as much.

I’ll shall do the upgrade and retest after my little side project is wrapped up, shortly… (as sometimes apt upgrades have not gone to plan in the past)

Thanks for the help so far, will let you know how it goes.
All the best

New Raspberry Pi OS released dated Jan 11 2021 Release notes say it does some tweaks for pulseaudio so may be worth doing

sudo apt update
sudo apt full-upgrade

Thanks for the heads up.

I did the upgrade and can report that the issue still exists.
However, subjectively it’s not such a ‘bad crackle’, it’s now more like spots of rain or a dusty vinyl record.