Posts by muellersjan

    Hello Sappi,

    did you have more luck with Avahi turned on? I am asking because I had likely the same problem, but as awiouy mentioned earlier, Avahi must be turned on. That was my problem.

    Well, I figured it out.

    My goal: Use librespot on an RPi3 running the latest Kodi/libreelec combo playing via alsa (Cirrus audio card), since the TV I have is not that good for playing music, but good enough for films and series and I have a hifi system which I use for music only

    How I got there:

    0. Install Librespot via Addons on your RPi

    I had done this way before I stumbled into the problem with the missing alsa option, so you also might have done this already. If not install the kodi nerds repository and install it from there.

    1. Setup a fresh Ubuntu VM

    For Windows users: download latest image from ubuntu website and use VMware Player with easy setup. Make sure Ubuntu has 30Gig disk space.

    2. Install Docker

    Follow the instructions here: Docker Install Guide

    For a fresh machine you can directly go to step 3 of the guide:

    Inside the ubuntu VM open a console (Win-key and type cmd)

    Code
    sudo su
    apt install docker.io
    systemctl start docker
    systemctl enable docker

    3. Install Curl, Git and dependencies

    You will need this for the next steps.

    Code
    apt install curl
    apt install git
    apt install libasound2-dev pkg-config

    4. Install Rust

    This is done via rustup.rs

    Or use this code directly(could be outdated!):

    Code
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

    5. Get the latest version of the librespot project from github

    Make a new folder, maybe in your home directory and clone the git into it

    Code
    mkdir /home/libspot
    cd /home/libspot
    git clone https://github.com/librespot-org/librespot.git

    This will make a new folder: /home/libspot/librespot

    6. Make the docker image

    Source: Cross-compiling

    Code
    cd /home/libspot/librespot
    docker build -t librespot-cross -f contrib/Dockerfile .

    The last '.' is crucial!

    7. Finally Cross-Compile

    After following all preceding steps you should now be able to run following command:

    Code
    docker run -v /home/libspot/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features alsa-backend

    This will direct the output to /home/libspot/librespot-build/arm-unknown-linux-gnueabihf/release/

    8. Transfer your new binary to your RPi

    Locate the "old" binary of the librespot addon here: /storage/.kodi/addons/service.librespot/bin/

    Use the "Files" app of your ubuntu system to transfer the file "librespot" to your RPi. Use "Other Locations" and type in the field on the bottom of the "Files" app:

    Code
    ssh://ipaddress/

    User: root

    Passphrase: libreelec

    Then copy the file "librespot" to your RPi into /storage/downloads/

    From there use a ssh shell and replace the old file with your new one.

    9. Make it work...

    Last thing on the list, edit the file: /storage/.kodi/addons/service.librespot/bin/librespot.start

    I got rid of two or three options, which I don't need. Feel free to add them back in.

    After this, librespot should be started automatically at systemstart. If not you can use following command to see what's going wrong:

    Code
    journalctl -u service.librespot

    Good luck and good night.

    Doesn't Libreelec still support alsa? The alsa option is available in Libreelec 9.2 under System?

    Yes it does, even out of the box since they added the drivers for the cirrus card, but, and that's in my eyes a downgrade, librespot does not support playing directly to alsa anymore. Which was somehow pretty good, because you could have a seperat HiFi System to which you could send your spotify music and a TV which takes all the other audio. That means, I didn't have to fiddle around with the system settings every time.

    Hi,

    first of all, thanks for your time and work on the librespot addon.

    After I recently updated libreelec and librespot, I immediatly recognized "missing" options in the librespot addon. After google-ing the crap out of the internet, I found out, that librespot isn't supporting ALSA out of the box anymore.

    Which leads to my problem. I have no idea how to build a version with alsa enabled as backend. Probably am I just not smart enough or maybe it's tldr, but I need alsa, since I do not like to switch the playback device everytime from pulse to alsa when I stream music and vice versa when watching a film. Is there a good instruction on how to use either pipe to alsa or a good, short instruction sheet on how to build librespot with alsa on the rpi3 running libreelec?

    Please, I couldn't find it, so maybe you can bring some light into my dark ball, called head.

    Thank you in advance for your time to read my crap here and thank you even more for responding to it.

    Jan Müller, <-not the brightest bulb in the chandelier