You are not logged in.

#1 2014-01-15 00:45:35

botika
Member
Registered: 2013-07-12
Posts: 34

[Solved] MPD - Failed to open audio output

This is a typical problem, but can not find a solution I searched for more. sound works, everything works, but when I give the play throws me this.
/etc/mpd.conf   audio_output

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

~/.asoundrc

defaults.pcm.card 0
defaults.pcm.device 0 
defaults.ctl.card 0
defaults.pcm.rate_converter "samplerate_best"

/etc/passwd

mpd:x:45:45::/var/lib/mpd:/bin/true

/etc/group

audio:x:92:pcare,mpd
mpd:x:45:

aplay  -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

tail  /var/lib/mpd/log

Jan 15 01:26 : alsa_output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": No such file or directory
Jan 15 01:26 : output: Failed to open audio output
Jan 15 01:26 : player: problems opening audio device while playing "Extremoduro/Para todos los publicos (2013)/04 - Poema sobrecogido.mp3"

He followed these guides: archwiki, wikia, musicpd , and many more forums and can not find the solution.
What should be my output and my asoundrc?

Regards

Solution:  the solution is to reinstall mpd with alsa settings in / etc / asound.conf

Last edited by botika (2014-01-21 02:15:21)

Offline

#2 2014-01-17 01:50:38

Gaff-the-Horse
Member
Registered: 2013-09-23
Posts: 1

Re: [Solved] MPD - Failed to open audio output

Hi

Remove (or comment out) audio_output

And start mpd again.

mpd can auto-detect any available audio devices.

Good luck...

Offline

#3 2014-01-17 20:05:24

botika
Member
Registered: 2013-07-12
Posts: 34

Re: [Solved] MPD - Failed to open audio output

I returned this:

ene 17 21:00:55 ddich systemd[1]: Starting Music Player Daemon...
ene 17 21:00:55 ddich systemd[1]: Started Music Player Daemon.
ene 17 21:00:55 ddich mpd[14061]: output: No 'audio_output' defined in config file
ene 17 21:00:55 ddich mpd[14061]: output: Attempt to detect audio output device
ene 17 21:00:55 ddich mpd[14061]: output: Attempting to detect a alsa audio device
ene 17 21:00:55 ddich mpd[14061]: ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ene 17 21:00:55 ddich mpd[14061]: ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_dri...ctory
ene 17 21:00:55 ddich mpd[14061]: ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ene 17 21:00:55 ddich mpd[14061]: ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat r...ctory
ene 17 21:00:55 ddich mpd[14061]: ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ene 17 21:00:55 ddich mpd[14061]: ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer re...ctory
ene 17 21:00:55 ddich mpd[14061]: ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file ...ctory
ene 17 21:00:55 ddich mpd[14061]: ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
ene 17 21:00:55 ddich systemd[1]: mpd.service: main process exited, code=killed, status=6/ABRT
ene 17 21:00:55 ddich systemd[1]: Unit mpd.service entered failed state.

Offline

#4 2014-01-18 00:14:17

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [Solved] MPD - Failed to open audio output

Try following mpd configuration:

device			"plug:default"
or
device			"plughw:0,0"
or
device			"plughw:PCH"

Maybe the soundcard is forced into specific format by something else. Is specifically dmix plugin working okay? With different formats?

Offline

#5 2014-01-18 04:17:15

botika
Member
Registered: 2013-07-12
Posts: 34

Re: [Solved] MPD - Failed to open audio output

I don't have dmix running, because here puts that is needless. Thanks but not work any config.

Offline

#6 2014-01-18 17:31:00

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [Solved] MPD - Failed to open audio output

I am aware of that, which is the reason I have asked you, if dmix is working okay (it is enabled by default as stated in your source link), meaning are you capable of playing multiple sounds, different sound-formats (especially with combination of stated plug[hw] combinations) at the same time through aplay? If yes, then alsa is not the problem.
Is mpd from repository or AUR or manually build? Try building the newest version with mpd-git package in AUR.

Offline

#7 2014-01-18 19:17:45

Proinsias
Member
From: Glasgow
Registered: 2013-08-19
Posts: 121

Re: [Solved] MPD - Failed to open audio output

I had a similar issue recently which I resolved by removing my ~/.asoundrc and setting my card defaults in /etc/asound.conf instead:

defaults.ctl.card 1
defaults.pcm.card 1
defaults.timer.card 1

Offline

#8 2014-01-19 23:09:59

botika
Member
Registered: 2013-07-12
Posts: 34

Re: [Solved] MPD - Failed to open audio output

Solved !!! When reinstalling mpd with this configuration /etc/asound.conf

defaults.pcm.device 0 
defaults.ctl.card 0 
defaults.pcm.card 0
defaults.timer.card 0
defaults.pcm.rate_converter "samplerate_best"

Successfully detected a alsa automatic with this /etc/mpd.conf

user "mpd"
pid_file "/run/mpd/mpd.pid"
db_file "/var/lib/mpd/mpd.db"
state_file "/var/lib/mpd/mpdstate"
playlist_directory "/var/lib/mpd/playlists"
music_directory "/var/lib/mpd/music"
log_file "/var/lib/mpd/log"
sticker_file "/var/lib/mpd/sticker.sql"

Ie the solution is to reinstall mpd with alsa settings in / etc / asound.conf. Thank you very much to all. Regards

Offline

#9 2014-01-20 02:42:15

Proinsias
Member
From: Glasgow
Registered: 2013-08-19
Posts: 121

Re: [Solved] MPD - Failed to open audio output

Glad to hear you got it working. In my case a reboot as opossed to reinstall, after modifying the asound, was all that was required.

Offline

#10 2014-01-20 04:34:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] MPD - Failed to open audio output

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB