Skip to content

Alsa audio output not working #9

@curiousercreative

Description

@curiousercreative

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

My docker-compose.yml as follows

services:
  mpd:
    image: tobi312/rpi-mpd:alpine
    #image: tobi312/rpi-mpd:debian
    container_name: mpd
    restart: unless-stopped
    ports:
      - 6600:6600  # MPD Client
      - 8000:8000  # Stream
    volumes:
      - "/some/path:/var/lib/mpd/music:ro"
      - ./playlists:/var/lib/mpd/playlists:rw
      - ./data:/var/lib/mpd/data:rw
      - ./mpd.conf:/etc/mpd.conf:rw
    devices:
      - /dev/snd
    cap_add:
      - SYS_NICE

Host is rock64 SBC running Ubuntu 18.04 server

$ uname -a
Linux blahblah.com 4.4.190-1233-rockchip-ayufan-gd3f1be0ed310 #1 SMP Wed Aug 28 08:59:34 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

On the host, the following speaker-test runs output sound properly:

speaker-test
speaker-test -c2
speaker-test -c2 --device cards.pcm.iec958
speaker-test -c2 --device hw:3,0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions