You are not logged in.

#1 2019-08-31 12:03:20

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,688

[Solved] MPD failed to open ALSA device

I used to have a fully working mpd using a Cambridge Audio DAC as sound card and it worked exceedingly well. I needed a complete reinstall of Arch and am now trying to configure mpd and the DAC back to work but this time I am getting errors.

First I set up mpd as a systemd per user and it is enabled. Status is without error.
systemctl --user status mpd.service:

● mpd.service - Music Player Daemon
   Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-08-31 12:43:57 BST; 8min ago
     Docs: man:mpd(1)
           man:mpd.conf(5)
 Main PID: 5093 (mpd)
   CGroup: /user.slice/user-1000.slice/user@1000.service/mpd.service
           └─5093 /usr/bin/mpd --no-daemon

Aug 31 12:43:57 taichi-z270 systemd[679]: Starting Music Player Daemon...
Aug 31 12:43:57 taichi-z270 systemd[679]: Started Music Player Daemon.

However, I can't play any music. ncmpcpp always stuck in 'pause' and Cantata just don't play.
Here is part of mpd.log:

Aug 31 12:44 : exception: Failed to open "Cambridge Audio DAC" (alsa)
Aug 31 12:44 : exception: nested: Failed to open ALSA device "hw:0,0": Device or resource busy

I've searched the internet but can't find a satisfactory solution. I do however get a sound - browsers, Spotify and so I know ALSA is working. But note that I don't use pulseaudio.
Here is part of my mpd.conf:

audio_output {
	type                       "alsa"
	name                       "Cambridge Audio DAC"
	device                     "hw:0,0"
	#auto_resample              "no"
	#auto_format                "no"
	#auto_channels              "no"
	#replay_gain_handler        "none"
	#mixer_device               "default"
	#mixer_type                 "hardware"
}

Any reason why I get device or resource as busy?

Last edited by d_fajardo (2019-08-31 13:02:23)

Offline

#2 2019-08-31 12:30:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,418

Re: [Solved] MPD failed to open ALSA device

How many pulseaudio daemons are running?

Offline

#3 2019-08-31 12:51:52

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,688

Re: [Solved] MPD failed to open ALSA device

Thanks seth. I am not using pulseaudio but is it possible that a daemon is running even if I don't have it installed? How do you find that out?

Offline

#4 2019-08-31 12:56:29

loqs
Member
Registered: 2014-03-06
Posts: 19,100

Re: [Solved] MPD failed to open ALSA device

fuser -v /dev/snd/* #see what is accessing the sound cards
systemctl status --user pulseaudio.service
ps aux | grep pulseaudio #check globally for pulseaudio

Offline

#5 2019-08-31 13:02:04

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,688

Re: [Solved] MPD failed to open ALSA device

Thanks both of you. I found the culprit:
fuser -v /dev/snd/*

/dev/snd/pcmC0D0p:   brightchip    687 F...m timidity
/dev/snd/seq:        brightchip    687 F.... timidity
/dev/snd/timer:      brightchip    687 f.... timidity

This was because I was checking out some midi's. Solved!

Offline

Board footer

Powered by FluxBB