[RPi5] Problem with HiFiBerry DAC

  • Hi
    I have a problem with Kodi and HiFiBerry DAC based on the ES9023 chip. I used it on a Raspberry Pi 3B+ and everything worked fine. However, I bought a new Raspberry Pi 5 and installed a new LibreELEC and the DAC stopped working. The sound has wrong/slow timing like a cassette player with bad batteries. In Kodi, the DAC shows up as hHiFiBerryy DAC based on the PCM5102 chip, and in the config text file is set dtoverlay=hifiberry-dac.

    Thanks in advance.

  • Well same here, Im using LibreELEC-RPi5.aarch64-11.95.2.img.gz with a RPI5 and a hifiberry dacplushd sndcard, no audio at all.

    When playing Audio dmesg continually says:

    dma dma2chan0: dma2chan0 is non-idle!
    dma dma2chan0: dma2chan0 failed to stop

    In the Kodi log it reads:

    I also tried with a fresh "2024-03-15-raspios-bookworm-arm64", which behaved the same in the first place but after replacing

    dtoverlay=hifiberry-dacplushd

    with

    dtoverlay=hifiberry-dacplushd,slave

    it worked fine.

    On Libreelec I also tried with force_eeprom_read=0, disabled dtoverlay=gpio-ir,gpio_pin=17 and hdmi_drive=1 without any difference.

    In the end I would prefer going with LIBREELEC, but without Audio it makes no sense...

    Any hints?

    Thanks in advance

  • Please test with RPiOS and the latest rpi-update kernel. If it doesn't work either create an issue on the RPi kernel github https://github.com/raspberrypi/linux/issues

    BTW: the hifiberry-dacplushd overlay doesn't seem to have a "slave" option and the "slave" option of the hifiberry-dacplus overlay won't work on RPi5 so there are now two separate overlays for the (non-HD) DAC+, hifiberry-dacplus-std and hifiberry-dacplus-pro

    so long,

    Hias

  • Because of this:
    Configuring Linux 4.x or higher | HiFiBerry
    HiFiBerry sound cards on the Pi5 | HiFiBerry
    Changes in HiFiBerry drivers | HiFiBerry

    you should ensure that this line is commented out:
    dtparam=audio=on
    to
    dtparam=audio=off or #dtparam=audio=on

    I had read that this command
    force_eeprom_read=0
    is deprecated, you should instead move this 2 lines to the very beginning of the config.txt

    Code
    dtoverlay=
    dtoverlay=hifiberry-dacplushd

    The first line prevents it from loading the overlay out of the HAT EEPROM (hifiberry).

    I know that some users with RPi5 and a Argon ONE case use successful the hifiberry driver set with their new BLSTR DAC modules. But the driver for dacplushd could have his own bugs.

    Edited once, last by HarryH (April 25, 2024 at 1:35 PM).

  • Hi Hias, thanks a lot for your reply. I got it working! All I needed to do, is to not have the dtoverlay=hifiberry-dacplushd  in the config file. So if I would have not edited the config in the first place I would have not ran into trouble.

    This works for both, the nightly fro 2024 04 24 and for the LibreELEC-RPi5.aarch64-11.95.2

    Maybe it is worth a note before others run in the same error.

    Regards

    Lotte

    Edited once, last by lotte67890 (April 25, 2024 at 2:04 PM).

  • Hi Lotte,

    nice, that you found a solution.

    If you currently doesn‘t have a dtoverlay=hifiberry … line in your config it seems that the overlay was instead loaded from the HAT EEPROM. Please keep in mind, that in future kernel versions it could be possible that this overlay in the HAT EEPROM will be outdated. Then you will need a matching dtoverlay line for your hifiberry.

    Regards,

    Harry

  • If you currently doesn‘t have a dtoverlay=hifiberry … line in your config it seems that the overlay was instead loaded from the HAT EEPROM. Please keep in mind, that in future kernel versions it could be possible that this overlay in the HAT EEPROM will be outdated. Then you will need a matching dtoverlay line for your hifiberry.

    RPi folks recommend to store the name of the overlay in the eeprom, not the actual overlay itself, to avoid kernel version issues.

    Unfortunately Hifiberry did the latter (and OFC the overlays became incompatible with RPi5) but fortunately this could be fixed up with hat_map entries (see commit https://github.com/raspberrypi/li…fdda902104650b3) so the hifiberry cards should work fine now without any config.txt trickery.

    so long,

    Hias

  • Well, sorry and sad to say, the hifiberry stopped working. On both of the releases, the nightly and the LibreELEC-RPi5.aarch64-11.95.2. Yes I was playing around, but only with the keymapping of the lirc remote. And this only on LibreELEC-RPi5.aarch64-11.95.2 release, the nightly was untouched since it worked this morning.

    Same errors as before in dmesg and kodi.log. I first was thinking that the hifiberry might be broken, so I attached it again to my RPI4 which still has the configuration I used over the last years, and voila, works as usual.

    I have no clue what is going... Maybe I give it another try on the weekend...

  • Post a full log when it happens again, using the latest LE12 nightly build (ssh in, run "pastekodi" and post the URL). It could be anything from a connection problem to power supply issue or something else - hopefully the log will give more info.

    so long,

    Hias