Some Bits: Nelson's log

Streaming Linux audio to a Sonos S1

My new Linux desktop has a neat trick: I can route the sound I’m hearing to my Sonos S1 speakers. It’s always annoyed me I couldn’t do that easily before.

The magic plumbing is PulseAudio, the Linux subsystem that handles media streams. (Or actually PipeWire, the replacement.) Basically it lets you pipe music (and video) around from program to program.

There’s a third party Sonos controller app for Linux called Noson. It has the ability to tell the Sonos unit to play audio from a network stream. It will then create a network stream for you that is listening to PulseAudio on your Linux box.

Once this is going the Sonos shows it is playing a track named “pulse.flac?acr=hostname:1400”. I don’t think hostname has to actually resolve for it to work.

The other trick is to get the audio going out to PulseAudio. For me the source I want to play is Plexamp. By default Plexamp is playing out my speakers. I used pavucontrol to re-route it, choosing “noson” instead of my usual sound card / speakers for the output. I think I could also have just set this in Plexamp: right now it’s being told to play to “System default” but I can choose where it goes inside the app.

The one downside to this setup is latency. Sonos wants to buffer a stream before playing it so anything I play is delayed about 10 seconds. Not awful but a little annoying.

I’m doing all this to get Plexamp to drive the speakers in my house. Plexamp is really cool, working off my music library and doing all sorts of advanced DJ and mood / genre matching tricks.

(As with anything these days, I figured all this out thanks to AI. Here’s a link to the conversation.)

Pipewire

Need to learn more about this! Here’s what qpwgraph shows me, you can also edit this like patch bays. coppwr is another tool that shows a similar view with more low level detail