openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4k stars 3.48k forks source link

mpd-mini + alsa-lib: failed to open ALSA device #15356

Closed Vladdrako closed 3 years ago

Vladdrako commented 3 years ago

Device: ASUS RT-N14U (mt7620) Maintainer: @thess @tripolar

root@RT-N14U:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux 5.4.109 ehci_hcd EHCI Host Controller
Bus 002 Device 002: ID 1b3f:2008 GeneralPlus USB Audio Device
Bus 002 Device 001: ID 1d6b:0001 Linux 5.4.109 ohci_hcd Generic Platform OHCI controller
root@RT-N14U:~# lsusb -v -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
    ID 1d6b:0001
    |__ Port 1: Dev 2, If 0, Class=, Driver=snd-usb-audio, 12M
        ID 1b3f:2008
    |__ Port 1: Dev 2, If 1, Class=, Driver=snd-usb-audio, 12M
        ID 1b3f:2008
    |__ Port 1: Dev 2, If 2, Class=, Driver=snd-usb-audio, 12M
        ID 1b3f:2008
    |__ Port 1: Dev 2, If 3, Class=, Driver=usbhid, 12M
        ID 1b3f:2008
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    ID 1d6b:0002
root@RT-N14U:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Device [USB Audio Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@RT-N14U:~# alsactl init
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "USB-Audio" "USB Mixer" "USB1b3f:2008" "" ""
Hardware is initialized using a generic method
root@RT-N14U:~# mpc play
RetroFM: Retro FM
[paused]  #1/1   0:00/0:00 (0%)
volume: n/a   repeat: off   random: off   single: off   consume: off
ERROR: Failed to open "My ALSA Device" (alsa); Failed to open ALSA device "hw:0,0": No such file or directory

MPD config:

audio_output {
    type        "alsa"
    name        "My ALSA Device"
    auto_resample       "no"
#   format          "44100:16:2"
    device      "hw:0,0"    # optional
    mixer_type      "hardware"  # optional
#   mixer_device    "default"   # optional
    mixer_control   "Speaker"       # optional
#   mixer_index "0"     # optional
}

Previously I was on the build from 28.01.2021 and it works as expected. Same bug on 5.10 kernel.

neheb commented 3 years ago

run alsactl init with strace

Vladdrako commented 3 years ago

@neheb here (broken and working)

neheb commented 3 years ago

They both look broken. Exited with 99.

neheb commented 3 years ago

Looked at it closer. colordiff just shows allocations to different memory locations. There are also no changes to alsa-utils or lib within your timeframe.

This is probably a kernel issue.