GMediaRenderer/GMRender-Resurrect with a USB soundcard on Raspbian Wheezy (as of January 2014).

I could only get rid of the choppy sound by lowering the USB speed, so if that’s a problem for you then these instructions won’t help…

I’m not claiming any of this is groundbreaking or even original. This is basically me pulling together all the information I found on various blogs and forum posts into one set of steps that seemed to be ‘current’. I hope I have given everyone the appropriate credit for their hard work, if not please let me know and I’ll fix it.

Install Raspbian (Wheezy) using NOOBS

Available from the Raspberry Pi downloads page.

Get a USB soundcard

But check that it works with the Raspberry Pi. This is the one I used (because on of the reviewers had it working): Dynamode USB Sound Card 7.1

Install gstreamer-1.0

Add the custom repository line

deb http://vontaene.de/raspbian-updates/ . main

to /etc/apt/sources.list as described in this forum post, where Defiant has compiled gstreamer-1.0 for Raspbian.

Update the package information and install the upnp and gstreamer libraries.

sudo apt-get update
sudo apt-get install libupnp-dev \
libgstreamer1.0-dev \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-alsa

Get and build gmrender-resurrect

From Henner Zeller’s  instructions in the gmrender-resurrect repository

sudo apt-get install autoconf automake libtool git
git clone https://github.com/hzeller/gmrender-resurrect.git
cd gmrender-resurrect
./autogen.sh
./configure
make
sudo make install

Set up alsa and tweak the USB settings

I made the USB soundcard the default sound following the instructions in atom’s forum post:

In /etc/modprobe.d/alsa-base.conf, comment out the line that prevents usb-audio from being loaded first, and add the line to prevent the on-board sound being loaded first:

#options snd-usb-audio index=-2
options snd_bcm2835 index =-2
options snd-usb-audio nrpacks=1

Then configure the volume to be full using

sudo alsamixer
sudo alsactl store

I tried enabling fiq_split (whatever that is), but I still couldn’t get the playback to not stutter, until I lowered the usb speed to USB 1. Edit /boot/cmdline.txt to add

dwc_otg.fiq_split_enable=0 dwc_otg.speed=1

Install gmrender-resurrect

From inside the gmrender-resurrect folder

sudo make install

And then create a script to run at startup with some appropriate settings. Save this script as /etc/init.d/gmediarenderer (from Stephen C Phillips’ post on Making gmediarender start on boot - but with the command line changed for ALSA instead of pulseaudio).

You’ll need a guid, which you can generate using your favourite guid generating tool (what? you don’t have a favourite guid generating tool – try http://www.random-guid.com/).

#!/bin/sh
### BEGIN INIT INFO
# Provides: gmediarender
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start GMediaRender at boot time
# Description: Start GMediaRender at boot time.
### END INIT INFO
USER=root
HOME=/root
export USER HOME
case "$1" in
start)
echo "Starting GMediaRender"
start-stop-daemon -x /usr/local/bin/gmediarender -S -- -d --gstout-audiosink=alsasink --gstout-audiodevice=sysdefault --uuid insert-your-guid-here -f "name-your-media-renderer" --logfile /dev/null
;;
stop)
echo "Stopping GMediaRender"
start-stop-daemon -x /usr/local/bin/gmediarender -K
;;
*)
echo "Usage: /etc/init.d/gmediarender {start|stop}"
exit 1
;;
esac
exit 0

And then install the service with

sudo update-rc.d gmediarenderer defaults

And reboot.

Android remote control

To play audio from my DLNA server (Buffalo LinkStation Live NAS, now 3TB on the newly running renderer, I had good success with MediaHouse on Android (which has a free and pro version)

See? simple :-)

I hope I’ve managed to capture all the steps I did to get that working. If you try it and find anything wrong, let me know in the comments and I’ll at least try to update these instructions.