One PI for two mono speakers

Hi Community,

I am using a Raspberry PI 4 with a Hifiberry AMP2.
Only one mono speaker is connected to the left output jack of the dac.
I have a second single speaker in another room and I want to know if I can create a solution like:

One raspberry PI4 with Hifiberry DAC AMP2.
Left speaker jack for single speaker 1
Right speaker jack for single speaker 2

Both speaker should be available as own devices for bluetooth and airplay.
I want to be able to play music from different sources at the same time on the speakers.

Is this possible with balena Sound?

Thanks in advance

Hello, I don’t think balena sound can do this as-is.

Hi @jolu1705,

BalenaSound currently can’t handle multiple audio sources at once. And each device is a stereo output for one audio stream. In order to do what you are looking for, it would require a pretty significant redesign of the system, all the way down to the protocols used under the hood. It would have to split stereo channels and re-mix them as dual mono, which is outside the scope of what the system is designed to do.

The components used within balenaSound are capable of doing all this. But it would present a lot of extra CPU load, and additional software and configurations to do the splitting and mixing.

1 Like

You could set up two instances of BalenaSound, each as a receiver. On another device not running BalenaOS, you could set up two instances of snapclient each connected to the balenaSound instances. You could configure each one to output to their own pulseaudo sink and then have pulseaudio mix the two streams together and output it.

Honestly, it’s a lot easier said than done. From what little container building I did with audio devices, it’s an absolute pain. It really makes me respect balenaSound for making this so seamless.

In case you decide to do this, here’s the only good guide I found on pulseaudio and ALSA when I was researching: https://gavv.github.io/articles/pulseaudio-under-the-hood/#key-abstractions

Let us know if you’re able to pull it off.