Raspberry Pi as headless audio player

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
peter_b
Chatterbox
Posts: 338
Joined: Tue Nov 12, 2013 2:05 am

Raspberry Pi as headless audio player

Post by peter_b »

HowTo setup a raspberry pi (v2) as a headless audio playback device in the LAN:

1) Install Raspbian Stretch image on Raspberry Pi

2) Install Network Time Protocol daemon (ntpd):
In order to make sure that the time on the RPi is correct, install the NTP daemon:

Code: Select all

$ sudo apt-get install ntp
3) Install MPD:

Code: Select all

$ sudo apt-get install mpd mpc
"mpc" is the default reference client used to interact with the MPD on the commandline.

4) Configure "/etc/mpd.conf":

Code: Select all

music_directory   "smb://your_lan_server/sharename/music"
bind_to_address   "any"

# Search for this section and change the following parameters:
audio_output {
    type "alsa"
    ...
    mixer_type   "software"
    ...
}

neighbors {
    plugin "smbclient"
}
5) Tell MPD to initialize its music database:

Code: Select all

$ mpc update

NOTE:
I ran into massive issues with MPD being completely unreliable when using pulseaudio :(
Unfortunately, I would like to keep pulseaudio installed so I can playback from other machines (using module-native-protocol-tcp).
However, even if I remove the "audio_output{}" block for pulse, it still spawns pulseaudio... :shock: :?
Will try to figure out how to run it without pulseaudio (plain, classic ALSA-only), as this should be usable then.


Great thanks to the following sources:
Post Reply