PDA

View Full Version : Roll Your Own Squeezebox transport and/or server using a Wandboard



audiomuze
2014-04-13, 09:34
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 its 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 (http://archlinuxarm.org/platforms/armv7/freescale/wandboard) 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):

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):

ssh root@wandboardIP

Update OS, change hostname and install audio components:

pacman -Syu
hostnamectl set-hostname SqueezeWand
pacman -Sy faad2 libmad mpg123 libao alsa-utils avahi wget

Configure alsa - asound.conf file:

nano /etc/asound.conf

Paste in the following:

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:

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:

nano /etc/systemd/system/squeezelite.service
Paste in the following:

[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:

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:

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):

ssh root@wandboardIP
Have squeezelite list output devices:

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):


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:

nano /etc/systemd/system/squeezelite.service
Change the line

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:

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.

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.

vinodt1347
2014-10-18, 14:11
Hi,

Iam new to all. However got a Wandboard quad as it seems a good idea to replace my SBT which is not supported. The idea is to run Linux on it + LMS and finally attach a small SSD drive and a USB DAC.

I am not very techie but can manage a bit. I have only a Win7 laptop to work with. The instructions in this thread are not useful to me since I dont have a Unix/Linux machine nor do i normally use it.
Step 1
How do I get Linux onto my SD card using a Win7 machine - not explained in this thread
Step 2
How do I install LMS (should manage with the instructions I think)
Step 3
Add SSD
Step 4
Add USB DAC

Can the instructions be expanded into some detail.

audiomuze
2014-10-18, 15:19
This thread was posted before Triode announced Squeeze on Arch which takes care of all your requirements without you having to edit files etc.

See c the Squeeze on Arch thread under Linux.

Tim_LHUILLIER
2014-10-29, 10:47
Thanks for your tuto.

I interested for to buy a Wantboard, What do you think the quality audio a Wantboard ?
Thanks

vinodt1347
2014-11-02, 01:43
This thread was posted before Triode announced Squeeze on Arch which takes care of all your requirements without you having to edit files etc.

See c the Squeeze on Arch thread under Linux.

Thanks will check the thread.