PiZero Performance issues running BalenaSound?

Got up and running with BalenaSound on RasperryZeroW and Adafruit i2S DAC. using 32Mb SD Card class 10

I used the recommended one click deploy process, made changes to support DAC using hifiberry-dac config. Also turned off multiroom as I am not using it and originally saw some error messages.

I have balenaSound working well with Spotify using BT or SpotifyConnect.

I am however experiencing cutoffs from time to time. The error message is always a pcm underrun error as below

27.08.20 12:38:41 (-0400) spotify ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred

I exited BT support and it appears to help but still experiencing issues.
I did log into the console and run ‘top’ to look at CPU usage and there is headroom.

Any recommendations? Thanks.

Hello there, thanks for trying out balenaSound!
Regarding the performance issues you are facing, we’ve seen this happen in the past, in fact there is an open issue to keep track of this here: https://github.com/balenalabs/balena-sound/issues/26

If you can it would be helpful if you tried the proposed solution which is to set the spotify bitrate to 160 and see if that helps. You’ll need to clone the repository, edit spotify/start.sh script, replace 320 with 160 and then push your code either using the git push method or balena push. Let us know if you try it and it works.

Thank you for the information.

I have pushed the update as proposed using bitrate 160 and so far I am not seeing any underrun errors when playing spotify using SpotifyConnect client. .

I will do further testing with BT and upnp (I dont have Apple products to test airplay…)to see if I have other issues and report back.

I have multi-room disabled at the moment but I suspect the Pi0 would not be able to run the snapcast server.

I was hoping at least to use snapcast-client to listen to a stream from a mopidy server. My understanding is that the snapcast-client should use less resources that the librespot library. Ill give it a try.