This guide is mirrored from http://miro.oorganica.com/raspberry-pi-mpd/ because it's down for me. Instead of relying on Google's cache, I figured I'd just store it here for life.
I’ve just setup MPD (Music Player Daemon) on my Rpi and it works beautifully.
Let get down to it:
Taking advantage of debian APT it is very simple to set it up:
sudo apt-get install mpd mpc
Some may need to install alsa-utils (amixer, etc...)
sudo apt-get install alsa-utils
Where mpd is the daemon and mpc is the client.
Configuration is all done on the file located in /etc/mpd.conf
I saw in a blog, somewhere I don’t remember how to setup the audio output:
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
}
After this I’ve signed up at last.fm
and added this into the configuration file:
input {
plugin "lastfm"
user "vcasinha"
password "thatspersonal"
}
To make this all work we may need to setup the system to load audio driver:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
snd_bcm2835
Then you can decide which output to use with the following command:
sudo amixer cset numid=3 1
Where 1(one) means Stereo Jack output and 0(zero) HDMI audio output.
On my setup I’m using XBMC audio output through HDMI and MPD output through Stereo Jack.
Once the setup is done the MPD service must be restarted with a command like:
sudo /etc/init.d/mpd stop
sudo /etc/init.d/mpd start
#or
sudo /etc/init.d/mpd restart
You can control it manually with ease:
#check mpd status
mpc
volume:100% repeat: on random: off single: off consume: off
#it seams ready let's add a internet radio
mpc add http://s1.radio.lclhst.net:1337/
mpc play
Minimal, Techno, Electro Sets @ http://radio.lclhst.net/: Patrick Schulz - Promotional Mix - October 2008
[playing] #1/1 0:04/0:00 (0%)
volume:100% repeat: on random: off single: off consume: off
Or you can install an iOS App like mpod or Android MPDroid to manage everything.
Good luck and good music
miro