HOWTO: Get Spotify on RPi [deprecated]


 
7 posts
by mba » Fri Aug 24, 2012 10:27 pm
[thread deprecated by author - please see last post]

Hi,

Just got Spotify playing on my Pi using SqueezePlay and Logitech Media Server :-). I am running it headless and using the nice Android app from logitech to remote control it. Only (major) issue is that after a while it starts to stutter heavily, I will look into this when I get some more time.

To get this setup up and running you need the Debian armel distro, _NOT_ the debian armhf as the Spotify plugin is binary and built for armel.

So head over to the download section and get the Soft-float Debian “wheezy” and put it on a SD card, boot it up and do the initial setup like upgrading the config and expanding the root image.

Next download logitechmediaserver_7.8.0~1343433580_all.deb from here. Install it using
sudo dpkg -i logitechmediaserver_7.8.0~1343433580_all.deb

After installation the server will start, but it takes like a minute before its ready. Direct a browser to the ip of the Raspberry Pi using port 9000 eg. http://192.168.100.95:9000.
Click on settings in the lower right corner. Navigate to addons, disable the official Spotify plugin and enable the 3rd party Spotify plugin from Triode. Next restart the server making the changes effective. Locate the Spotify plugin in the settings again and click on the settings link to right of the plugin. Accept the disclaimer, proceed to setup where you enter device username and password and select the right country. Apply the changes and click the test button. If everything is correct you'll see some lovely "pass".

Now you should have the server running and Spotify enabled. You can test it with a SqueezePlayer on a windows box or such.

Next you must download and compile the SqueezePlay for the RPi.

sudo apt-get install the following packages:
* subversion
* flex
* bison
* automake
* libtool
* libpng12-dev
* libjpeg62-dev
* libexpat1-dev
* libreadline-gplv2-dev
* xorg-dev
* libasound2-dev
* libncurses5-dev
* libogg-dev

Checkout the sources


remove -Werror from squeezeplay/src/squeezeplay/configure.in or else you'll have to deal with these to errors which I haven't had the time to look into:
src/audio/decode/decode_portaudio.c:213:16: error: cast increases required alignment of target type [-Werror=cast-align]
src/audio/decode/decode_portaudio.c:214:16: error: cast increases required alignment of target type [-Werror=cast-align]

In squeezeplay/src/squeezeplay/Makefile.in line 358 in add -logg to the line:
jive_alsa_LDADD = libaudio.la -lasound -logg

Finally build SqueezePlay (takes 1-2hours):
make -f Makefile.linux


When finished start the x server:
startx&[/code]
and start the SqueezePlay
sudo /squeezeplay/build/linux/bin/jive

Follow the setup instructions on the screen where you have X running. When done you can test radio and spotify and so on.

Now download the Android Squeezebox app and you can now remote control the system.

Best regards
Martin
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark
by Askoba » Fri Aug 31, 2012 8:14 am
Hi Martin,

how did you get the LMS 7.8 running? Did you do any preparations. I did exactly the same but LMS service is in a restarting loop due to missing PERL modules. I installed them manually with cpanm but although every missing module is installed LMS says I need to install them. Strange....

rgds
Philipp
Posts: 2
Joined: Mon Jul 16, 2012 11:10 am
by mba » Fri Aug 31, 2012 7:33 pm
hey Philipp,

are you installing LMS on armel? I think I had the same problem on armhf, some parts of LMS must be recompiled in order for it to work on armhf. See http://allthingspi.webspace.virginmedia.com/lms.php but remember that the Spotify libraries and Triode's excellent plugin is only working on armel.

And finally, I havent been able to solve the issue with heavy stutter and clipped audio after about 10minutes of (perfect) play.

Br
Martin
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark
by salts633 » Sat Sep 01, 2012 7:42 pm
Hi,

Are you using HDMI or analogue for your audio?

I'm getting really bad clipping with squeezeplay and analogue but not with aplay and have run out of ideas of what to check.

Steve
Posts: 9
Joined: Sat Sep 01, 2012 7:37 pm
by Askoba » Fri Sep 07, 2012 11:08 am
Hi Martin,

I installed the armhf version because I thought it's better due better performance.
I will try to install LMS on armel this evening. I searched the web and it seems to be very hard to get LMS running on armhf. I think it has to be compiled from scratch for armhf but I hae no clue how to do this ;) .

thx & rgds
Philipp
Posts: 2
Joined: Mon Jul 16, 2012 11:10 am
by mba » Sun Sep 09, 2012 11:58 am
Spotify will not work under armhf, but if you want LMS running on armhf I think these instructions here describes how.

Anyway I don't think my howto is very relevant, I think the best way is using truehls SqueezePlug distribution here, and then getting SqueezePlay running on this if possible, I haven't found a way yet to prevent stuttering playback.
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark
by scep » Sun Sep 09, 2012 1:58 pm
thread closed per mba - see post above re SqueezePlug
User avatar
Posts: 1063
Joined: Sun Nov 20, 2011 8:53 am