Install and autostart squeezelite?

Hi

I would like to install squeezelite under OSMC and have it autostart when I boot OSMC on a Pi, replaying sound through HDMI (I hava a HDMI splitter).

Can I follow this tutorial or are there other tutorials / available?

Thanks,

Rainer

You are a lucky man Squeezelite is available is jessie

Just run:

sudo apt-get install squeezelite

For configuration please look at the file: /etc/default/squeezelite
Change the required paramters to match your installation and don´t forget to add the extra flag
SB_EXTRA_ARGS="-a 80" in case you want to use the standard audio jack.
In case you want to use the standard audio jack you need to add the snd_bcm2835 module to your /etc/modules file as well.

If you want to use alsa-mixer you need to install the alsa-utils as well

sudo apt-get install alsa-utils

Have fun
KB

PS If you want to run the latest/greatest version of squeezelite just replace the /usr/bin/squeezelite file with the latest binary found here

1 Like

Thanks.
I installed it without problems (had to do a

sudo apt-get update

before), but I can’t get it to run with sound playing.

queezelite -s lms -o null

Works, but obviously I can’t hear anything.

I seem to be missing all sound output devices:

$ squeezelite -l
Output devices:
null - Discard all samples (playback) or generate zero samples (capture)

So what am I missing?

You are missing this part:

In case you want to use the standard audio jack you need to add the snd_bcm2835 module to your /etc/modules file as well.

run

sudo modprobe snd_bcm2835 

after that

squeezelite -l

To make the changes permanent just edit your /etc/modules file and add the snd_bcm2835 line.

After a reboot check your squeezelite -l output again

Kb

Thanks - and sorry for my late responses.

I think I am getting there.

Now I get the following:

smc@osmc:~$ squeezelite -l
Output devices:
null - Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA - bcm2835 ALSA, bcm2835 ALSA - Default Audio Device
sysdefault:CARD=ALSA - bcm2835 ALSA, bcm2835 ALSA - Default Audio Device
dmix:CARD=ALSA,DEV=0 - bcm2835 ALSA, bcm2835 ALSA - Direct sample mixing device
dmix:CARD=ALSA,DEV=1 - bcm2835 ALSA, bcm2835 IEC958/HDMI - Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0 - bcm2835 ALSA, bcm2835 ALSA - Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1 - bcm2835 ALSA, bcm2835 IEC958/HDMI - Direct sample snooping device
hw:CARD=ALSA,DEV=0 - bcm2835 ALSA, bcm2835 ALSA - Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1 - bcm2835 ALSA, bcm2835 IEC958/HDMI - Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0 - bcm2835 ALSA, bcm2835 ALSA - Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1 - bcm2835 ALSA, bcm2835 IEC958/HDMI - Hardware device with all software conversions

osmc@osmc:~$

Now I want to use the HDMI sound, but I don’t get any sound out sound output of the HDMI port whatever I try as the SL_SOUNDCARD (or -o) (osmbc movie replay works).

Is it possible to play through the HDMI port or is the HDMI port “locked” by OSMC?
I have an HDMI splitter, and the convenience would be brilliant to play the music also through the HDMI port.

Rainer

OK - got it working. I just don/t specify an output device…

Why do I always think so complicated?

Thanks,

Rainer

Nice to hear it works for you.
Have fun.

Thanks for this straight forward guide! I had previously been using Raspbmc on my Pis then I discovered Logitec Media Server as I wanted to make a ‘Sonos’ like system without spending the cash.

I had been using Squeezeplug (as I have bought some IQ-Audio sound cards) as an install image and then the Pi 2’s came out which seemed like a great upgrade for running XBMC again. So I installed OSMC for the first time last night, added the IQ-Audio card in the Raspberry Pi settings and found this guide for installing Squeezelite. I thought I’d have lots of configuring to do with having the IQ-Audio card in but followed the guide, replaced the binary file with the latest one, fixed permissions, and ran:

squeezelite -l

Low and behold - the IQ-Audio card was already there as the default audio output. Rebooted and Squeezelite automatically loads on boot along side OSMC - no audio conflicts with Squeezelite. I haven’t yet tried playing something on OSMC whilst also playing something via squeezelite but I’m unlikely to do that in practice.

Thanks for the easy guide - I would have started off on a long trail following the other guide and it looks like it wouldn’t have been necessary. Thanks also to Sam and the development team do making such a great OS and Image that has so much going on the background that it’s so easy to add things like squeezelite!

I’m so pleased!

Hi,

Thanks for the very good instructions.
However, I don’t get the sound to be output through the audio jack. It always outputs through HDMI.

squeezelite -l gives me:

Output devices:
  null                           - Discard all samples (playback) or generate zero samples (capture)
  default:CARD=ALSA              - bcm2835 ALSA, bcm2835 ALSA - Default Audio Device
  sysdefault:CARD=ALSA           - bcm2835 ALSA, bcm2835 ALSA - Default Audio Device
  dmix:CARD=ALSA,DEV=0           - bcm2835 ALSA, bcm2835 ALSA - Direct sample mixing device
  dmix:CARD=ALSA,DEV=1           - bcm2835 ALSA, bcm2835 IEC958/HDMI - Direct sample mixing device
  dsnoop:CARD=ALSA,DEV=0         - bcm2835 ALSA, bcm2835 ALSA - Direct sample snooping device
  dsnoop:CARD=ALSA,DEV=1         - bcm2835 ALSA, bcm2835 IEC958/HDMI - Direct sample snooping device
  hw:CARD=ALSA,DEV=0             - bcm2835 ALSA, bcm2835 ALSA - Direct hardware device without any conversions
  hw:CARD=ALSA,DEV=1             - bcm2835 ALSA, bcm2835 IEC958/HDMI - Direct hardware device without any conversions
  plughw:CARD=ALSA,DEV=0         - bcm2835 ALSA, bcm2835 ALSA - Hardware device with all software conversions
  plughw:CARD=ALSA,DEV=1         - bcm2835 ALSA, bcm2835 IEC958/HDMI - Hardware device with all software conversions

I set in /etc/default/squeezeplug

SL_SOUNDCARD="dmix:CARD=ALSA,DEV=0"

and

SB_EXTRA_ARGS="-a 80"

I’d appreciate any help on this.
I often have problems on how to setup correct audio on the PI. Do you know of any good basic tutorial here?

– Edit –

OK, now I found out that I can at least manually change the output with alsa mixer
I understood to find the devices via

aplay -l

and the possible controls via

amixer controls

To set the output from HDMI to audio jack:

amixer cset numid=3 1

To set it back to HDMI:

amixer cset numid=3 0

But actually I would like to have the OSMC always output sound via HDMI and squeezelite via audio jack. Any way this is possible without an additional sound card?

– Edit –

Well, this actually worked exactly like this from the moment I changed the output to the Audio Jack.

Will try installing HifiBerry next :slight_smile:

Hi

Sorry for reviving an old thread but I’ve noticed that OSMC is not outputting audio from the IQ Audio card but Squeezelite is with no issues. OSMC audio is coming through HDMI but I’d like it to output via both HDMI and the IQ Audio card.

Is it possible to have OSMC output to two audios? Is it possible that Squeezelite and OSMC can both output to the IQ Audio card? Can I ask what I can run in OSMC or via SSH to help diagnose and troubleshoot the issue (if it is possible)?

HI
how did you get it to autostart?

Hi,

You can change OSMC output within the settings menu. Usually you should be able to choose between, HDMI, Analog or both. To setup your soundcard, you should set the correct overlay in “My OSMC” settings. Once the soundcard is setup correctly, you can choose it from the usual settings menu.

I did not find a way to play to several outputs with my soundcard.

If you install squeezelite via jessie it should autostart without further action.

Thx for the answer but what are Jessie?

Its the debian distribution that OSMC bases on

okay I follow the steps above but the player don’t start?
Any step by step?
totally noob at linux

its all there step by step what you need to do is to learn linux.

yes I know that.
I have just started.
I installed squeezelite from commandoline.
from a computer. I only get squeezebox to run when I exe squeezelite from commondoline.

Hi All

I know this is an old thread. But I have used it with great succes. I have OSMC with xSqueeze addon installed, LMS 7.9 and squeezelite using both the guides from this comminity. But now I have run in to a problem. I would like to use mysqueezebox.com also. For using Spotify. But mysqueezebox.com won’t recognize my squeezelite player. Somewhere I read that I need to change the mac address of the Squeezelite. Which by default is 00.00.00.00.00 or 00.00.00.00.00. Can anyone help with a how to guide? I am no genius in this Linux world. I googled but with no luck. Do I also need to change the mac address of the LMS too? And is it possible as well to make a how-to

Cheers

Lars

Hi,

I used to set the MAC address manually in /etc/default/squeezelite, however this never worked perfectly and at some point not at all anymore.

The problem seems to be at startup. Squeezelite seems to load before the network interfaces are load. If you postpone the start of squeezelite or simply restart the squeezelite service later (e.g. after 20s), squeezelite will recognize the correct Mac address of your hardware and will function as expected.

Regards
Steffen