Posts by audiobobo

    Only an update on what I ended up doing: I removed LibreELEC just to have more control,

    and ended up installing Rocky Linux 8, Kodi (using flatpak) and librespot.

    I set Kodi and librespot as "startup applications", and they work nicely together now

    (they can also play simultaneously, for example).

    It actually made sense to start librespot with --backend alsa, since my USB DAC is on an alsa output (!)

    From this thread (I think) I found:

    Code
    cd /storage/.config/system.d
    
    cp /storage/.kodi/addons/service.librespot/miscellaneous/service.librespot-alsa.service .
    
    systemctl enable service.librespot-alsa.service

    The above makes sure that librespot auto-starts librespot at boot, like so:

    Code
    /storage/.kodi/addons/service.librespot/bin/librespot --backend alsa --bitrate 320 --cache /storage/.config/lsa_cache --device-type computer --disable-audio-cache --name Librespot ALSA Restart=always

    edit: I also had to create the file /storage/.config/asound.conf, to tell alsa where the USB DAC sits:

    Code
    pcm.device {
               type hw
               card 1
               device 0
    }
    
    pcm.!default {
                 type plug
                 slave.pcm "device"
    }

    (not sure yet what the 2nd section does here)

    So now everything works, except when I switch back to Kodi, to watch something, or play music from there for example: it seems that librespot has taken the audio output, and Kodi outputs no sound :( (the USB DAC is also no longer listed in the available audio outputs in the system settings).

    If I reboot, then Kodi plays audio ok.

    There should be an easy way to switch between the two, or maybe (?) get them to both use pulseaudio.

    (also running LibreElec 10.0.2, Librespot 10.0.0.129, but on an Intel NUC).

    I can connect to Librespot from the phone, start playing, but get no sound.

    Error messages are also identical ("sendmsg failed: connection refused")

    Updated to LibreElec 10.0.3 now.

    I managed to get sound by doing the following:

    - install Librespot, but disable it

    - ssh into the machine (or open a terminal on it, assuming this is possible), and running librespot manually like this:

    Code
    librespot --verbose --backend alsa --device="hw:1,0" --bitrate 320 --cache cache --disable-audio-cache --name boba --notify-kodi

    - before that I had run "aplay -l" to get the device numbers of my audio output (a USB DAC):

    Code
    boba:~ # aplay -l
    **** List of PLAYBACK Hardware Devices ****
    ... (lines deleted) ...
    card 1: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
      Subdevices: 1/1
      Subdevice #0: subdevice #0

    The way that librespot runs when the plugin is enabled (but producing that connect error) is as follows:

    Code
    boba:~/.config # ps -ef|grep libre
      900 root      0:13 librespot --backend pulseaudio --bitrate 320 --cache cache --device librespot --device-type TV --disable-audio-cache --name Librespot@boba --notify-kodi

    So now I'm thinking it doesn't work because of some pulseaudio configuration problem.

    At least I have sound now :)

    I'll dig a bit more.

    I recently installed LibreELEC 10.0.2 on my RPI3. First I installed the Librespot addon (Version 10.0.0.129).

    But Librespot doesn't work. I can see Librespot at my Spotify App on my smartphone, but after choosing Librespot in my Spotify app no music plays to start.

    In logs I can see that I get every 10s the log message, as long the Librespot addon is running :

    pulseaudio[311]: W: [pulseaudio] sap.c: sendmsg() failed: Connection refused

    Did you figure this out yet?

    This is a "me too" post: seeing exactly the same thing (also running LibreElec 10.0.02, Librespot 10.0.0.129, but on an Intel NUC).

    I can connect to Librespot from the phone, start playing, but get no sound.

    Error messages are also identical ("sendmsg failed: connection refused")