edit: Because I've had the some problems I couldn't solve, I switched to Squeezelite instead of Squeezeslave.
See this tutorial: http://www.raspberrypi.org/phpBB3/viewt ... 38&t=25778
I am a raspberry owner for a couple of weeks now, and I plan to use them as a multi room audio system. I now have one raspberry acting as a streaming audio
player. I have got a Logitech Media Server (squeezebox server) running on my NAS, and wanted to use the raspberry as a headless squeezebox player.
Because I learned a lot from this forum, I thought I would write up my story so maybe I can help somebody else too, to return the favors.
I installed the Raspian Wheezy september release on my raspberry (model B 256 ram) , and fooled around a bit to get SSH working. After that used SSH to do all the
following actions, withoaut using a monitor.
I used this great tutorial to get squeezeslave installed: Paul Webster's instructions
That worked excellent! I had squeezeslave up and running in no time, using the on-board audio jack.
I allready had the Squeezer app installed on my android phone, this is a squeezebox server remote control app.
Now I could remotely control the raspberry to play any MP3 I got on my LMS server, or listen to internet radio stations. Very nice!
But the sound quality coming from the onboard audio jack was not very good.
After searching around, I decided to use one of those USB soundcards. I bought the Logilink USB Soundcard.
That didn't work directly, squeezeslave wouldn't play over the soundcard.
But then I discovered I had to tell squeeze slave which audio device to use.
With the -L option squeezeslave will tell you which audio devices it knows.
This is the output I saw:
Code: Select all
pi@raspberrypi ~/squeezeslavesrc $ ./squeezeslave -L
Output devices:
0: (ALSA) C-Media USB Headphone Set: USB Audio (hw:0,0) (11/46)
1: (ALSA) bcm2835 ALSA: bcm2835 ALSA (hw:1,0) (11/46)
2: (ALSA) sysdefault (42/42)
3: (ALSA) front (11/46)
4: (ALSA) surround40 (11/46)
5: (ALSA) iec958 (11/46)
6: (ALSA) spdif (11/46)
7: (ALSA) mmap0 (11/46)
8: (ALSA) dmix (42/42)
* 9: (ALSA) default (11/46)
pi@raspberrypi ~/squeezeslavesrc $
You can tell squeezeslave to use a certain device at startup. You will have to add an option to the command line.
I did that like this:
Code: Select all
sudo nano /etc/init.d/squeezeslave
Code: Select all
SSOPTIONS=
Code: Select all
SSOPTIONS=-o0
I added the following to the /boot/cmdline.txt
Code: Select all
dwc_otg.speed=1
Now I had some PC speakers connected to the USB soundcard which have their own power adapter. And I had a power adapter for the Raspberry.
I really wanted to power everything with only one adapter, so I bought a powered USB hub, the D-Link DUB H4 powered USB hub.
I also bought a set of USB powered speakers. These were USB POWERED, the sound was still provided through a seperate lead with a 3.5 mm jack.
After connecting it all, I had to move the USB plugs around a bit on the hub, because I got popping noises on the sound card. Eventually I had
no problems anymore with this setup:
- USB speakers in the port on the hub that was originally meant for charging phones
- one hub USB port is connected to the micro USB port of the raspberry for power
- one raspberry USB port is connected to the mini A USB port on the hub (this extends the number of USB ports on the raspberry)
- the USB sound card on one of the USB ports on the hub
Now I had good quality sound again and only one power adapter to power it all.
The last thing I wanted was to have wireless network. I bought a wireless dongle, a nice small one (the LogiLink Wireless LAN USB 2.0 Nano Adapter) .
At first I connected it to the hub. But not only it didn't work, it also caused interference on the soundcard and/or speakers.
So I plugged into the last free USB port on the Raspberry. No more inteference.
After searching and trying stuff, I discovered I only had to edit one file, and put my SSID name and password there:
Code: Select all
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Code: Select all
ctrl_interface=/var/run/wpa_supplicant
network={
proto=RSN
scan_ssid=1
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
ssid="your network ID in quote marks"
psk="your network password in quote marks"
}
After restarting I used ifconfig and saw that there was a IP address assigned to the wlan!
I unplugged the network cable and I got wireless network up and running.
Now I've got a wireless audio streaming player that I can remote control with my android phone:
CLICK FOR YOUTUBE DEMO
The only problem I still have is that some internet radio streams don't stream in 44.1 Khz. And that's the only frequency Squeezeslave takes. Some stations sound to slow, and some sound like the smurfs, too fast..
I will have to see if I can convert the streams on the LMS server.
I ordered two more raspberies + pheripherals. One raspberry is going to be in my living room and one in my kitchen.
These two squeezeslave clients will be synchronised.
The other raspberry I plan to use as a portable device. I may even buy an old eighties radio and gut the insides, and
build the raspberry inside it.
Thank you all for posting on this forum, it was great help!!
Overview:
Components:
- Raspberry Pi model B 256 mb memory
- D-Link DUB H4 powered USB hub
- LogiLink USB Soundcard
- LogiLink Wireless LAN USB 2.0 Nano Adapter
- Speedlink Snappy USB powered speakers
- 4 GB SD card
- LG optimus one android phone
Software:
- Raspian Wheezy sept. release
- Squeezeslave
- Logitech Media Server (squeezebox server)
- android app Squeezer