Thu, 03 Nov 2016

mpd in debian jessie using pulse audio

I've used mpd on various desktops for a long time, and I've always just set the output directly in the mpd.conf file, but that leads to the sound device being tied up if you ever want to do anything else with it. I finally got around to setting this up properly with pulse audio. This setup uses mpd running as the mpd user, and sets up pulse audio (which is running as the desktop user) to allow network access on localhost. MPD then connects to pulse audio to send the audio stream.

# give mpd access to use pulse
sudo usermod -aG pulse,pulse-access mpd

# configure pulse to allow access from localhost
echo "load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1" >> /etc/pulse/default.pa

# restart pulse audio as the user
pulseaudio --kill
pulseaudio --start

Then configure /etc/mpd.conf with the following audio_output:

audio_output {
      type            "pulse"
      name            "MPD PulseAudio Output"
      server          "127.0.0.1"
      # set sink to name from "pacmd list-sinks"
      sink            "alsa_output.usb-Burr-Brown_from_TI_USB_Audio_DAC-00-DAC.analog-stereo"
}

Restart mpd, and then it should start playing through pulse audio. (should be able to see it playing in pavucontrol). Lots more detailed information here for different configurations: http://mpd.wikia.com/wiki/PulseAudio

posted at: 22:55 | path: /debian | permanent link to this entry


2019-Sep
2019-Jul
2019-Jun
2019-May
2018-Dec
2018-Jan
2017-Aug
2017-Jun
2017-May
2016-Nov
2015-Dec
2015-Nov
2015-Oct
2015-Jul
2015-Jun
2014-Dec
2012-Oct
2012-Sep
2012-Jun
2012-Feb
2012-Jan
2011-Dec
2011-Sep
2011-Aug
2011-May
2011-Feb
2010-Jun
2010-Apr
2010-Jan
2009-Sep
2009-Jul
2009-May
2009-Jan
2008-Oct
2008-Sep
2008-Jun
2008-May
2008-Jan
2007-Nov
2007-Oct
2007-Aug
2007-Jun
2007-May
2007-Mar
2007-Feb
2007-Jan
2006-Nov
2006-Oct
2006-Sep
2006-Aug
2006-Jun
2006-Apr
2006-Jan
2005-Dec
2005-Nov
2005-Oct
2005-Sep
2005-Aug
2005-Jul
2005-Jun
2005-May
2005-Apr
2005-Mar
2005-Feb
2005-Jan
2004-Dec
2004-Nov
2004-Oct
2004-Sep
2004-Aug
2004-Jul
2004-Jun
2004-May

Powered by PyBlosxom | RSS 2.0