First start by copying the configuration for mpd to one that will be dedicated for previewing music.
sudo cp /etc/mpd.conf /etc/mpd_hp.conf
Now edit it and make the following changes:
sudo gedit /etc/mpd_hp.conf
Change this line in accordance with your root music folder.
music_directory "/music"
Make separate folders for this MPD instance to store it's data.
playlist_directory "/var/lib/mpd_hp/playlists" #Add "_hp"
db_file "/var/lib/mpd_hp/tag_cache" #Add "_hp"
log_file "/var/log/mpd_hp/mpd.log" #Add "_hp"
error_file "/var/log/mpd_hp/errors.log" #Add "_hp"
pid_file "/var/run/mpd_hp/pid" #Add "_hp"
state_file "/var/lib/mpd_hp/state"
Give this MPD instance a unique port to listen for commands on.
port "6660"
Make sure audio is going to the right place.
audio_output {
type "alsa"
name "sound"
device "hw:0,0"
format "44100:16:2" # optional
}
OR it may be the software mixer that you setup.
audio_output {
type "alsa"
name "dmixer"
device "plug:dmixer"
}
Now create the folders that you specified in the configuration file.
sudo mkdir --parents /var/log/mpd_hp
sudo mkdir --parents /var/lib/mpd_hp/playlists
sudo chown -R mpd.audio /var/log/mpd_hp
sudo chown -R mpd.audio /var/lib/mpd_hp
Now we need a startup script to launch this instance of MPD and use the configuration file we created
sudo cp /etc/init.d/mpd /etc/init.d/mpd_hp
sudo gedit /etc/init.d/mpd_hp
MPDCONF=/etc/mpd_hp.conf
Set it to startup with the laptop
sudo update-rc.d mpd_hp defaults
Start it manually just for right now.
sudo /etc/init.d/mpd_hp start
