I was able to use PulseAudio to route my audio to the RPi.
The superuser question linked by @user1937198 gave me a place to start, however I wasn't able to publish over ssh as suggested by the article because when I typed in ssh -R ...
I was given the ssh usage help:
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-E log_file] [-e escape_char]
[-F configfile] [-I pkcs11] [-i identity_file]
[-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec]
[-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address]
[-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
[user@]hostname [command]
... -R doesn't work on the box, and I didn't want to solve that problem right now. Later in the article it mentioned using avahi-daemon
and pulseaudio-zeroconf
, so I googled up this post on reddit which led me to this page on archlinux for PulseAudio, which is thoroughly confusing for me. I think the main problem was that the box where I want the sound to come from doesn't have any sound hardware, and the instructions are written as if I did have sound devices, so list different things.
I tried seeing what my audio card was using pactl info
which gave me
Server String: /run/user/1000/pulse/native
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 14
Tile Size: 65472
User Name: tim
Host Name: shed
Server Name: pulseaudio
Server Version: 11.1
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: auto_null
Default Source: auto_null.monitor
Cookie: b8fd:27d4
In the end I did these steps on the HP (audio source):
- ran
sudo apt install pavucontrol
- ran
sudo apt install pulseaudio-module-zeroconf
- edited /etc/pulse/default.pa and uncommented all the lines that load the zeroconf modules. I probably only needed to uncomment one of the modules, but I wasnt sure which one so I just did them all.
- Rebooted this machine.
On the RPi (audio output) I did:
- ran
sudo apt install paprefs
- ran
paprefs
- went to 'network server' tab, then ticked 'enable' and 'allow others' and 'dont require authentication'
- rebooted this machine
This initially did nothing, so I threw my hands in the air and walked away for an hour.
Then the audio started being piped from ElementryOS to Raspbian all on its own. I think the most important step here happened by leaving it for a bit so zeroconf could figure itself out.
I now have audio. It's a bit choppy at times but it's better than nothing at all. Hope some of this makes sense to a future reader!