Replies: 2 comments 4 replies
|
So I went the PipeWire route for a while with high hopes seeing how it seems to be the latest and greatest but I've decided it's a pile of dog shiiit and decided to giving pure ALSA a shot again. In the past I had issues with the container complaining about the device being busy eveh though I could play to both at the same time on the host at the same time. I remembered reading somewhere around here that it was an IPC related issue that was solved with a docker config change. So searching around I found your post here and In my alsa config I have this to make a dmix for one of my 5.1ch cards: Then in my PA config I have these entries to take two channels from my 5.1ch card and make them look like two stereo outputs for use in shairport-sync: My docker compose looks something like this: services:
Kitchen:
container_name: Kitchen
image: mikebrady/shairport-sync:latest
restart: unless-stopped
volumes:
- /var/run/pulse:/var/run/pulse # <- this may need adjusting to match the environment on your host. Your host OS my put the pulse socket/cookie somewhere else.
- ./shairport-sync-Kitchen.conf:/etc/shairport-sync.conf
networks:
- spsnet_shared
- spsnet
Guest_Bathroom:
container_name: Guest_Bathroom
image: mikebrady/shairport-sync:latest
restart: unless-stopped
volumes:
- /var/run/pulse:/var/run/pulse
- ./shairport-sync-Guest_Bathroom.conf:/etc/shairport-sync.conf
networks:
- spsnet_shared
- spsnet
networks:
spsnet:
name: spsnet
driver: macvlan
driver_opts:
parent: enp6s0 # <- this should match the NIC on your host which you want sps to run on
ipam:
config:
- subnet: 10.18.0.0/16 # <- this should be the subnet on your host which you want sps to run on
ip_range: 10.18.15.0/29 # <- this should point to an unused block of IPs within your main subnet. For example, outside your DHCP range.
gateway: 10.18.3.1
spsnet_shared:
name: spsnet_shared
driver: bridge
And the relevant parts of the shairport-sync.conf: Hope this helps and thanks for the |
|
Just coming back here to update this, I did get a solution working on a baremetal raspi. I think most of the issues I had were from the complexity of my server running the VM. Here is a repo that walks you by step by step on setting up a raspi with compose for multiple instances and splitting up the audio on a 7.1 surround sound DAC https://github.com/glasscake/Shairport-Sync-Multizone-Audio-on-Pi4 |
Uh oh!
There was an error while loading. Please reload this page.
Running on Debian 12. 1 usb DAC, trying to have the audio from two instances split into the left and right channel of the usb dac.
I started with just ALSA and made two plugs with just the left / right channel in the asound.conf file. from this guide :
https://bootlin.com/blog/audio-multi-channel-routing-and-mixing-using-alsalib/
I got that working but ran into the device being locked when trying to play simultaneously. IPC=Host on the containers did not fix this issue either.
So now ive moved to pulse and with a pulse sink to the ALSA hardware directly I get output again. I can not get it to give me output on my plugs configured in asound.conf. so the following gives me output on both channels:
load-module module-alsa-sink device=hw:0 sink_name=pamaster
But now I cant get it to output to one of my asound.conf plugs, dmix, dshare. anything.
load-module module-alsa-sink device=out0 sink_name=paout0
gives me no output.
I tried to pivot and use just pulse audio to do the splitting but I get errors. (not at my computer right now so i cant specify what errors)
load-module module-alsa-sink device=hw:0 sink_name=pamaster
load-module module-remap-sink sink_name=paleftonly master=pamaster channels=1 master_channel_map=front-left channel_map=front-left remix=no
I think im close here, but there must be something slightly wrong in my context.
Super awesome project btw, I know the multiple instances is defiantly niche and difficult to setup. If anyone could help me out that would be much appreciated ive given this a good 8-10 hours of troubleshooting. and to be honest its probably easier to just buy multiple usb dacs, ignore the second channel, and give each instance its own dac lol.
Thanks in advance.
All reactions