This project was born as I started only to listen to streamin music services once I my Sonos system. But I also have a collection of vinyl that I didn't wanted to throw away and keeping the whole old setup was kind of overkill. Unfortunately there isn't such a great offering from Sonos to enable vinyl players as source in the network is rather limited and expensive at the same time the idea was born to reuse a raspi and a USB Audio device to solve this issue.
In my first try I was using a Raspberry Pi Zero W and a Behringer UFO202 which did work but also had it caveats as the CPU was dramatically overwhelmed with MP3 encoding. So in the meantime I upgraded to a Raspberry Pi 3b+ and also swapped the Behringer device with a proper high quality Phono PreAmp โ the rega Fono Mini A2D mk2.
Additionally with this switch I wanted to optimize the setup and also switch to a docker based setup. tl;dr: this actually works like a charm now but also has a couple of problems:
- ~~ the container is rather huge as I based it on the
balenalib/raspberry-pi3-debian:buster-run
image ~~ now the container is even bigger but in exchange build in a true multiarch way - it runs 2 processes in the same container as icecast2 is started as a service UPDATE: although not really clean this is a benefit given that the container is based on
debian:11-slim
as no additional linkage or networking needs to be established - there is very likely a ton of things brought in with the debian package of
liquidsoap
than actually needed - default passes haven't been changed yet โ look at the Dockerfile it is way too simple to sort these things out
- the input and encoding are hardcoded in the liquidsoap call starting the process to the first subsystem of the first input
Starting this thing is actually as easy as calling:
$ docker run --name sonos_vinyl --rm -d -p 7000:7000 --device /dev/snd docker.io/deichten/sonos-vinyl:latest
Where the name is absolutely optional and I only added for readability. Afterwards you might open http://<your-raspi-docker-host-address>:8000/
in your browser and start streaming the audio input.
As this repo is setup to build a new container version via github actions I also run containrrr/watchtower to keep the version always up to date on my Raspi.