MPD Prevents Other Applications from Using Audio while not stopped

Bug #364475 reported by Billie Thompson
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
mpd (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: mpd

Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty
Version: 0.14.2-3ubuntu2
Linux wab-laptop 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU/Linux

I remember this happening with Flash pre-10 x64 beta too, so it's something to do with PulseAudio.

Revision history for this message
Billie Thompson (billiecodes) wrote :

I fixed this for myself by adding

## PulseAudio as per the description on http://www.pulseaudio.org/wiki/PerfectSetup#MPD

audio_output {
        type "pulse"
        name "My MPD PulseAudio Output"
# server "localhost" # optional
# sink "alsa_output" # optional
}

to my configuration. For some reason it doesn't work if you have the server defined, or the sink defined.

Revision history for this message
Billie Thompson (billiecodes) wrote :

As this is a more "working" default set-up, perhaps MPD should come pre-configured this way on Ubuntu?

Revision history for this message
Andreas Moog (ampelbein) wrote :

Confirming here, the proposed workaround works. Will try to get that as a default in karmic.

Changed in mpd (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
blahde (daisy-ice) wrote :

I am experincing the same Problem on karmic now.

When I am playing any sort of sound in any other application the mpd log comes up with the message:
"output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": Device or resource busy" when i am hitting the Play button in a local or remote Client.

Than if I exit all programs accessing ALSA, after a few seconds MPD is willing to play music. But than (as described in the title) all the other applications are muted.

This was not the case on jaunty. I did not use pulse on Jaunty, in order to get my external soundcard working I had only ALSA installed and I am pretty sure that I heard pidgin notifications while listening to music in MPD. Now I can't test it anymore, cause i have replaced jaunty with karmic.

The only changes i made in the mpd.conf was that I set the mixer_type to softare, but changing it back to hardware does not solve the issue.

Any help on this would be appreciated.

Revision history for this message
blahde (daisy-ice) wrote :

Today I could fix that one.

First I followed the instructions from this thread http://ubuntuforums.org/archive/index.php/t-1143874.html (monsterstacks 2nd Post). Including uncommenting the "user" line and putting in the name of my regular user account. But that didn't do any change except the fact that I can now start mpd as a normal user, so I went on with that settings.

Afer I commented all #optional lines from audio_output {} it worked. Now when I use the gnome audio-settings to change to my 2nd external Soundcard mpd switches to that card, even without a restart. That is really nice.

Here is how my audio output section in the mpd.conf looks like now:

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

}

I am not sure if the changes concerning the user that is running mpd are necessary or if the changes in the audio_output section did it all. I am just happy that it is workin now. I am not sure if this is a general bug of MPD in Ubuntu, it maybe related to my System (Samsung NC10) or my stupidity. But maybe MPD should be setup so that it is not run as root.

Revision history for this message
genjix (aphidia) wrote :

Above fix worked for me too. According to a kind soul in #mpd Freenode it's because those lines force mpd to bypass dmix.

Those lines should probably be commented by default in Ubuntu.

Changed in mpd (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.