Streaming my Linux sound to a Raspberry Pi over the network - Rpi as audio sink
by bennypr0fane from LinuxQuestions.org on (#5R8MJ)
I've found several topics scattered across the net covering this (also one in here, but unresolved) - but instructions in the tutorials diverge from what I find on my RPi OS, and mostly they're several years old, so I dare open a new thread.
Setup: desktop pc is Manjaro Linux, the Raspberry Pi has Raspberry Pi OS Stretch. I reach it using RealVNC Viewer from my desktop. Both are connected to the same router via cable. I have my stereo hooked up to the RPi at the analog audio 3,5mm plug, and I'd like it to play all sound from my desktop.
I've tried to make it happen using Pulseaudio tools:
1. Installed Paprefs on both machines.
2. Settings on Manjaro:
https://paste.pics/536e2061dc0fd10f587d71b7e1f2c35d
https://paste.pics/a5e906d75a2e3273af9e8851a0994df3
3. Settings on RPiOS:
https://paste.pics/ee29173c4f73aefc0098905250b9cc8e
https://paste.pics/b412d20f9e4b4cdd9e09caba88ba7f0e
https://paste.pics/b055ae738cd50318aea80b40b1a5f70a
https://paste.pics/7b72f16a77a0448ee3c266fa359e047e
4. RPi appears as a sound sink in Manjaro, but two duplicates :confused:. Selecting either does not make the sound come out the stereo.
You guessed it, I'm confused about a couple things:
- The server is Manjaro, the client is RPiOS, right?
- RTP: do I even need it? If yes, how are the correct settings?
- Correct settings for Paprefs on each machine. I've played around a good two hours, no luck. I've verified on RPi that it can output its own sound to speakers alright. It just won't pass on the ones from Manjaro.
Here's a thread on Stack Exchange that provides instructions for my use case, but for example /etc/default/pulseaudio does not exist on my RPiOS, so I'm unsure which are the correct config files on my system. These things do change around a lot as versions progress.
If anyone here is up to speed, all help is greatly appreciated!
EDIT: more info on the RPi situation: The playback stream going on in Manjaro (Spotify) is visible in RPi Pavucontrol (the volume bar is also moving)
https://paste.pics/3a6f4b9f21de80f425f3ec9e8846c0dd
https://paste.pics/5fb23e13c9a773ed1443e4ce3c219949
https://paste.pics/c6ca9e4a578c35435b8514d2297b8f30
but it's not in the systray applet:
https://paste.pics/b968dad3d20dcc59524e451ce75571d4
EDIT: What's a good CLI command for diagnosing audio devices, network audio? Screenshots are a bit of a pain...
The pulseaudio CLI has a lot of options, this is my best guess:
On Manjaro:
Code:[ben@catull-mnj ~]$ pulseaudio --dump-conf
### Aus Konfigurationsdatei wird gelesen: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = no
rescue-streams = yes
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-15.0/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target =
log-level = notice
resample-method = auto
avoid-resampling = no
enable-remixing = yes
remixing-use-all-sink-channels = yes
remixing-produce-lfe = no
remixing-consume-lfe = no
lfe-crossover-freq = 0
default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 25
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000On RPi:
Code:pi@raspberrypi:~ $ pulseaudio --dump-conf
### Aus Konfigurationsdatei wird gelesen: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = yes
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-12.2/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target =
log-level = notice
resample-method = auto
avoid-resampling = yes
enable-remixing = yes
remixing-use-all-sink-channels = yes
enable-lfe-remixing = no
lfe-crossover-freq = 0
default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 15
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000
Setup: desktop pc is Manjaro Linux, the Raspberry Pi has Raspberry Pi OS Stretch. I reach it using RealVNC Viewer from my desktop. Both are connected to the same router via cable. I have my stereo hooked up to the RPi at the analog audio 3,5mm plug, and I'd like it to play all sound from my desktop.
I've tried to make it happen using Pulseaudio tools:
1. Installed Paprefs on both machines.
2. Settings on Manjaro:
https://paste.pics/536e2061dc0fd10f587d71b7e1f2c35d
https://paste.pics/a5e906d75a2e3273af9e8851a0994df3
3. Settings on RPiOS:
https://paste.pics/ee29173c4f73aefc0098905250b9cc8e
https://paste.pics/b412d20f9e4b4cdd9e09caba88ba7f0e
https://paste.pics/b055ae738cd50318aea80b40b1a5f70a
https://paste.pics/7b72f16a77a0448ee3c266fa359e047e
4. RPi appears as a sound sink in Manjaro, but two duplicates :confused:. Selecting either does not make the sound come out the stereo.
You guessed it, I'm confused about a couple things:
- The server is Manjaro, the client is RPiOS, right?
- RTP: do I even need it? If yes, how are the correct settings?
- Correct settings for Paprefs on each machine. I've played around a good two hours, no luck. I've verified on RPi that it can output its own sound to speakers alright. It just won't pass on the ones from Manjaro.
Here's a thread on Stack Exchange that provides instructions for my use case, but for example /etc/default/pulseaudio does not exist on my RPiOS, so I'm unsure which are the correct config files on my system. These things do change around a lot as versions progress.
If anyone here is up to speed, all help is greatly appreciated!
EDIT: more info on the RPi situation: The playback stream going on in Manjaro (Spotify) is visible in RPi Pavucontrol (the volume bar is also moving)
https://paste.pics/3a6f4b9f21de80f425f3ec9e8846c0dd
https://paste.pics/5fb23e13c9a773ed1443e4ce3c219949
https://paste.pics/c6ca9e4a578c35435b8514d2297b8f30
but it's not in the systray applet:
https://paste.pics/b968dad3d20dcc59524e451ce75571d4
EDIT: What's a good CLI command for diagnosing audio devices, network audio? Screenshots are a bit of a pain...
The pulseaudio CLI has a lot of options, this is my best guess:
On Manjaro:
Code:[ben@catull-mnj ~]$ pulseaudio --dump-conf
### Aus Konfigurationsdatei wird gelesen: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = no
rescue-streams = yes
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-15.0/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target =
log-level = notice
resample-method = auto
avoid-resampling = no
enable-remixing = yes
remixing-use-all-sink-channels = yes
remixing-produce-lfe = no
remixing-consume-lfe = no
lfe-crossover-freq = 0
default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 25
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000On RPi:
Code:pi@raspberrypi:~ $ pulseaudio --dump-conf
### Aus Konfigurationsdatei wird gelesen: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = yes
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-12.2/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target =
log-level = notice
resample-method = auto
avoid-resampling = yes
enable-remixing = yes
remixing-use-all-sink-channels = yes
enable-lfe-remixing = no
lfe-crossover-freq = 0
default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 15
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000