Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I installed MPD, to prevent crackling sound I want to use pulseaudio.

So I configured MPD to use pulseaudio:

audio_output {
  type   "pulse"
  name   "MPD PulseAudio Output"
  server "localhost"
}

But then MPD cannot connect to pulseaudio:

output: Failed to open "Analoge uitgang" [pulse]: failed to connect: Connection refused

Pulseaudio reports nothing more than "access denied, connection closed".

To fix this problem I performed all the steps described here: http://mpd.wikia.com/wiki/PulseAudio

I restarted MPD and Pulseaudio many times and also rebooted the Raspberry pi many times, but it still doesn't work.

How can I give MPD access to Pulseaudio?

I don't think I'm running the X11-bell plugin. I have a recent 512MB raspberry pi model which I run headless with 2012-12-16-wheezy-raspbian. I only installed MPD, Avahi and Samba.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I removed the server setting from MPD and now it works. I added the server setting in the first place to fix an other error.

audio_output {
  type   "pulse"
  name   "MPD PulseAudio Output"
}
share|improve this answer
1  
Glad you could solve your problem. Thank for sharing! ;) –  Morgan Courbet Jan 3 '13 at 19:26
    
Remember you can accept your own answer. It helps people to find quickly the information they need. –  Morgan Courbet Jan 8 '13 at 14:20

Maybe you need to add Music Player Daemon user to the audio group.

  1. Look for the user used by MPD:

    $ cat /etc/passwd
    # ...
    # some users
    # ...
    
    # the user you are looking for is probably something like this:
    mpd:x:142:142:Music Player Daemon,,,:/path/to/mpd/home:/bin/false
    
    # ...
    # some others users
    # ...
    

    What you need is the first field of the line (mpd in my example).

  2. Add this user to the audio group:

    $ sudo adduser mpd audio
    
share|improve this answer
    
MPD runs under the user mpd and I already added user mpd to the audio group. Didn't fix the problem. Thanks though. The MPD wiki page states that I need to add user mpd to the group pulse-rt, but this group is not on my system. Might this be the problem? –  i.amniels Jan 3 '13 at 10:28
    
After Googling a bit, you aren't alone with this problem. In what groups is the user mpd? ($ groups mpd) –  Morgan Courbet Jan 3 '13 at 10:50
    
mpd is in groups audio, pulse and pulse-access –  i.amniels Jan 3 '13 at 18:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.