Using PiSound with BabelPod

Hello,

I’m trying to use BabelPod to play records though my HomePod but I can’t get any audio. I’m running the latest Patchbox beta (2020-11-23-Patchbox).

My record player is connected to the PiSound input and I’m trying to play it through the headphones. BabelPod seems to recognize the PiSound with no problems but I still don’t get any audio.

I’m trying to follow the audio chain but don’t know enough to do so. Is there a way to just see if I’m getting any audio in to the PiSound? And follow that to the headphones?

Many thanks for any guidance.

RaspberryPi info:
$ uname -a
Linux patchbox 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 2: pisound [pisound], device 0: PS-3WSQVJC snd-soc-dummy-dai-0 [PS-3WSQVJC snd-soc-dummy-dai-0]
Subdevices: 0/1
Subdevice #0: subdevice #0

Hey, looks like you may check out the log of BabelPod by running:

journalctl -u babelpod.service

It could be that this software expects 44100 sampling rate, while Pisound natively supports 48000, 96000 and 192000. To make 44100 work, software resampling has to be set up, by creating an asound.conf file as described here:

Try doing everything but commands directly related to Raspotify.

Then if possible try to use ‘default’ audio device. If that’s not possible in BabelPod (I don’t see ‘default’ selection in its screenshots), you may have to do it via loopback device as described on Piping System Audio to Airplay (updated September 3rd, 2018).

Probably if you contact BabelPod developers, they might have some insight as well on how to get it working. :slight_smile:

Thank you @Giedrius. I looked through the BabelPod logs and it seems to be a JavaScript error that’s breaking this. I’ll try the re-sampling and see if maybe that’s the issue.

While trying new ways of doing this I went down the PulseAudio rabbit hole. Looks like there is a way to do it with module-raop-sink . Looks like the raop2 module that has the magic was added in PulseAudio 11 and the image is running 12, so we should be ok. I can see the Homepods with it:

$ pactl list short modules
0	module-device-restore		
1	module-stream-restore		
2	module-card-restore		
3	module-augment-properties		
4	module-switch-on-port-available		
5	module-udev-detect		
6	module-alsa-card	device_id="0" name="platform-bcm2835_audio" card_name="alsa_card.platform-bcm2835_audio" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"	
7	module-alsa-card	device_id="1" name="platform-bcm2835_audio" card_name="alsa_card.platform-bcm2835_audio" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"	
8	module-alsa-card	device_id="2" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"	
9	module-jackdbus-detect	channels=2	
10	module-native-protocol-unix		
11	module-gsettings		
12	module-raop-discover		
13	module-default-device-restore		
14	module-rescue-streams		
15	module-always-sink		
16	module-intended-roles		
17	module-suspend-on-idle		
18	module-console-kit		
19	module-systemd-login		
20	module-position-event-sounds		
21	module-role-cork		
22	module-filter-heuristics		
23	module-filter-apply		
24	module-raop-sink	server=[192.168.1.118]:7000 sink_name=raop_output.Master-Bedroom.local sink_properties='device.description="Master Bedroom" device.model="AudioAccessory1,1"' protocol=UDP encryption=none codec=ALAC latency_msec=2000	
25	module-raop-sink	server=[192.168.1.118]:7000 sink_name=raop_output.Master-Bedroom.local sink_properties='device.description="Master Bedroom" device.model="AudioAccessory1,1"' protocol=UDP encryption=none codec=ALAC latency_msec=2000	
26	module-raop-sink	server=[192.168.1.220]:7000 sink_name=raop_output.Living-Room.local sink_properties='device.description="Living Room" device.model="AudioAccessory1,2"' protocol=UDP encryption=none codec=ALAC latency_msec=2000	
27	module-raop-sink	server=[192.168.1.220]:7000 sink_name=raop_output.Living-Room.local sink_properties='device.description="Living Room" device.model="AudioAccessory1,2"' protocol=UDP encryption=none codec=ALAC latency_msec=2000	
28	module-raop-sink	server=[192.168.1.137]:7000 sink_name=raop_output.Kitchen.local sink_properties='device.description="Kitchen" device.model="AudioAccessory1,1"' protocol=UDP encryption=none codec=ALAC latency_msec=2000	
29	module-raop-sink	server=[192.168.1.137]:7000 sink_name=raop_output.Kitchen.local sink_properties='device.description="Kitchen" device.model="AudioAccessory1,1"' protocol=UDP encryption=none codec=ALAC latency_msec=2000	
30	module-cli-protocol-unix

But when I try to use the loopback to play though them I get an error:

$ tail -f /var/log/syslog
Mar 21 22:21:34 patchbox pulseaudio[5579]: W: [pulseaudio] rtsp_client.c: Unexpected/Unhandled response: Server: AirTunes/521.2.7
Mar 21 22:21:34 patchbox pulseaudio[5579]: W: [pulseaudio] rtsp_client.c: Unexpected/Unhandled response: CSeq: 3
Mar 21 22:21:34 patchbox pulseaudio[5579]: W: [pulseaudio] rtsp_client.c: Unexpected/Unhandled response:
Mar 21 22:21:41 patchbox pulseaudio[5579]: W: [pulseaudio] module-loopback.c: Configured latency of 1.00 ms is smaller than minimum latency, using minimum instead
Mar 21 22:21:41 patchbox pulseaudio[5579]: W: [pulseaudio] module-loopback.c: Cannot set requested sink latency of 138.38 ms, adjusting to 250.00 ms
Mar 21 22:21:49 patchbox pulseaudio[5579]: W: [pulseaudio] rtsp_client.c: Unexpected/Unhandled response: RTSP/1.0 500 Internal Server Error
Mar 21 22:21:49 patchbox pulseaudio[5579]: W: [pulseaudio] rtsp_client.c: Unexpected/Unhandled response: Content-Length: 0
Mar 21 22:21:49 patchbox pulseaudio[5579]: W: [pulseaudio] rtsp_client.c: Unexpected/Unhandled response: Server: AirTunes/535.4.41
Mar 21 22:21:49 patchbox pulseaudio[5579]: W: [pulseaudio] rtsp_client.c: Unexpected/Unhandled response: CSeq: 2

I’ll keep digging, but thank you so much for the guidance.

1 Like

Updating now that I got this to work. The original BabelPod repo seems to be abandoned but another community member has sort of taken it over and addressed the issues.

Here’s the comment to follow to get it to work: Successful install, but no audio playing on Homepod · Issue #17 · afaden/babelpod · GitHub

The system does seem to expect 44100 sampling rate so the steps in the comments above are also needed.

1 Like