Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 27
  1. #1
    Senior Member
    Join Date
    Jun 2017
    Posts
    805

    Squeezelite and HDMI output on Raspberry Pi OS (Pi 3B, 3B+)

    A recent software upgrade to Raspberry Pi OS broke the way Squeezelite had previously played to the Pi's HDMI output. I've seen some mention of this issue in the piCorePlayer threads, so I gather HDMI is very much a moving target right now. This is one of those times when, after about fourteen years of using Linux as my main OS, I feel like a total newbie.

    I will provide much, much more detail below, but first I'd like to say that I'm hoping for some guidance at the most basic level: should I just stick with a version that works, for now, or is it worthwhile to try to find the problem and fix it? If the latter, I will need a lot of guidance.

    Early this month, I started working on a project that would turn a Pi into a self-contained media center that could be plugged into a TV's HDMI input to play video and music. Since video was part of the plan, piCorePlayer was not an option, and I decided to use Raspberry Pi OS (formerly Raspbian). I used the regular version (includes a gui desktop, but minimal pre-installed software) of the most recent release, dated January 11, 2021. I started off with a Pi 3B, but soon switched to a 3B+. The situation I describe here applies to both.

    When first installing the OS, the setup procedure prompts to update software. I did that, and proceeded to install other software I wanted, including LMS 8.1.1 and Squeezelite v1.9.8-1344. Everything worked. When LMS served audio to squeezelite, I could hear it through TV audio system (A/V receiver and speakers). Playing video with VLC, audio and video both worked.

    This remained true until last Saturday, when I ran another software update, using apt-get dist-upgrade. Following that update, LMS could no longer play music through Squeezelite. VLC was still able to play video and audio through the HDMI output.

    I have since repeated the process with a fresh install of the same OS image. This time, I skipped the initial software upgrade, but installed my choices. Again, LMS and Squeezelite worked, until I ran a manual upgrade, this time using the recommended command, apt full-upgrade. Again, Squeezelite was no longer able to output to HDMI.

    I have also made a fresh install and allowed the initial software upgrade. This time, the LMS/Squeezelite combo never worked, but VLC is still able to play audio through HDMI.

    I have checked the level the Squeezelite player is set to and turned it up. I have checked the Alsamixer level. I have tried using the Pi installation of LMS to serve music to a Boom, and it worked. I have tried bypassing the TV HDMI input and connecting directly to an HDMI input in the A/V receiver, without success.

    The current Squeezelite startup command is:

    Code:
    /home/pi/bin/squeezelite -s localhost -n MusicHall -z -o hw:CARD=b1,DEV=0
    I have also tried these outputs:

    plughw:CARD=b1,DEV=0

    sysdefault:CARD=b1

    All worked before the upgrade. I can't get any audio out of squeezelite with them now.

    I'm stuck. I suppose the logical thing is to try some other options with Squeezelite, but which options? I haven't a clue about how to proceed. Are there logging options I should use in LMS and/or in Squeezelite that might shed some light on the situation?

    Or would it make more sense simply to assume that this is not going to work for now? I can always start again with a fresh install and never run a software upgrade. It just irks me to have to do that. It's admitting defeat. But, as we've seen recently, sometimes that's the intelligent choice.
    Last edited by RobbH; 2021-02-16 at 19:43. Reason: typo correction: word left out
    Usually running latest beta LMS nightly on Raspberry Pi OS with virtual players (Squeezelite and Airplay bridge). Occasionally using SB Radio, Boom or Classic.

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    5,999
    Try some of the other outputs listed by squeezelite.
    I think I had to switch to using the one that starts with IEC at one point.

    Also - in my experiments I switched from fkms to kms which changed a few things ... but it meant that I could use the TV remote via HDMI CEC to control the Jivelite GUI
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

  3. #3
    Senior Member
    Join Date
    Jun 2017
    Posts
    805
    Quote Originally Posted by Paul Webster View Post
    Try some of the other outputs listed by squeezelite.
    I think I had to switch to using the one that starts with IEC at one point.

    Also - in my experiments I switched from fkms to kms which changed a few things ... but it meant that I could use the TV remote via HDMI CEC to control the Jivelite GUI
    Thanks, Paul. There was no IEC output in the list. The only HDMI outputs I didn't try were "Direct sample mixing device," "Direct sample snooping device," and "USB stream output." Actually, I think I did try the USB stream once; failure expected and achieved. I'll do some research to grasp the fkms/kms distinction.
    Usually running latest beta LMS nightly on Raspberry Pi OS with virtual players (Squeezelite and Airplay bridge). Occasionally using SB Radio, Boom or Classic.

  4. #4
    Junior Member
    Join Date
    Feb 2021
    Location
    near Stuttgart
    Posts
    4

    HDMI Output after Raspberry PI update/upgrade

    My best guess: The last update brocke systemd behaviour.

    Workaround to get squeezelite back in operation.

    Create a file /etc/init.d/squeezelite.sh

    Code:
    [
    #!/bin/sh
    /sbin/runuser -l pi -c '/usr/bin/squeezelite'
    sqeezelite need some modifications I'll add later this week.

    sudo chmod a+x /etc/init.d/squeezelite.sh

    Create a service description in /etc/systemd/systems/squeezelite.service

    Code:
    [Unit]
    Description=squeezelite daemon client
    Documentation=man:squeezelite(1)
    After=network.target
    
    [Service]
    Type=simple
    ExecStart=/etc/init.d/squeezelite.sh
    
    [Install]
    WantedBy=multi-user.target
    Alias=sounddaemon.service
    sudo systemctl daemon-reload

    sudo systemctl enable squeezelite.service

    sudo systemctl start squeezelite.service

    sudo systemctl status squeezelite.service

    Code:
    ● squeezelite.service - squeezelite daemon client
       Loaded: loaded (/etc/systemd/system/squeezelite.service; disabled; vendor preset: enabled)
       Active: active (running) since Tue 2021-02-16 19:20:47 CET; 11h ago
         Docs: man:squeezelite(1)
     Main PID: 30434 (sounddaemon.sh)
        Tasks: 1 (limit: 4915)
       CGroup: /system.slice/squeezelite.service
               └─30434 /bin/sh /etc/init.d/sounddaemon.sh
    
    Feb 16 19:20:47 raspberrypi systemd[1]: Started squeezelite daemon client.
    Feb 16 19:20:47 raspberrypi sounddaemon.sh[30434]: Wi-Fi is currently blocked by rfkill.
    Feb 16 19:20:47 raspberrypi sounddaemon.sh[30434]: Use raspi-config to set the country before use.
    It was running before, but no sound. The trick it did comes with adding runuser pi!

    Stop and reload won't work. But service come back after reboot and default = HDMI is up and running again.
    If you need other parameters feel free to ad them in /etc/init.d/squeezlite.sh accordingly.

    cu f41ardu

    Stay all healthy!

    PS: It need a couple of days to find that out.

    In addition check permission of

    ls -l /dev/snd

    ls -l /usr/bin/squeezelite

    Code:
    -rwxr-xr-x 1 root root 124772 Jul 11  2018 /usr/bin/squeezelite
    Last edited by f41ardu; 2021-02-18 at 11:43. Reason: Correct typographical errors

  5. #5
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    5,226
    I always use Gerrelt's scripts

    http://www.gerrelt.nl/RaspberryPi/wo...r-on-raspbian/

    I hooked up a rpi3b to my TV and installed squeezelite following his routine (more rather than less)

    I tried sysdefault:CARD=b1 as output and it worked

    I always use -C 10 to prevent squeezelite hogging the output, I have always thought that -z was not recommended

    ronnie

  6. #6
    Senior Member
    Join Date
    Nov 2012
    Location
    UK, Nottinghamshire
    Posts
    629
    Sorry if that's not helpful.. Unfortunately I don't have a skill to assist with problem causes by update in raspbian, all I can do is to suggest possible alternative in case you not aware..
    I've been running squeezelite on raspberry pi 3b and 3b+ with Osmc as OS.. It's basically Kodi / xmbc which can serve as great media centre and allows for lms and squeezelite installation..

    Recently I've been also testing Libreelec which is minimal os and although I got squeezeliteon in I'm not sure about LMS.. (I host LMS on my NAS docker.. Ohh I guess you could run LMS in docker on Libreelec too
    3x Squeezebox Touch, 4x Squeezebox Radio, Squeezelite (RPi 3B with HiFiBerry DAC+Pro on OSMC), Material Skin Apk, Squeeze Commander, Logitech Media Server Version: 8.2.0 with Material Skin (Docker in DS218+)

  7. #7
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    5,999
    I've just gone back to my 5.10 kernel that I was testing HDMI CEC on ... with kms not fkms and the device is
    vc4-hdmi
    instead of
    b1

    Then trying squeezelite with
    squeezelite-armv6hf -o plughw:CARD=vc4hdmi,DEV=0 -n hdmicectest -C 2
    fails when playing and gives
    alsa_open:432 unable to open audio device with any supported format
    and same for other devices ... but ...
    squeezelite-armv6hf -o iec958:CARD=vc4hdmi,DEV=0 -n hdmicectest -C 2
    works

    squeezelite -l
    Code:
    Output devices:
      default                        - Playback/recording through the PulseAudio sound server
      null                           - Discard all samples (playback) or generate zero samples (capture)
      jack                           - JACK Audio Connection Kit
      pulse                          - PulseAudio Sound Server
      sysdefault:CARD=Headphones     - bcm2835 Headphones, bcm2835 Headphones - Default Audio Device
      dmix:CARD=Headphones,DEV=0     - bcm2835 Headphones, bcm2835 Headphones - Direct sample mixing device
      dsnoop:CARD=Headphones,DEV=0   - bcm2835 Headphones, bcm2835 Headphones - Direct sample snooping device
      hw:CARD=Headphones,DEV=0       - bcm2835 Headphones, bcm2835 Headphones - Direct hardware device without any conversions
      plughw:CARD=Headphones,DEV=0   - bcm2835 Headphones, bcm2835 Headphones - Hardware device with all software conversions
      usbstream:CARD=Headphones      - bcm2835 Headphones - USB Stream Output
      sysdefault:CARD=vc4hdmi        - vc4-hdmi, MAI PCM vc4-hdmi-hifi-0 - Default Audio Device
      front:CARD=vc4hdmi,DEV=0       - vc4-hdmi, MAI PCM vc4-hdmi-hifi-0 - Front speakers
      iec958:CARD=vc4hdmi,DEV=0      - vc4-hdmi, MAI PCM vc4-hdmi-hifi-0 - IEC958 (S/PDIF) Digital Audio Output
      dmix:CARD=vc4hdmi,DEV=0        - vc4-hdmi, MAI PCM vc4-hdmi-hifi-0 - Direct sample mixing device
      dsnoop:CARD=vc4hdmi,DEV=0      - vc4-hdmi, MAI PCM vc4-hdmi-hifi-0 - Direct sample snooping device
      hw:CARD=vc4hdmi,DEV=0          - vc4-hdmi, MAI PCM vc4-hdmi-hifi-0 - Direct hardware device without any conversions
      plughw:CARD=vc4hdmi,DEV=0      - vc4-hdmi, MAI PCM vc4-hdmi-hifi-0 - Hardware device with all software conversions
      usbstream:CARD=vc4hdmi         - vc4-hdmi - USB Stream Output
    Note - this is my own build of 5.10 kernel ... I have not tried with the official RPF version (not enough spare SD cards)

    Enabled kms via /boot/config.txt ... note I have not tested on RPi4 so not changed the [pi4] section so it would still use fkms there.

    changed the end of that file to
    Code:
    [pi4]
    # Enable DRM VC4 V3D driver on top of the dispmanx display stack
    dtoverlay=vc4-fkms-v3d
    max_framebuffers=2
    
    [all]
    #dtoverlay=vc4-fkms-v3d
    dtoverlay=vc4-kms-v3d
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

  8. #8
    Senior Member
    Join Date
    Jun 2017
    Posts
    805
    Thanks, f41ardu, Ronnie, Jaca, and Paul for all responses. I'll study them and experiment a bit and report back.
    Usually running latest beta LMS nightly on Raspberry Pi OS with virtual players (Squeezelite and Airplay bridge). Occasionally using SB Radio, Boom or Classic.

  9. #9
    Junior Member
    Join Date
    Feb 2021
    Location
    near Stuttgart
    Posts
    4
    Quote Originally Posted by RobbH View Post
    Thanks, f41ardu, Ronnie, Jaca, and Paul for all responses. I'll study them and experiment a bit and report back.
    Hi, I can confirm my solution with minor modifcations. After an upgrade the original init script won't work any longer. Everthing point towards some strange changes in systemd.

    I'll post my solution later this week in my github. Haven't the time yet to get it in there.
    Cheers
    f41ardu
    Raspberry 3 | piCorePlayer | piCorePlayer v7.0.0 | www v00011 | linux 5.4.83-pcpCore-v7 | piCore v12.0pCP | Squeezelite v1.9.8-1287-pCP -> Output=Hifiberry DAC+ | Onkyo A-8430 + Nubox 383
    Raspberry 3+ | piCorePlayer | piCorePlayer v7.0.0 | www v00011 | linux 5.4.83-pcpCore-v7 | piCore v12.0pCP | Squeezelite v1.9.8-1287-pCP -> Output=Hifiberry DAC+ -> | Yamaha older PianoCraft + Subwoofer
    Raspberry 4| squeezeplayer -> Output=default
    iPeng

  10. #10
    Senior Member
    Join Date
    Jun 2017
    Posts
    805
    Quote Originally Posted by f41ardu View Post
    Hi, I can confirm my solution with minor modifcations. After an upgrade the original init script won't work any longer. Everthing point towards some strange changes in systemd.

    I'll post my solution later this week in my github. Haven't the time yet to get it in there.
    Cheers
    f41ardu
    Thanks for the information you shared. I have tried your suggestions, using the same squeezelite parameters I have used previously (but not -z), and I do have Squeezelite running as a service, however, I am still not getting Squeezelite audio through HDMI. And the squeezelite service is not starting at startup. I don't see any attempt to start it in syslog, other than when I start it manually.

    I bet the information you have shared will prove helpful for someone, but it appears to be beyond me for now.

    Incidentally, I think there are three small typographical errors in your previous post. At least this appeared be what worked for me:

    Code:
    Create a service description in /etc/systemd/systems/squeezelite.service
                                                       ^ extra 's'
    ExecStart=/etc/init.d/squeezlite.sh
                                ^ missing 'e'
    
    sudo systemctl deamon-relaod
         transposed ^^       ^^ transposed

    edit: looking over things again, I see that the issue of starting the service when booting hasn't been addressed yet. Probably one of the issues you were still working on. I apologize for not picking up on that earlier.
    Last edited by RobbH; 2021-02-18 at 09:11. Reason: acknowledging error
    Usually running latest beta LMS nightly on Raspberry Pi OS with virtual players (Squeezelite and Airplay bridge). Occasionally using SB Radio, Boom or Classic.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •