[Guide] Install Squeezelite on Volumio (RaspPi)

Guides to let you easily discover and enjoy Volumio

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

Re: TUTORIAL - Install Squeezelite on Volumio (RaspPi)

Postby rickx » Sat Jun 07 2014 10:42

Hi,
I'm on beta 1.3, rpi + hifiberry dac and shairplay is not happy about the new install (squeezelite).
After boot they all run but as soon as I try to send something through airplay, shairport complains and dies (alsa busy message).
If I kill squeezelite, restart shairport and retry, it works. Am I missing something??
Moreover, I'm planing to add bluetooth support also - so that would be 4 contenders for 1 alsa.

I guess pulseaudio is the only clean solution...but if possible, I'd probably prefer a dirty but working solution without pulse...
Random avatar
rickx
Fresh off the boat
Fresh off the boat
 
Posts: 1
Joined: Sat Jun 07 2014 10:15

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Re: TUTORIAL - Install Squeezelite on Volumio (RaspPi)

Postby kuchi » Tue Jun 17 2014 21:22

rickx wrote:Hi,
I'm on beta 1.3, rpi + hifiberry dac and shairplay is not happy about the new install (squeezelite).
After boot they all run but as soon as I try to send something through airplay, shairport complains and dies (alsa busy message).
If I kill squeezelite, restart shairport and retry, it works. Am I missing something??
Moreover, I'm planing to add bluetooth support also - so that would be 4 contenders for 1 alsa.

I guess pulseaudio is the only clean solution...but if possible, I'd probably prefer a dirty but working solution without pulse...


Hi rickx,

I am now having same issue after using a I2S 9023 DAC, previously I used one USB DAC and I can make squeezelite work friendly with Shairport and UPnP gmediarender. so this may have something to do with I2S DAC.

I am thinking of using a few button switches to easily switch between Squeezelite, Airplay, and uPnP, will need a little scripting...

btw, thanks for mentioning pulseaudio, will look at it...

I am still using 1.1 if that matters anyway..
Random avatar
kuchi
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Tue Jun 17 2014 21:14


Re: TUTORIAL - Install Squeezelite on Volumio (RaspPi)

Postby kuchi » Wed Jun 18 2014 02:13

just did a little more troubleshooting, now i believe the root cause is my USB DAC (Dacmagic 100) support hardware mixing, but I2S DAC doesn't. the Hifiberry obviously doesn't support hw mixing neither.

adding a software mixing layer may solve the problem, pulse audio can do this i guess. i also found a article about Alsa Sharing may be possible fix :
http://alsa.opensrc.org/AlsaSharing

but I am not familiar with ALSA configuration, may take some days to experiment with it.
Random avatar
kuchi
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Tue Jun 17 2014 21:14


TUTORIAL - Install Squeezelite on Volumio (RaspPi)

Postby hoeffel » Sat Jul 05 2014 18:45

Hi Daccu,

I have done your setup for Squeezelite. Maybe a stupid question, but how can I switch to Squeezelite. I tried the Volumio IP adres:9000, as I do with the LMS server on my Synology NAS?

Can you help me.

Thanks,

Harold
Random avatar
hoeffel
Sunday DIYer
Sunday DIYer
 
Posts: 12
Joined: Sat Jul 05 2014 18:38


TUTORIAL - Install Squeezelite on Volumio (RaspPi)

Postby hoeffel » Sun Jul 06 2014 14:56

Hi Dacco,

I succeed. I had some problems with starting the service. I'm not so familar with line commands. Now I see Volumio in LMS player and apps.

Thanks,

Harold
Random avatar
hoeffel
Sunday DIYer
Sunday DIYer
 
Posts: 12
Joined: Sat Jul 05 2014 18:38


[Guide] Install Squeezelite on Volumio (RaspPi)

Postby Nerdwebber » Mon Aug 04 2014 13:09

Hi Dacco,

Great tutorial for my Rpi. It works fine. You did a wonderful job. Thank you.
I followed the same tutorial for my Cubietruck but no luck. That did not work.
Any idea?
User avatar
Nerdwebber
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Mon Aug 04 2014 12:07


[Guide] Install Squeezelite on Volumio (RaspPi)

Postby benjaminv » Sat Nov 08 2014 15:02

Hi,

Nice tutorial. I have already followed it in the past and it worked well with the jack output. Now, I would like to use my DAC but since I have installed Squeezelite, Shairport do not want to respond and crash every time.

However if I stop squeezelite when I boot, shairport respond but do not work well...

I think there are some collisions between shairport and squeezelite but I do not know how to solve the problem. I had the same problem with MPD/Shairport before de version 1.4 but the problem was solved after this version.

I also know there are other solution like Squeezeplug or PiCorePlayer but, first I do not know how to install Shairport on PiCorePlayer and secondly, Squeezelug is not always detected by my LMS and is not really user friendly.

Can someone help me ? If someone has other idea, I am very interested. In fact, I am not really interested in MPD because I would like to have a multiroom solution with Squeezelite and also with Shairport.

Thank you.

PS : I use Volume 1.5 and my DAC is Atoll DAC100 connected by USB. I have an other Pi and I use Volumio with Hifiberry.
Random avatar
benjaminv
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Mon May 26 2014 20:46


[Guide] Install Squeezelite on Volumio (RaspPi)

Postby benjaminv » Sun Nov 09 2014 23:55

I have tried something. For the moment, it works but I know that the way I have made it is not clean.

So, I have made some tests. When I stopped shairport and squeezelite and relaunch them, it worked.

I have deleted the automatic execution of squeezelite at the boot and at this place, I have putted the shairport script and made a modification in the script to launch squeezelite.

First, log in by using root/volumio

So, to remove squeezelite from the boot
Code: Select all
update-rc.d -f squeezelite remove


Because I want to use Shairport, I launch it on the boot
Code: Select all
update-rc.d shairport defaults


I have also added one line in the shairport script. So open the shairport script,
Code: Select all
nano /etc/init.d/shairport


And write it like this. You can see that I just call Squeezelite at the boot and close it when shutting down.
Code: Select all
#! /bin/sh
# /etc/init.d/shairport
#
### BEGIN INIT INFO
# Provides:          shairport
# Required-Start:    alsa-utils hostname avahi
# Required-Stop:     alsa-utils hostname avahi
# Short-Description: shairport - Airtunes emulator!
# Description:       Airtunes emulator!
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
NAME=""
case "$1" in
  start)
    /usr/local/bin/shairport -d -a "$NAME" -w -B "mpc stop"
    sudo /etc/init.d/squeezelite start
    ;;
  stop)
    sudo /etc/init.d/squeezelite stop
    killall shairport
    ;;
  *)
    echo "Usage: /etc/init.d/shairport {start|stop}"
    exit 1
    ;;
esac

exit 0


By this way, when MDP wants to work, it stops squeezelite and also shairport. I think it work like this so that there are no collisions between MDP and shairport ?

You can also try to stop squeezelite and shairport. You don't have to stop squeezelite separately because it is included in shairport now.
Code: Select all
nano /etc/init.d/shairport stop


And finally try to relaunch shairport. It will also launch squeezelite
Code: Select all
nano /etc/init.d/shairport start


A final reboot and in my case it works. I hope it could help some people.

If someone has some advices they are welcome because I am very bad in coding and I am not very sure about what I have done.
Random avatar
benjaminv
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Mon May 26 2014 20:46


[Guide] Install Squeezelite on Volumio (RaspPi)

Postby michelangelo » Mon Nov 10 2014 00:15

Just a quick remark:
Shairport is launched by player_wrk.php . If you're adding to the init.d scripts you're probably launching it with a fixed alsa device.. You should edit the lines you want there...
User avatar
michelangelo
Founder
 
Posts: 4377
Joined: Sun Dec 15 2013 23:18


[Guide] Install Squeezelite on Volumio (RaspPi)

Postby benjaminv » Mon Nov 10 2014 10:54

michelangelo wrote:Just a quick remark:
Shairport is launched by player_wrk.php . If you're adding to the init.d scripts you're probably launching it with a fixed alsa device.. You should edit the lines you want there...


If alsa device is fixed, I have to reboot to apply modifications (USB -> HifiBerry for example) ? Is that right ?

I have found this.
Code: Select all
// Start Shairport with Volumio name, stopping Mpd on start, with Selected output device
playerSession('open',$db);
$hostname = $_SESSION['hostname'];
$cmd = '/usr/local/bin/shairport -a "'.$hostname.'" -w -B "mpc stop" -o alsa -- -d plughw:'.$device.' > /dev/null 2>&1 &';
sysCmd($cmd);
}


I am not very familiar with coding and, if a reset the init.d scripts, what do I have to modify so that Squeezelite launch on boot ? I think I have to create a new $cmd1 with something like $cmd1='/etc/init.d/squeezelite -a' but I don't really know if I have to add other things or if it is absolutely not correct.
Random avatar
benjaminv
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Mon May 26 2014 20:46

PreviousNext

Return to Guides

Who is online

Users browsing this forum: No registered users and 0 guests