

In order to persistently load this module at every boot, we have to add a single line - snd_bcm2835 to /etc/modules. It's useful to have this both on the Pi as well as your laptop since it allows you to control mpd from any one of those machines.īefore we can get any sound out of our speakers, we have to load up the module responsible for sound output to the 3.5mm jack: sudo modprobe snd_bcm2835 The other two packages are what we're really interested in though - mpd or music player daemon is the server that either controls audio or HTTP streaming output, and 'mpc' or music player client is a handy command line tool to tell the server what to do. The alsa-utils package should give us some much needed functionality as well as some troubleshooting tools. The Setupįirst, we're going to install everything we need to get things working: sudo apt-get install mpd mpc alsa-utils For those interested, I'll only mention that you need to secure your Pi ( iptables, fail2ban), set up port forwarding on your router and dynamic dns and bam, you have music everywhere that you have wifi/4G. This option would also work if you wanted to stream your music outside of your home, but this is out of the scope of this article. This avoids having a duplicate library on my laptop, on the Pi, on my desktop, etc. It's just plain awesome.Īs far as the second option goes, I use it mainly on my laptop, since it's easier to store all my music in one location and use Clementine to receive the HTTP stream. Using the bare bones mpc client, it is very easy to mess around with many other *nix utilities such as cron or at to get your sound system to play a specific track at a specific time. I can control it through one of three ways - the very bare bones mpc client, a more feature rich, curses based pms, and finally through an android application called Droid MPD Client, which is free to download. I hooked up the Pi to my awe-inspiring 2.1 sound system via the 3.5mm output.

Output sound through the built-in 3.5mm jack.I'm using a slimmed down version of Raspbian, but this should work with minor alterations for any other distro out there.įirst, what do I mean by sound system? We'll allow the Pi to make our ears happy in two ways:

This assumes that the Pi is already set up - it has ssh access and some sort of network connection. Today we're going to set up the Raspberry Pi as a home sound system.

Setting up Raspberry Pi and mpd (music player daemon) with Raspbian Published: Tagged:
