HowTo MPD with Pulse audio

A Little background, i just shifted to mpd from Amarok 2.0 somewhy i dont seem to like Amarok 2 but thats a different story, For those who dont know MPD s a flexible, powerful, server-side application for playing music. which runs as a daemon and has a lot of front ends for it, Sonata being a popular one.
now coming to the point i use Fedora 10 and it has Pulseaudio by default, now the problem is i some time get “NO Read Permission” in Sonata and then mpd would stop working, in mpd.log file i will find “Error opening ALSA device “hw:0,0″: Device or resource busy” error, which means this is an pulseaudio permission issue, to solve it we need to change the mpd.conf (/etc/mpd.conf) to
audio_output {
type "pulse"
name "My Device"
device "hw:0,0" # optional
format "44100:16:2" # optional
}

then we need to add
load-module module-native-protocol-tcp auth-anonymous=1
to /etc/pulse/default.pa which gives everybody permission to use pulseaudio and thats it.

Tags: , , , , , , ,

This entry was posted on Friday, February 13th, 2009 at 11:22 pm and is filed under Linux, Stuff, fedora. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

4 Responses to “HowTo MPD with Pulse audio”

Marko Kevac February 14th, 2009 at 2:50 am

Isn’t it a little bit like killing a fly with a tank?

eric February 15th, 2009 at 4:22 pm

Hey thank you so much for this this not only fixed my MPD after hours of googling but also fixed problems I was having with skype!

Ankur Shrivastava February 15th, 2009 at 10:15 pm

@Marko
Well that is the way that i made it to work, if you know about something better, please tell me
@Eric
Glad to be of some help

jceasless August 5th, 2009 at 7:48 pm

Your solution is provided by the mpd wiki, so it’s not totally unreasonable (probably better than running mpd as a system-wide daemon, for instance).

However this page
http://mpd.wikia.com/wiki/PulseAudio#For_Distros_where_PulseAudio_access_rights_are_broken
implies that simply adding user ‘mpd’ to the pulse groups (pulse, pulse-access, pulse-rt) should provide a much more localized and secure solution.

Leave a Reply