Problems opening audio device, but only sometimes

Need help with MPD?
Post Reply
RobinJ1995
Posts: 1
Joined: August 6th, 2013, 8:43 am

Problems opening audio device, but only sometimes

Post by RobinJ1995 » August 6th, 2013, 8:54 am

Hi

I'm using MPD (and MPC) as backend for a web interface. And when it works, it's awesome. The trouble is, it only works around 50% of the time. When it doesn't work, either it's telling me it can't open the audio device;

Code: Select all

robin@RobinJ:~$ mpc play
AC/DC - Baby, Please Don't Go
[paused]  #1/1   0:00/4:50 (0%)
volume: n/a   repeat: off   random: on    single: off   consume: off
ERROR: problems opening audio device
, or otherwise the volume is simply stuck at n/a and it won't let me change it;

Code: Select all

robin@RobinJ:~$ mpc volume 100
error: problems setting volume
At the moment, I'm facing both. Sometimes this happens after 1 minute, and sometimes only after a few hours. But when it happens, I have to either reboot the system or go and work on something else. I can do all the service restarts I want, but once it goes into a tantrum, it simply denies service.

I'd be really grateful if any of you could help me resolve this problem, because it's really starting to get on my nerves :)

Technical information

Code: Select all

robin@RobinJ:~$ mpd --version
mpd (MPD: Music Player Daemon) 0.16.5 

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2010 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Supported decoders:

[mad] mp3 mp2
[vorbis] ogg oga
[oggflac] ogg oga
[flac] flac
[audiofile] wav au aiff aif
[faad] aac
[mpcdec] mpc
[wavpack] wv
[mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
[ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav wma wmv wsaud wsvga wv wve

Supported outputs:

shout null fifo pipe alsa ao oss pulse jack httpd recorder 

Supported encoders:

null vorbis lame wave flac 

Supported protocols:

file:// http:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps://

Code: Select all

robin@RobinJ:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 13.04
Release:	13.04
Codename:	raring

Code: Select all

robin@RobinJ:~$ uname -a
Linux RobinJ 3.8.0-27-generic #40-Ubuntu SMP Tue Jul 9 00:17:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Code: Select all

robin@RobinJ:~$ cat /var/log/mpd/mpd.log
Aug 06 10:37 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:37 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:38 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:38 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:38 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:38 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:38 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:38 : decoder_thread: curl failed: The requested URL returned error: 400 Bad Request
Aug 06 10:38 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Aug 06 10:38 : avahi: Service 'Music Player' successfully established.
Aug 06 10:38 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:38 : player_thread: problems opening audio device while playing "http://stream159d.grooveshark.com/stream.php?streamKey=[cutting this out...]"
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : player_thread: problems opening audio device while playing "ACDC/1975 - High Voltage (Australian)/ACDC - High Voltage (Australian) - 01 - Baby, Please Don't Go.mp3"
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : player_thread: problems opening audio device while playing "ACDC/1975 - High Voltage (Australian)/ACDC - High Voltage (Australian) - 01 - Baby, Please Don't Go.mp3"
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:39 : avahi: Service 'Music Player' successfully established.
Aug 06 10:39 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Aug 06 10:39 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:41 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Aug 06 10:41 : avahi: Service 'Music Player' successfully established.
Aug 06 10:41 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:41 : output: Failed to open "My Pulse Output" [pulse]: failed to connect: Connection refused
Aug 06 10:41 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:41 : output: Failed to open "My Pulse Output" [pulse]: failed to connect: Connection refused
Aug 06 10:41 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy
Aug 06 10:41 : output: Failed to open "My Pulse Output" [pulse]: failed to connect: Connection refused
Aug 06 10:41 : avahi: Service 'Music Player' successfully established.
Aug 06 10:41 : mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
--Edit--
I've been playing around a bit with the outputs in an attempt to solve this problem. The outputs which are normally enabled are alsa and httpd :)

Post Reply