Compression on Pirate Audio DAC killing BalenaSound quality on Pi3A


I have two Raspberry Pi 3s set up to act as Spotify streaming devices for old stereo systems.

I have one set up for a smaller 00s digital radio stereo system with an iPod dock and all that, for which I went with an Adafruit DAC Bonnet as I wasn’t overly concerned about studio-level sound quality. As it is, that one works perfectly with excellent output quality.

For my big, beefy 90s hi-fi system, I went with a Pimoroni Pirate Audio DAC as it seemed to be the one recommended for sound quality (as the successor of the hardware recommended on the Balena website writeup). Unfortunately, this is the device giving me problems. The sound quality is awful: highly compressed, distorted, overdriven.

The solution from users on the Pimoroni support forums seems to be to manually turn down the gain for the compressor:

Since BalenaSound and Pimoroni’s custom software use completely different architecture, would anyone be able to suggest how I could achieve the same solution using BalenaSound?

Hi @gdvh67,

Welcome to the forums!

I read through the forum post you linked above, and it does not seem related to this issue. The DAC chip used on these Pirate Audio boards does not have any compressor in them. (Datasheet: It’s also a different DAC chip than what’s being discussed in that post. The config change mentioned in the post is for the software they are using, which is VLC. It doesn’t affect the DAC at all. Just the software talking to the DAC.

I suspect your trouble is being caused by the DAC putting out too high of a volume for the input you have it plugged into, and the input is distorting. Try setting the environment variable SOUND_VOLUME to something really low, like 10 (allowable range is 0-100, default 75), and see if that helps.

My Pirate Audio DAC is working well on balenaSound, but its output volume is EXTREMELY high. I have to set the speaker volume to between 1 and 3 on a scale of around 25. So I suspect that is the root cause of your issue as well. In fact, I’m going to try setting SOUND_VOLUME as well, because I’m kinda tired of that device having volume troubles. :wink:

Let us know how it goes.


1 Like

Perfect. Reducing the volume to 25 solved the issue entirely.

Thanks a lot for the help and we can consider this one fixed!

1 Like

Thanks for the assist Mark!