I looked at buying either some Sonos speakers or Samsung Shape speakers, but decided that I can probably make my own. This will describe my efforts to create multiple streaming media players based on the Logitec Media Server (slimserver/squeezebox)
I want to make a number of networked audio players:
1) Kitchen
2) Lounge
3) Outdoor/Deck
Ideally these should all be capable of playing the same or different music from my NAS (running the Logitec Media Server)
The kitchen and outdoor players will need amplified speakers.
The lounge player will connect to my existing stereo
[nice to have] Ability to stream a CD to all devices
Components
1×
HTC Wildfire
Old android phone, used as a media player (free)
1×
SqueezePlayer
Software player for android (A$5.29)
I've put the android phone into a small wooden case that I made on the laser cutter at RoboDino using the excellent tabbed box maker plugin for Inkscape
Here's what's inside
The phone is running:
Tasker
AutoSqueeze (tasker plugin)
SqueezePlayer
Headset Button Controller
There are two buttons which are connected to the microphone input which allow control of the player.
Red button; single click = play/pause, double click = reset
Black button; single click = next track, double click = previous track
Of course, it's also possible to control the player via any of the many Squeeze controller apps, or the web interface.
Later I may look at exposing the screen to allow track info to be displayed. But for now, this is working great.
This supports the cirrus audio card out of the box, which is great. I had no problems using this for a quick test of XMBC/Kodi
But, It's not really what I'm after. It's a specialised distribution for Kodi. I'd rather use a more general purpose distro (so that I can modify it later)
I tried a couple of Linux Images to see if they support the Cirrus Logic audio card.
Volumio 1.5 - does not support the audio card.
# cat /dev/sndstat
Sound Driver:3.8.1a-980706 (ALSA emulation code)
Kernel: Linux volumio 3.12.26+ #702 PREEMPT Wed Aug 6 17:43:49 BST 2014 armv6l
Config options: 0
Installed drivers:
Type 10: ALSA emulation
Card config:
bcm2835 ALSA
Audio devices: NOT ENABLED IN CONFIG
Synth devices: NOT ENABLED IN CONFIG
Midi devices: NOT ENABLED IN CONFIG
Timers:
7: system timer
Mixers: NOT ENABLED IN CONFIG
SqueezePlug_rpi_750 - does not support the audio card
# cat /dev/sndstat
Sound Driver:3.8.1a-980706 (ALSA emulation code)
Kernel: Linux lounge-audio 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l
Config options: 0
Installed drivers:
Type 10: ALSA emulation
Card config:
bcm2835 ALSA
Audio devices: NOT ENABLED IN CONFIG
Synth devices: NOT ENABLED IN CONFIG
Midi devices: NOT ENABLED IN CONFIG
Timers:
7: system timer
Mixers: NOT ENABLED IN CONFIG
cirrus_audio.img - Obviously this does support the audio card.
# cat /dev/sndstat
Sound Driver:3.8.1a-980706 (ALSA emulation code)
Kernel: Linux raspberrypi 3.12.33+ #12 PREEMPT Wed Dec 3 09:36:24 GMT 2014 armv6l
Config options: 0
Installed drivers:
Type 10: ALSA emulation
Card config:
bcm2835 ALSA
snd_rpi_wsp
Audio devices: NOT ENABLED IN CONFIG
Synth devices: NOT ENABLED IN CONFIG
Midi devices: NOT ENABLED IN CONFIG
Timers:
7: system timer
Mixers: NOT ENABLED IN CONFIG
Using Squeezelite, I can set up a simple squeezebox player
Squeezelite v1.7, Copyright 2012-2015 Adrian Smith. See -t for license terms
Modifying rc.local to run squeezelite at startup:
pi@raspberrypi ~ $ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
/home/pi/Reset_paths.sh
/home/pi/Playback_to_Lineout.sh
/home/pi/squeezelite-armv6hf -o sysdefault:CARD=sndrpiwsp -n Lounge -z
exit 0
My player for the kitchen consists of an old HTC wildfire phone running SqueezePlayer and a pair of Altec Lansing amplified speakers. This has been working well for a week or so. Since I already had the phone and the speakers spare, the total cost so far is A$5.29.
I'd like to add some local control buttons. I'm thinking of wiring up 3 buttons as per this article http://hackaday.com/2010/11/03/patching-into-android-music-control/ and then using Tasker and the autosqueeze plugin to control the player. I may also need Headset Droid to capture the button presses.