My colleague kept going on about his SONOS wireless Hi-Fi setup, which basically made him able to control the music in each room around his house, from a single device.
While that sounded incredibly neat, the entire setup was way to expensive for me, and offered little to no customizability. However, at that point I had just acquired my first Raspberry Pi and recently started using PulseAudio due to the Steam for Linux being released.

Now, the configuration I will go through is my setup, and you might need to adjust some things to your liking.

My setup:

  • Workstation (Gentoo) running MPD
  • Raspberry Pi (Raspbian) in the Kitchen with Analog Speakers
  • Raspberry Pi (Raspbian) in the Livingroom with Analog Speakers
  • Raspberry Pi (Raspbian) in the Bathroom with Analog Speakers

Setting up a Raspberry Pi

To begin with, the Pi has to be setup. I’ll assume you have installed a completely fresh Raspbian image.

Setting up the networking interface

I prefer having static IP addresses on my always-on devices. So open up /etc/network/interfaces/ in an editor.

# Obviously, you should match these with your networking setup.
iface eth0 inet static
      address    192.168.1.7
      gateway    192.168.1.1
      netmask    255.255.255.0
Getting Pulseaudio and modules

So, now you have setup the networking interface. There is no need to reboot just yet.

Let’s start out with installing the things we need.

apt-get install pulseaudio avahi-daemon pulseaudio-module-zeroconf
Autostarting Avahi for publishing the sink

Now, we need avahi-daemon to start on boot

update-rc.d avahi-daemon defaults
Editing the configuration

Then open up /etc/default/pulseaudio

PULSEAUDIO_SYSTEM_START=1
DISALLOW_MODULE_LOADING=0

Now open up /etc/pulse/system.pa

load-module module-dbus-protocol access=local,remote
load-module module-native-protocol-tcp auth-ip-acl=192.168.1.101 # MPD Source
load-module module-zeroconf-publish

Then open up /etc/pulse/default.pa

load-module module-native-protocol-tcp auth-ip-acl=192.168.1.101 # MPD Source
load-module module-zeroconf-publish

The auth-ip-acl parameter in default.pa and system.pa is for security. You can use either auth-anonymous=1 or auth-ip-acl=192.168.1.0/24 if you want more devices to be able to access the remote sink. Logically auth-anonmyous allows non-authenticated devices to connect, and auth-ip-acl allows specific ip’s and/or ranges to connect.

One last thing, we need to check that the output is not muted nor too low.

sudo -u pulse alsamixer

If it says MM in the bottom of the slider, press M once. If the slider is at 00, press Page Up or Up a couple of times.

Now, you can go ahead and plug in your Pi into your sound setup. Remember to remove the HDMI cable if you want to use the Analog output.

Setting up your workstation

Configure Pulseaudio

I won’t go through setting up Pulseaudio on your workstation, as I expect your distribution provides better documentation for that or even ships with a working configuration of Pulseaudio.

However, you’d want to install avahi-daemon here as well, and set it to autostart the service on boot, and start it now.
Secondly you should get pavucontrol and paprefs, these will make your Pulseaudio experience a whole lot better.

Fire up paprefs go to Network Access, check Make discoverable PulseAudio network sound devices available locally.
If you then open up pavucontrol you should be able to see your remote sink(s) under Output Devices, labelled bcm2845 ALSA Analog Stereo on pulse@HOSTNAME.

If you want, you can open some audio in your preferred application, then go to Playback in pavucontrol and in the applications dropdown menu, select the remote sink. There should be a second or two of delay before your remote sink will play the sound.
If not, it might be that your volume is set too low, got to Output Devices and turn up the crank. I prefer having the volume at maximum 80% to avoid crackling and distortion.

Configure MPD

First, execute # pacmd list-sinks | grep "name: <t" and save the output. You are going to need these names in just a moment.

There are several ways to achieve this, but I’ll show the easiest way, however most insecure. Open up your ~/.mpd.conf (sigh, no xdg).

# INSECURE: First set to listen on all interfaces, or the same network as your RPi's
# INSECURE: Only needed if you want to control your sound with and external device
bind_to_address "*"

# Add one of these for each remote sink.
audio_output {
	type	"pulse"
	name	"Kitchen"
	sink	"tunnel.HOSTNAME.local.alsa_output.platform-bcm2835_AUD0.0.analog-stereo"
}
Optional: Configure MPDroid
  • Download MPDroid from the Google Play Market Store Application Get or whatever the hell it is called.
  • Open up the application
  • Go to Settings
  • Go to Connection Settings
  • Go to WLAN based connection
  • Go to <YOURNETWORKNAME>
  • Go to Host
  • Input the IP of the MPD server
  • Click OK

You’re now done setting up MPDroid. However I suggest using the feature “Pause Playback” and “Resume Playback” in the Settings.
While you are in the Now Playing screen, touch the speaker icon and you are now able to choose the MPD audio_outputs.

Optional: Configure ncmpcpp

If you like me, use ncmpcpp to control mpd with, you might want to compile it with --enable-outputs, then with ncmpcpp running you can press F8 or 8 to open the outputs control.

Yes, quite inactive I am.
Well, besides that SteamLUG apparently has a Unvanquished team aligned for their Tournament. In which case I figured I might as well set up two servers for Unvanquished, one for Tourney13 and one for ordinary gameplay, they can be seen on the official server list. Cyllene is the tourney server, and Karpo is an ordinary server (open for all).

Below I’ve compiled my steps to get it running, besides configuring the server.cfg and the maprotation.cfg on my Debian/Sid server.

sudo apt-get install libcurl4-gnutls-dev libfreetype6-dev libglew1.5-dev \
libgmp3-dev libjpeg8-dev libncurses5-dev libogg-dev libopenal-dev \
libpng12-dev libsdl1.2-dev libvorbis-dev zlib1g-dev nettle-dev \
libwebp-dev libspeexdsp-dev libtheora-dev libxvidcore-dev
git clone https://github.com/Unvanquished/Unvanquished.git
cd Unvanquished
git checkout tags/2013-summer-tourney
mkdir build && cd build
cmake ..
make -j4
mkdir tourney13 && cd tourney13
wget http://unvanquished.net/downloads/tourney13/data-tourney13-1.0.pk3
wget http://unvanquished.net/downloads/tourney13/vms-tourney13-1.0.pk3
cd ..
./daemonded +exec server.cfg +set fs_game tourney13

On the 2013-05-15 we had our very first Single Player-type Event for SteamLUG - cannot say that it was an overall succes, but it didn’t go too bad though.
I planned for people to play along with me, while I was streaming to twitch. But I didn’t get the feeling that anyone else was playing - or was much active on Mumble for that matter.

But, I managed to play through 1 hour of Amnesia: The Dark Descent, which was a mixed experience; I’m not really into the gamestyle at all, but Amnesia really managed to fully immerse me in the game - I felt like I was lost inside a castle or whatever it was. It’s a rare feeling and much appreciated.
I will plan to play through 1 hour more of Amnesia at some point later, at another SteamLUG Event.

Though, as this is also new to me - I have to figure out a couple of things:

  • Streaming to Twitch.TV
    • I need to figure out how to seperate sound and only stream the game.
    • I also need to figure out why I didn’t transmit sounds at all.
  • The concept
    • Is this a viable concept, playing through single-player games, with a multitude of people on Mumble?
    • How do I manage to get more people active during the Event?
    • Does FPS’ work, or would the concept better fit other titles?
  • The future
    • Which games should be planned for the future?
    • Should we play through one game first, then start up a new one? (Similar to Double Fine Game Club)

more random thoughts

Title Date
Steam What a mess you have made!
Half-Life 2 Deathmatch on Linux
Steam in a Clean Environment
SteamLUG Game Night 2
Steam Tools for Linux
SteamLUG Game Night
Half-Life mods on Steam for Linux
Double Fine Adventures
Steam for Linux and something else
Dir Colors Script