You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got the following Audio Output configuration in the mpd.conf
audio_output {
type "alsa"
name "Digital Stereo"
device "cards.pcm.iec958" # have also tried "hw:3,0"
}
And that yields the below error on run (docker compose down && docker compose up)
mpd | ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
mpd | ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
mpd | ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
mpd | ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
mpd | ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
mpd | ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
mpd | ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory
mpd | ALSA lib control.c:1528:(snd_ctl_open_noupdate) Invalid CTL default
mpd | mixer: Failed to read mixer for 'Digital Stereo': failed to attach to default: No such file or directory
This seems to be a permission issue.
You can open a shell in the container with docker exec -it mpd sh and try the following:
apk add alsa-utils sudo
speaker-test # working for me
sudo -u mpd speaker-test # not working
ls -l /dev/snd/ # the content should be owned by group audio
chown -R root:audio /dev/snd/*
sudo -u mpd speaker-test # working now
However, mpd can still not access the sound card, so there is probably another problem with the permissions. It might be required, to use the same gid for the audio group in the container as on the host.
As a workaround, you can change the user in mpd.conf from "mpd" to "root". However, this is probably not a good idea.
I've got the following Audio Output configuration in the mpd.conf
And that yields the below error on run (
docker compose down && docker compose up
)My docker-compose.yml as follows
Host is rock64 SBC running Ubuntu 18.04 server
On the host, the following speaker-test runs output sound properly:
The text was updated successfully, but these errors were encountered: