-- Leo's gemini proxy

-- Connecting to dece.space:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en

Streaming sound to my Raspberry Pi


This is a short report on how I set up my computer to play music to my sound system through my Raspberry Pi sitting next to the amplifier. I have a neat sound system (Pioneer A30 and cute little Mission speakers) and I thought it would be nice to stream audio to it instead of using the aux cord!


The Pi runs the official image which uses Pulseaudio by default for sound management, like my computers, so we're going for a pure Pulseaudio network setup without external programs or sound servers. The Pi just needs to enable the adequate modules, and to do this you need to set — or in my case, simply uncomment — the appropriate lines in `/etc/pulse/default.pa`.


load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.1.0/24
load-module module-zeroconf-publish

Ensure you have to Pulseaudio Zeroconf module package installed, then restart Pulseaudio to start advertising your audio interfaces:


sudo apt install pulseaudio-module-zeroconf
systemctl --user restart pulseaudio

Note for other systems: if Pulseaudio is running in system mode (i.e. as root) on your system, you need to edit system.pa instead of default.pa, and drop the `--user` flag of the command above.


On the computer that will stream media, I used the small GUI app named paprefs (Pulseaudio Preferences) to setup streaming by checking a lot of checkboxes, but the only one that actually required some checking was "Make discoverable PulseAudio network sound devices available locally" in the "Network Access" tab. Restart Pulseaudio and you should now see the sound interfaces of the Pi on your computer! In my case, the card is called "USB Sound Blaster HD Analog Stereo on pi@selen" and can be selected as the default output device.


The Pi uses an USB sound card, itself connected through RCA cables to the amplifier, but it requires no configuration as long as the snd_usb_audio module loads correctly. Happy listening!


Resources:


PulseAudio network setup

-- Response ended

-- Page fetched on Thu May 9 10:34:41 2024