User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Headless Squeezeplay on RPI

Postby t1ger » Tue Sep 25, 2012 11:56 am

Hi
I’m running squeezeplay on RPI (raspbian) headless (xvfb-run).
And i think its work great.

What are you experiens of squeezeplay on RPI?
ddg
Posts: 30
Joined: Tue Jul 10, 2012 2:18 pm

Re: Headless Squeezeplay on RPI

Postby ddg » Tue Sep 25, 2012 11:05 pm

One of your other posts implied it was a bit difficult to configure. Could you tell me what packages you needed for squeezeplay for raspbian?
User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Re: Headless Squeezeplay on RPI

Postby t1ger » Wed Sep 26, 2012 8:40 am

Hi
Hi I will try to remember as much as possible

get the code from svn
svn co http://svn.slimdevices.com/repos/jive/7.8/trunk/

then edit mmx.h

Index: src/SDL-1.2.13/src/video/mmx.h
===================================================================
--- src/SDL-1.2.13/src/video/mmx.h (revision 9561)
+++ src/SDL-1.2.13/src/video/mmx.h (working copy)
@@ -355,7 +355,7 @@

#define mmx_r2m(op, reg, mem) \
__asm__ __volatile__ (#op " %%" #reg ", %0" \
- : "=X" (mem) \
+ : "=m" (mem) \
: /* nothing */ )

#define mmx_r2r(op, regs, regd) \

Then edit

Index: src/squeezeplay/configure.in
===================================================================
--- src/squeezeplay/configure.in (revision 9561)
+++ src/squeezeplay/configure.in (working copy)
@@ -168,7 +168,7 @@
dnl Be pedantic when compiling
if test x"$GCC" = x"yes"
then
- CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wdeclaration-after-statement
-Wpo
inter-arith -Wcast-align -Wno-unused-parameter -Wno-unused-function"
+ CFLAGS="$CFLAGS -Wall -Wextra -Wdeclaration-after-statement
-Wpointer-ar
ith -Wcast-align -Wno-unused-parameter -Wno-unused-function"
fi

CFLAGS="$CFLAGS -DSQUEEZEPLAY"


--

There is some dependencies also
libasound2 alsa-base alsa-utils libasound2 libasound2-dev bzip2 flac xvfb +more

change installdir in squeezeplay.sh and change

xvfb-run ./jive instead of ./jive

to test that sound/alsa is working test with
sudo ./jive_alsa -d default -b 30000 -p 3 -f 1

I only manage to get it running as root
ddg
Posts: 30
Joined: Tue Jul 10, 2012 2:18 pm

Re: Headless Squeezeplay on RPI

Postby ddg » Fri Sep 28, 2012 9:52 pm

Thanks!! I am hoping to make time to try it this weekend. I tell you my experience.
salts633
Posts: 9
Joined: Sat Sep 01, 2012 7:37 pm

Re: Headless Squeezeplay on RPI

Postby salts633 » Sat Sep 29, 2012 4:13 pm

I have no trouble getting squeezeplay to compile and run, but after a few minutes of good playback the sound breaks up and starts clipping. I've mostly been running it under lxde, not headless though. Have you been having this problem?
User avatar
truehl
Posts: 642
Joined: Sun Mar 04, 2012 6:47 pm
Contact:

Re: Headless Squeezeplay on RPI

Postby truehl » Sat Sep 29, 2012 10:00 pm

Hi,
all looks very interesting! I tried to compile SqueezePlay by myself but got lost! I don't understand which lines exactly to replace with which new lines! Could someone give my a hint or is it possible to get the already compiled file?

Thanks a lot,
Thomas
truehl
http://www.squeezeplug.de
salts633
Posts: 9
Joined: Sat Sep 01, 2012 7:37 pm

Re: Headless Squeezeplay on RPI

Postby salts633 » Sat Sep 29, 2012 10:59 pm

try this guide
viewtopic.php?f=35&t=15555

As long as you're not after spotify everything compiles fine on armhf. I'd be interested to know if other people have any luck with this. I'm running it using the built in analogue sound, which works fine for a while but then breaks up.
User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Re: Headless Squeezeplay on RPI

Postby t1ger » Sun Sep 30, 2012 11:18 am

truehl wrote:Hi,
all looks very interesting! I tried to compile SqueezePlay by myself but got lost! I don't understand which lines exactly to replace with which new lines! Could someone give my a hint or is it possible to get the already compiled file?

Thanks a lot,
Thomas


Ok , it was little bit tricky to understand but change this two lines (may change in the future)

change line nr 294 in mmx.h to

: "=m" (mem) \

and remove -Werror on line 171

And im running raspbian
User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Re: Headless Squeezeplay on RPI

Postby t1ger » Sun Sep 30, 2012 12:06 pm

My squeezeplay setup work great with spotify.
My LMS runns on a amd64 based ubuntu with spotify linux installed.

...
salts633
Posts: 9
Joined: Sat Sep 01, 2012 7:37 pm

Re: Headless Squeezeplay on RPI

Postby salts633 » Sun Sep 30, 2012 12:16 pm

are you running raspbain armel or raspbian armhf?
User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Re: Headless Squeezeplay on RPI

Postby t1ger » Sun Sep 30, 2012 2:24 pm

salts633 wrote:are you running raspbain armel or raspbian armhf?


armhf!
User avatar
truehl
Posts: 642
Joined: Sun Mar 04, 2012 6:47 pm
Contact:

Re: Headless Squeezeplay on RPI

Postby truehl » Sun Sep 30, 2012 5:07 pm

Got lost!
Sorry folks, I got lost. I did not manage to compile SqueezePlay by myself. I think there are some important parts missing in all posts here. So once again the question: Is someone able to share a already compiled SqueezePlay for armhf and for headless use?

Thanks a lot!
truehl
http://www.squeezeplug.de
mba
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark

Re: Headless Squeezeplay on RPI

Postby mba » Sun Sep 30, 2012 7:46 pm

Hi Thomas, I send you a pm.

I am having the same troubles as salts633. After a while there are major dropouts in audio, I am playing through HDMI so the problem is apparently on both analog and digital. I posted my problems on your SqueezePlug thread, when using 'emulated mmap' in asound.conf I had dropouts and stutter and when using 'hw' I had perfect playback until the system completely froze after 5-40minutes. After a recent rpi-update the 'hw' version of asound.conf doesn't work any more.

I am trying to start a discussion here but nobody seems to experience the same problems with other pieces of software. I also posted a note at github.

My best guess at the moment is that a call to snd_pcm_wait in audio_thread_execute in this file doesn't return before the timeout elapses even though the driver is ready for more data, this causes buffer underruns. This can be seen in the /var/log/syslog file as:

Sep 27 18:52:19 raspberrypi squeezeplay: audio_thread_execute:877 xrun (snd_pcm_wait)
Sep 27 18:52:19 raspberrypi squeezeplay: audio_thread_execute:879 PCM wait failed: Unknown error 372
Sep 27 18:52:19 raspberrypi squeezeplay: audio_thread_execute:831 underrun!!! (at least -1348769235750.957 ms long)
Sep 27 18:52:21 raspberrypi kernel: [ 2706.383062] vcos: [8681]: bcm2835_audio_write:794 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
Sep 27 18:52:21 raspberrypi squeezeplay: audio_thread_execute:831 underrun!!! (at least -1348769233792.347 ms long)

Hopefully the issue can be eliminated as I think using SqueezePlay is superior to squeezeslave as you are able to play Spotify when using an armel based system and you are able to achieve higher bit- and samplerates on both armel and armhf.

Best regards
Martin
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.
mba
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark

Re: Headless Squeezeplay on RPI

Postby mba » Sun Sep 30, 2012 7:52 pm

Btw I think the easiest way of compiling SqueezePlay is probably following the 'instructions' in the build script at http://aur.archlinux.org/packages.php?ID=56769, download the tarball and use the patches inside.
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.
User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Re: Headless Squeezeplay on RPI

Postby t1ger » Sun Sep 30, 2012 7:57 pm

truehl wrote:Got lost!
Sorry folks, I got lost. I did not manage to compile SqueezePlay by myself. I think there are some important parts missing in all posts here. So once again the question: Is someone able to share a already compiled SqueezePlay for armhf and for headless use?

Thanks a lot!


The whole build is about 16MB, I dont know how to share it.

If you tell us the error message we can proebly tell you what dependesis are missing.
User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Re: Headless Squeezeplay on RPI

Postby t1ger » Sun Sep 30, 2012 8:04 pm

mba wrote:Btw I think the easiest way of compiling SqueezePlay is probably following the 'instructions' in the build script at http://aur.archlinux.org/packages.php?ID=56769, download the tarball and use the patches inside.


I tried to get this to work on raspbian, but I failed.

If you are running arch it probebly works.
mba
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark

Re: Headless Squeezeplay on RPI

Postby mba » Mon Oct 01, 2012 6:31 am

t1ger wrote:
mba wrote:Btw I think the easiest way of compiling SqueezePlay is probably following the 'instructions' in the build script at http://aur.archlinux.org/packages.php?ID=56769, download the tarball and use the patches inside.


I tried to get this to work on raspbian, but I failed.

If you are running arch it probebly works.


I didn't use the build script directly, I just read it through and did the steps manually on the commandline in Raspbian. What failed when you tried it t1ger?
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.
User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Re: Headless Squeezeplay on RPI

Postby t1ger » Mon Oct 01, 2012 7:47 am

mba wrote:
t1ger wrote:
mba wrote:Btw I think the easiest way of compiling SqueezePlay is probably following the 'instructions' in the build script at http://aur.archlinux.org/packages.php?ID=56769, download the tarball and use the patches inside.


I tried to get this to work on raspbian, but I failed.

If you are running arch it probebly works.


I didn't use the build script directly, I just read it through and did the steps manually on the commandline in Raspbian. What failed when you tried it t1ger?


I got a lot of errors from that script.
But I think we workt it out the same way.
But I looked in Makefile.linux instead and solved the errors there , and install the dependencies when they arrived.
mba
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark

Re: Headless Squeezeplay on RPI

Postby mba » Mon Oct 01, 2012 10:05 am

@t1ger what I am very curious about is whether you have stable and stutter-less playback or not? And if so how is your asound.conf and the rest of your system configured? Are you running the latest raspbian / rpi-update and so on.
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.
User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Re: Headless Squeezeplay on RPI

Postby t1ger » Mon Oct 01, 2012 11:47 am

mba wrote:@t1ger what I am very curious about is whether you have stable and stutter-less playback or not? And if so how is your asound.conf and the rest of your system configured? Are you running the latest raspbian / rpi-update and so on.


Hi.
Yes i'ts shutterfree.
Here is the filter free config that im running on one of my PI's
It's connected to a pcm2704 dac on usb

pcm.!default {
type plug ### had problems with "type hw"
slave.pcm "hw:1,0"
}


ctl.dmixer {
type hw
card 1
}

distro raspbian,
Linux pi 3.2.27+ #174 PREEMPT Wed Sep 26 14:09:47 BST 2012 armv6l GNU/Linux
All packages is up to date.

Evryting works fine execpt 48KHz playback, there fore i'm transcoding radio to 44.1 in LMS
Pay attation that my usb soundcard is running as hw:1,0, I could not get it to work shutterfree outhervice
mba
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark

Re: Headless Squeezeplay on RPI

Postby mba » Tue Oct 02, 2012 7:18 pm

t1ger wrote:
mba wrote:@t1ger what I am very curious about is whether you have stable and stutter-less playback or not? And if so how is your asound.conf and the rest of your system configured? Are you running the latest raspbian / rpi-update and so on.


Hi.
Yes i'ts shutterfree.
Here is the filter free config that im running on one of my PI's
It's connected to a pcm2704 dac on usb

pcm.!default {
type plug ### had problems with "type hw"
slave.pcm "hw:1,0"
}


ctl.dmixer {
type hw
card 1
}

distro raspbian,
Linux pi 3.2.27+ #174 PREEMPT Wed Sep 26 14:09:47 BST 2012 armv6l GNU/Linux
All packages is up to date.

Evryting works fine execpt 48KHz playback, there fore i'm transcoding radio to 44.1 in LMS
Pay attation that my usb soundcard is running as hw:1,0, I could not get it to work shutterfree outhervice


Ah, that explains it, I am using the onboard sound and I am guessing that its a problem with the bcm2835 alsa-driver. But thanks for the info anyway that helps pinpointing it to the onboard audio driver.
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.
User avatar
truehl
Posts: 642
Joined: Sun Mar 04, 2012 6:47 pm
Contact:

Re: Headless Squeezeplay on RPI

Postby truehl » Tue Oct 02, 2012 7:52 pm

O.K. got it working with the very friendly help of MBA. But there are some issues:
1. Sound get's stuttering after a few minutes (internal analogue output)
2. How to configure it without a monitor connected on first start?
3. How can I start it on system boot?
4. How can I run it in background?
5. How can I shut it down and how can I restart?

By the way, the video output from SqueezePlay without X installed looks great.

And one other information: SqueezePlay is under BSD license, so we are free to use, change and distribute it! If the problems could be fixed, RPI with a touch screen could be a great SqueezeBox player!

Have fun,
Thomas
truehl
http://www.squeezeplug.de
User avatar
t1ger
Posts: 38
Joined: Sat Aug 18, 2012 12:08 pm

Re: Headless Squeezeplay on RPI

Postby t1ger » Wed Oct 03, 2012 6:52 am

1. Sound get's stuttering after a few minutes (internal analogue output)
Probably alsa driver has to be more stable
2. How to configure it without a monitor connected on first start?
3. How can I start it on system boot?
since its not a deamon, put squeezeplay.sh in
/etc/rc.local , would work fine
4. How can I run it in background?
like "deamon"?
If you use xvfb-run, it runs in background, with or without X
5. How can I shut it down and how can I restart?
User avatar
truehl
Posts: 642
Joined: Sun Mar 04, 2012 6:47 pm
Contact:

Re: Headless Squeezeplay on RPI

Postby truehl » Wed Oct 03, 2012 8:49 am

Just checked out the HDMI output from SqueezePlay and that's also not working stable. Sound breaks after a while for some seconds and comes back fine again. I'm wondering why SqueezeSlave works great with analogue or HDMI output and why SqueezePlay does not! I think I'll integrate SqueezePlay in my new image, but only as an experimental player gives us the opportunity for further development.
truehl
http://www.squeezeplug.de
Gordian2
Posts: 6
Joined: Wed Oct 03, 2012 10:07 am

Re: Headless Squeezeplay on RPI

Postby Gordian2 » Wed Oct 03, 2012 10:13 am

you can alternatively download and try an image we have created for Raspberry, using Raspbian, LMS and Squeezeplay.

[Mod deleted link at posters request]

BTW, tried to contact Thomas weeks ago to share our work but got no reply