HiFiBerry Digi audio device sometimes not loaded?

  • I am running a Raspberry Pi 4b with a HiFiBerry Digi hat as an audio output. The issue I'm having is that sometimes this device is not loaded when booting up my Pi (it doesn't appear under available audio devices). Based on forum posts here I tried changing the "wait for network" setting (30 sec. or more), but it hasn't solved the problem. Is there anything else I can try?

    Here are log files taken from a failed boot and a successful boot, respectively;

    http://ix.io/4uwP

    http://ix.io/4uwR

  • Add "dtdebug=1" to config.txt and post output of "vclog -m" for a working and not working boot.

    Thanks for your reply. The first part I figured out, but when I try to run vclog it says "command not found". Do I need to install it from somewhere?

  • On LE11 and before use "vcdbg log msg" - vclog is only available in LE12.

    Yes that works, appreciate the help.

    Although I did double check these results, it seems there's not much difference (if any) between the before and after logs.

    First boot (failure);

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    Second boot (success);

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

  • Okay - those logs look identical so the firmware is loading the device tree overlay (called HAT) correctly.

    Looking through the kernel log. This is the bad one:

    Code
    Feb 17 04:10:58.938161 LibreELEC kernel: wm8804 1-003b: Failed to read device ID: -121
    Feb 17 04:10:58.938688 LibreELEC kernel: wm8804: probe of 1-003b failed with error -121

    and this is the good one:

    Code
    Feb 17 04:10:58.605877 LibreELEC kernel: wm8804 1-003b: revision E

    This feels like a hardware issue. You might want to try reaseating the HAT to make sure it's secure,

    and perhaps check the soldering looks consistent along the 40 pin header.

  • This feels like a hardware issue. You might want to try reaseating the HAT to make sure it's secure,

    and perhaps check the soldering looks consistent along the 40 pin header.

    Thanks for the suggestion. I dis-assembled my Pi and re-seated the hat onto the header. Unfortunately the problem persists.

    My current work-around is as follows;

    1. Turn on Pi

    2. Boot into LibreElec (no sound)

    3. Shutdown

    4. Turn on Pi

    5. Boot into LibreElec (sound working)

  • I have the same situation with regular piOS and rpi4b. Sometimes the hifiberry-digi is detected and sometimes not with the error "wm8804: probe of 1-003b failed with error -121".

    My workaround was:

    - remove the dtoverlay=hifiberry-digi from config.txt

    - add dtoverlay hifiberry-digi to rc.local (and make it executable if it wasn't yet)