Credit to the tutorial below:
http://hempeldesigngroup.com/embedded/stories/raspberry-pi-setup-as-mpd-sever/
I've some updates on top of it...
1. Download arch linux image from ArchLinux Raspberry Pi page:
http://archlinuxarm.org/platforms/armv6/raspberry-pi
2. Load the image to a SD card with 2G or more. Win32 Disk Imager is recommended:
http://sourceforge.net/projects/win32diskimager/
3. After loading the image, put the card into Pi and power up, wait for 1 minute, then use IP scanner to find the IP address of Pi, just pick one below or google for others.
http://www.eusing.com/ipscan/free_ip_scanner.htm
http://sourceforge.net/projects/ipscan/
http://download.cnet.com/Advanced-IP-Scanner/3000-18508_4-10115592.html
4. Putty to that IP at port 22
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
5. login ID is "root", password is "root"
6. Make private key for auto authenticate (optional)
You may follow the tutorial below for detail setup procedure:
http://www.ualberta.ca/CNS/RESEARCH/LinuxClusters/pka-putty.html
7. Change timezone
Run the tzselect script to figure out which timezone you should be in, then note the output – in my case its America/Toronto.
Add the following text to a new file called /etc/profile.d/timezone.sh – this will cause the timezone to be set whenever a user logs in.
TZ='Asia/Hong_Kong
export TZ
Don’t forget to make the new file executable!
8. Add Alsa sound output
12. Edit /etc/mpd.conf
Add or uncomment the following:
(A brief summary:
To make sure the directories for music, log, db etc be consistent.
To make sure zero_conf is turned on
To make sure two audio output devices (using alsa) are defined)
12. Test MPD
Open another putty session, run command:
The above command will outputs the log data generated by MPD which is very useful for troubleshooting
Start MPD:
See if any error message reported in the MPD log file.
12. Enable MPD service and reboot
Make MPD server starts automatically in each reboot.
chmod 755 /etc/profile.d/timezone.sh
8. Add Alsa sound output
9. Install Music Player Daemon (MPD)
pacman -Sypacman -S alsa-utils
pacman -S mpd mpc10. Add users for MPD
usermod -G audio -a mpd11. One-time setup for MPD
mkdir -p /var/lib/mpd/music
chown mpd:mpd /var/lib/mpd
mkdir -p /var/log/mpd
touch /var/log/mpd/mpd.log
chown mpd:mpd /var/log/mpd
12. Edit /etc/mpd.conf
Add or uncomment the following:
music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/mpd.db"
log_file "/var/log/mpd/mpd.log"
state_file "/var/lib/mpd/mpdstate"
bind_to_address "any"
zeroconf_enabled "yes"
zeroconf_name "Pi + ArchLinux"
audio_output {
type "alsa"
name "On-board Audio"
device "hw:0,0"
}
audio_output {
type "alsa"
name "USB DAC"
device "hw:1,0"
}
(A brief summary:
To make sure the directories for music, log, db etc be consistent.
To make sure zero_conf is turned on
To make sure two audio output devices (using alsa) are defined)
12. Test MPD
Open another putty session, run command:
tail -f /var/log/mpd/mpd.log
The above command will outputs the log data generated by MPD which is very useful for troubleshooting
Start MPD:
systemctl start mpd
See if any error message reported in the MPD log file.
12. Enable MPD service and reboot
Make MPD server starts automatically in each reboot.
systemctl enable mpd.service
syncreboot