Closed bedrin closed 3 years ago
I’m afraid I don’t have an angle on this. If you use aplay
to play something to the default when it’s set up like that, does it work?
I’m afraid I don’t have an angle on this. If you use
aplay
to play something to the default when it’s set up like that, does it work?
Yes, it does. I can run bluealsa-aplay
and just aplay
against default device simultaneously and it mixes the sound correctly without any errors
I think I've narrowed the issue down to docker. When I'm calling aplay -L
inside the container it doesn't show my dmixer at all
~ # aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dacplus, HiFiBerry DAC+ HiFi pcm512x-hifi-0
Default Audio Device
I am using mikebrady/shairport-sync:3.3.7rc2
image. Had to install alsa-utils manually to call aplay -L.
Tried mounting /etc/asound.conf
from my host but it didn't help
After some googling it turned out it's a common issue with docker. I guess I should switch to Pulse Audio or just use shairport-sync without docker.
Closing this issue as it seems to have nothing to do with shairport-sync.
Sorry for using this issue as a notebook - I haven't had a chance to return to this issue yet. But it looks like it should be possible. Keywords are "--ipc=host" for running docker container and "ipc_key / ipc_perm" in asound.conf
Many thanks -- your "notebook" might be useful to others!
Yeah in your docker run just make sure you have
--ipc=host \
-v "/etc/asound.conf:/etc/asound.conf:ro" \
For my respeaker 2mic card the only thing that was missing from install was the ipc_perm 0666
but it looks like this
# The IPC key of dmix or dsnoop plugin must be unique
# If 555555 or 666666 is used by other processes, use another one
# use samplerate to resample as speexdsp resample is bad
defaults.pcm.rate_converter "samplerate"
pcm.!default {
type asym
playback.pcm "playback"
capture.pcm "capture"
}
pcm.playback {
type plug
slave.pcm "dmixed"
}
pcm.capture {
type plug
slave.pcm "array"
}
pcm.dmixed {
type dmix
slave.pcm "hw:seeed2micvoicec"
ipc_key 555555
ipc_perm 0666
}
pcm.array {
type dsnoop
slave {
pcm "hw:seeed2micvoicec"
channels 2
}
ipc_key 666666
ipc_perm 0666
}
speaker-test
on the host cli and also in the container and I get a double mix on the same device (2mic) output
I'm trying to combine shairport-sync with bluealsa-aplay on a single Raspberry PI box. I can get them working independently and the mixer itself works fine (I can combine aplay of local file with bluealsa-aplay)
However I cannot get shairport-sync working with my mixed.
Here's my asound.conf:
aplay -L output:
I've removed all configuration of shairport-sync I had so just using default alsa setup.