sharing pulseaudio devices over the network for sdr

I finally put together the SoftRock Lite II kit that I picked up a while back.

/images/soft_rock_lite_ii_web.jpg

The kit itself was a pretty fun build, but when I was done, I couldn’t get it working with either of the laptops that I had at the time. They both had those combo headphone/mic jacks and I tried in linux and windows and I couldn’t get either to work. The only other computer in the house with an audio line in port (that was in an operable state) was my media server.

My media server is a mini-ITX box running headless arch linux. It had no X server and I wasn’t going to install one, so I started looking around at my options and it turns out with pulseaudio you can share audio devices over the network.

To set up network streaming, on the server edit /etc/pulse/default.pa and add:

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;10.1.1.0/24 auth-anonymous=1

This will allow anonymous clients on the 10.1.1.0 network to connect to your pulseaudio server.

For zeroconf publishing, start and enable the avahi-daemon systemd unit on both the client and the server.

Then, on the server, edit /etc/pulse/default.pa and add:

load-module module-zeroconf-publish

On the client, edit /etc/pulse/default.pa and add:

load-module module-zeroconf-discover

Once that is set up, on the client computer, you can launch pavucontrol and you will see the sinks and sources from the pulseaudio server.

With the sdr plugged into the media server, I can now set up the software on the client to use the input from the media server.

It works pretty well. I can leave the sdr plugged into the media server and antenna and go anywhere around the house with my laptop while listening to the sdr. It even works over a vpn, so I don’t even have to be at home to listen to my sdr.

/images/soft_rock_cubicsdr_sshot_web.png