Roll Your Own Squeezebox transport and/or server using a Wandboard

AVForums

Help Support AVForums:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Now Playing

AVForums Super Veteran
Joined
May 25, 2010
Messages
1,208
Reaction score
13
Location
South Africa
Shamelessly stolen from Scarfussi's post Wandboard Quad Archlinux LMS. 7.8 Squeezelite and adapted/ expanded for ease of use (and my understanding).

Since Logitech's discontinuance of the Squeezebox family of network music players the Squeezebox user community has made great strides in leveraging an alternative hardware platform to fulfill the role of a Squeezebox transport.  In a nutshell this means that if you're looking to leverage Logitchemediaserver and the great controller apps that exist for Android and iOS (SqueezeCommander/ OrangeSqueeze and iPeng) as your digital playback backbone you're in luck.  The community has built a ready-made Linux distribution called CSOS that can be installed on a Wandboard and turns it into a Squeezebox transport and/or server for Logitechmediaserver's purposes.  You can then output the digital stream from the Wandboard to your DAC using its asynchronous USB input.  Whilst CSOS is based on Fedora and does all that's required, I prefer to roll my own using Arch Linux - the principle reason being that Arch Linux is a pretty lean OS, meaning it's less resource intensive and runs noticeably faster than CSOS.  The downside is you need to put in the effort to "roll your own" so to speak.  You can configure the Wandboard to simply act as a transport or alternatively you can configure the Wandboard as a standalone Logitechmediaserver and Squeezebox transport.  To turn the Wandboard into a Squeezebox transport and/or player both CSOS and this RYO solution leverage an application called Squeezelite.  I'm going to post the guide in parts to deal with different aspects of rolling your own transport/server so please bear with me because some of it is a work in progress.  There's enough in the first post to turn a Wandboard into a fully functional Squeezebox transport.

What you'll need:
- Wandboard Dual or Quad
- 8GB micro SD card -- get as quick a card as you can as its speed affects bootup time and load time of anything not in RAM.
- Micro SD card reader/ writer to write the OS image to your micro SD card
- if you want to configure your Wandboard from your regular PC / Laptop you'll need to connect the Wandboard to your home network
- a SSH client to login to the Wandboard from your desktop/laptop.  If using Linux, use ssh.  If Windows, install and use putty
- a DAC that has an asynchronous USB input

Installation:
The first thing you need to do is install Arch Linux to a micro SD card (8GB minimum).  I highly recommend that you ensure the microSD is high-speed.  To prepare the microSD and install Arch Linux CLICK HERE then click on the installation tab and follow the instructions.  Before rebooting your Wandboard, connect it to your home network and your ADSL Router's DHCP (or whatever DHCP server you're using) will assign the Wandboard an IP on reboot.

When you're done with that you have a working Arch Linux install on your Wandboard.  All that remains now is updating OS components, customising a few things and finally installing and configuring Squeezelite and optionally Logitechmediaserver (should you want to use your Wandboard as a standlone transport with HDD attached).

Determine the Wandboard's IP using your DHCP server or use nmap if running *nix (replace 192.168.168 with the subnet you're using):
Code:
nmap -sP 192.168.168.0/24
The Wandboard is the device named 'alarm'.

Login using SSH [username = root; password = root] (Windows users use putty):
Code:
ssh root@wandboardIP

Update OS, change hostname and install audio components:
Code:
pacman -Syu
hostnamectl set-hostname SqueezeWand
pacman -Sy faad2 libmad mpg123 libao alsa-utils avahi wget

Configure alsa - asound.conf file:
Code:
nano /etc/asound.conf

Paste in the following:
Code:
pcm.!default {
    type plug
    slave.pcm "softvol"
}
pcm.dmixer {
       type dmix
       ipc_key 1024
       slave {
           pcm "hw:0"
           period_time 0
           period_size 4096
           buffer_size 131072
           rate 41100
       }
       bindings {
           0 0
           1 1
       }
}
pcm.dsnooper {
       type dsnoop
       ipc_key 1024
       slave {
           pcm "hw:0"
           channels 2
           period_time 0
           period_size 4096
           buffer_size 131072
           rate 41100
       }
       bindings {
           0 0
           1 1
       }
}
pcm.softvol {
       type softvol
       slave { pcm "dmixer" }
       control {
           name "Master"
           card 0
       }
}
ctl.!default {
    type hw
    card 0
}
ctl.softvol {
    type hw
    card 0
}
ctl.dmixer {
    type hw
    card 0
}

Install Squeezelite:
Code:
mkdir -p /usr/local/bin
cd /usr/local/bin
wget -O squeezelite http://squeezelite-downloads.googlecode.com/git/squeezelite-armv6hf
chmod a+x squeezelite

Configure Arch to fire up Squeezelite on startup:
Code:
nano /etc/systemd/system/squeezelite.service
Paste in the following:
Code:
[Unit]
Description=Squeezelite lightweight headless squeezebox emulator
After=sound.target
Requires=avahi-daemon.service
After=network.target
After=avahi-daemon.service
 
[Service]
ExecStart=/usr/local/bin/squeezelite -n SqueezeWand
Restart=always
 
[Install]
WantedBy=multi-user.target
Configure Arch to autostart squeezelite and avahi-daemon on boot:
Code:
systemctl enable squeezelite avahi-daemon

Connect the Wandboard to your DAC using a suitably insulated USB cable and ensure your DAC is powered up.

Now reboot:
Code:
reboot

Following reboot your Logitechmediaserver should have a SqueezeWand entry in its players list (refresh your LMS browser window if necessary).  All that remains now is to obtain your DAC string from Squeezelite, add it to the startup configuration and you're in business.

Login using SSH [username = root; password = root] (Windows users use putty):
Code:
ssh root@wandboardIP
Have squeezelite list output devices:
Code:
squeezelite -l

You'll see a listing along the lines of the following (specifics will change based on the capabilities of your asynchronous USB DAC):

Code:
Output devices:
null                           - Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=sgtl5000audio  - sgtl5000-audio,  - Default Audio Device
sysdefault:CARD=imxspdif       - imx-spdif,  - Default Audio Device
sysdefault:CARD=imxhdmisoc     - imx-hdmi-soc,  - Default Audio Device
sysdefault:CARD=Vivere384PCMDSD - Vivere384PCM-DSD, USB Audio - Default Audio Device
front:CARD=Vivere384PCMDSD,DEV=0 - Vivere384PCM-DSD, USB Audio - Front speakers
surround40:CARD=Vivere384PCMDSD,DEV=0 - Vivere384PCM-DSD, USB Audio - 4.0 Surround output to Front and Rear speakers
surround41:CARD=Vivere384PCMDSD,DEV=0 - Vivere384PCM-DSD, USB Audio - 4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Vivere384PCMDSD,DEV=0 - Vivere384PCM-DSD, USB Audio - 5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Vivere384PCMDSD,DEV=0 - Vivere384PCM-DSD, USB Audio - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Vivere384PCMDSD,DEV=0 - Vivere384PCM-DSD, USB Audio - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Vivere384PCMDSD,DEV=0 - Vivere384PCM-DSD, USB Audio - IEC958 (S/PDIF) Digital Audio Output

Identify your DAC from the abovementioned output and edit the startup command line to have Squeezelite stream to your DAC:
Code:
nano /etc/systemd/system/squeezelite.service
Change the line
Code:
ExecStart=/usr/local/bin/squeezelite -n SqueezeWand
to incorporate reference to your DAC and set the real time priority of the output thread at high priority:
Code:
ExecStart=/usr/local/bin/squeezelite -n SqueezeWand -o hw:CARD=Vivere384PCMDSD,DEV=0 -p 1

Reboot for the last time and in a minute or so you should be good to start playing files via Logitechmediaserver using the Wandboard.
Code:
reboot
In time I'll include more detailed guidance re adding Logitechmediaserver to the install and using the Wandboard as a standalone music server and transport.
 
Top