Squeezelite on Vero4k

Hi folks,

I’ve been checking lots of places so far, but am not able to actually run squeezelite on my vero4k.
Anypone in here managed to get it to run on his Vero4k? If yes, what did you do to get it to actually run.

I have so far installed the kodi-plugin and had to patch the internal python binary chooser to use the arm binary. However, it does not output any sound.

Thx for any hint.

If Kodi is hogging the sink, you might need to stop it. It’s worth doing that to see if it helps.

Hi Sam :wink:
Thx for the answer. What do you call the “sink” ? (audio Link?)

Sinks are audio outputs.

Hmmm. Usually when using alsa, it should not be locked (that was the main reason for alsa development if If I remember it right. Non blocking I/O ful duplex etc.).

Will tinker a little more. Will report if I find something that works.

1 Like

I just ordered my box yesterday, but this will definately be something i would investigate in future :grinning:

Would be interessting to se a paste of this command ::
squeezelite -l (List available audio output devices to stdout and exit)

This way we can see if squeezelite can “see” any outputs at all !

Rgds; Jesper.

@lykkedk

Here you got the result of squeezelite -l

https://paste.osmc.tv/karodezuhu

Thanks…

Is alsamixer installed ?
can you paste the output of ps aux ? (when squeezelite is started)

@lykkedk

Just a heads up, i just sudo apt-get install squeezelite
no configuration or anything else

osmc@vero4k:~$ squeezelite
[17:26:58.259284] test_open:294 playback open error: Device or resource busy
[17:26:58.259461] output_init_common:381 unable to open output device

Don’t know anything about squeezelite

This is what I have on a vero4k

osmc@osmc4k:~$ squeezelite -l
Output devices:
  null                           - Discard all samples (playback) or generate zero samples (capture)
  default:CARD=AMLM8AUDIO        - AML-M8AUDIO,  - Default Audio Device
  sysdefault:CARD=AMLM8AUDIO     - AML-M8AUDIO,  - Default Audio Device
  front:CARD=AMLM8AUDIO,DEV=0    - AML-M8AUDIO,  - Front speakers
  surround51:CARD=AMLM8AUDIO,DEV=0 - AML-M8AUDIO,  - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
  surround71:CARD=AMLM8AUDIO,DEV=0 - AML-M8AUDIO,  - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  hdmi:CARD=AMLM8AUDIO,DEV=0     - AML-M8AUDIO,  - HDMI Audio Output
  dmix:CARD=AMLM8AUDIO,DEV=0     - AML-M8AUDIO,  - Direct sample mixing device
  dmix:CARD=AMLM8AUDIO,DEV=1     - AML-M8AUDIO,  - Direct sample mixing device
  dmix:CARD=AMLM8AUDIO,DEV=2     - AML-M8AUDIO,  - Direct sample mixing device
  dsnoop:CARD=AMLM8AUDIO,DEV=0   - AML-M8AUDIO,  - Direct sample snooping device
  dsnoop:CARD=AMLM8AUDIO,DEV=1   - AML-M8AUDIO,  - Direct sample snooping device
  dsnoop:CARD=AMLM8AUDIO,DEV=2   - AML-M8AUDIO,  - Direct sample snooping device
  hw:CARD=AMLM8AUDIO,DEV=0       - AML-M8AUDIO,  - Direct hardware device without any conversions
  hw:CARD=AMLM8AUDIO,DEV=1       - AML-M8AUDIO,  - Direct hardware device without any conversions
  hw:CARD=AMLM8AUDIO,DEV=2       - AML-M8AUDIO,  - Direct hardware device without any conversions
  plughw:CARD=AMLM8AUDIO,DEV=0   - AML-M8AUDIO,  - Hardware device with all software conversions
  plughw:CARD=AMLM8AUDIO,DEV=1   - AML-M8AUDIO,  - Hardware device with all software conversions
  plughw:CARD=AMLM8AUDIO,DEV=2   - AML-M8AUDIO,  - Hardware device with all software conversions

It does look promishing :sunglasses:

If we should try it out, then we need the pasteout from this command ::

  1. ps aux

Also please try to execute alsamixer, and if not installed, install like

apt-get install alsamixer (Or another package manager)

Rgds; Jesper.

Just in case anyone finds this and needs a solution… I’ve got it up and running on my Vero 4k and will provide my solution here. No guarantee that this is the most elegant way, but it works for me.

Important: “Keep audio device alive” in Kodi’s system audio settings has to be deactivated (enable “Advanced” or “Expert” level of settings to find this).

So let’s get started…

  1. Install squeezelite and alsamixer:

    sudo apt-get install squeezelite alsamixer

  2. This will automatically install a system service, which will not work, as it will hog the audio output at startup and cause weird noise when something is played on Kodi (or Kodi will not play sound at all). So deactivate it:

    sudo systemctl disable squeezelite.service

  3. Create your own startup script:

    mkdir /home/osmc/scripts
    cd /home/osmc/scripts
    nano start_squeezelite

    and add the following lines (replacing SERVER_NAME with your LMS server IP [optional], and adding a meaningful PLAYER_NAME):

    #!/bin/bash
    sleep 10
    /usr/bin/squeezelite -o hw:CARD=AMLM8AUDIO,DEV=0 -s SERVER_IP -n PLAYER_NAME -C 1

    The sleep command makes sure that Kodi has initialised and released the sound device before squeezelite is started. The “-C 1” flag for the squeezelite command makes sure that the sound card is released by the player anytime it is paused, making switching between Kodi and squeezelite super easy (i.e. automatic).

    Save (CTRL+O) and close (CTRL+X) this file and make it executable:

    chmod +x start_squeezelite

  4. Create your system service:

    nano /lib/systemd/system/squeezeliteplayer.service

    and add the following lines, before you save and exit as before:

    [Unit]
    Description=Squeezelite player
    After=network-online.target

    [Service]
    ExecStart=/home/osmc/scripts/start_squeezelite
    Type=simple
    User=osmc
    Group=osmc

    [Install]
    WantedBy=multi-user.target

    Make this executable too, and enable and start the service:

    sudo chmod +x /lib/systemd/system/squeezeliteplayer.service
    sudo systemctl enable squeezeliteplayer.service
    sudo systemctl start squeezeliteplayer.service

Now reboot your Vero and after 10 seconds, your squeezebox player should be recognised by LMS and fully functional. Just make sure that nothing is playing on Kodi when you start playing on the squeezebox. Should you run into trouble, you can mess around with the sleep time parameter in the start script (e.g. 30 seconds, if maybe you have a lot of stuff going on at startup) - furthermore, you shouldn’t be playing any Kodi sounds until the service has started (thus I kept it at a short 10 seconds).

Hope this helps!