I’m currently facing issues getting a specific DAC to work with my Raspberry Pi 3B (UEFI setup). Here’s an overview of my setup and tests so far:
Tested DACs:
Justboom DAC HAT (PCM5122)
Raspiaudio Audio+ V2 (PCM5201A)
Both DACs work seamlessly on Volumio and Raspbian with the dtoverlay=hifiberry-dac configuration (/boot/config.txt), or by using the Raspiaudio script (which applies the same overlay and blacklists certain modules). You can find the script here: Raspiaudio Audio+ V2.
On NixOS, the Justboom DAC works even without enabling the hifiberry-dac overlay (see snippet below), but I haven’t been able to get the Raspiaudio Audio+ V2 DAC to work. I
tried the following configuration, but unfortunately, it hasn’t resolved the
issue:
I’ve compared the loaded kernel modules between Raspbian/Volumio and NixOS, but I’m still struggling to pinpoint the issue. On Raspbian/Volumio, the Raspiaudio Audio+ V2 DAC appears in /proc/asound/cards as:
@eblechschmidt thanks for the quick response. I tried this with the hifiberry-dac using the overlay apply-overlays-dtmerge from nixos-hardware copied from the Pi 4 modules - but it did not work :(. I checked what the systemd service did in my case by running the dtoverlay command manually, and it gave me the following error: Failed to apply overlay '0_hifiberry-dac' (kernel)
Where does the 0_ come from? It does look a bit odd but I’m no expert in the dtoverlay topic tbh. Can you share the code for your last try where you got the error?
As the systemd log showed me ‘already in use’ so I took the script from the systemd unit and run it manuelly as root which gave me the error message - which was probably the reason why the systemd unit finished with ‘already in use’. I have no idea where the ‘0’ comes from, it is probably some prefix added by dtoverlay - but I don’t know.
I run basically /nix/store/kazlclbwkcpdnj5jnmlylj6v4daral9n-libraspberrypi-unstable-2022-06-16/bin/dtoverlay -d /nix/store/h3wxf22qpym479dk07ac18q32vzwrzq6-linux-rpi-6.6.51-stable_20241008/dtbs/overlays/ hifiberry-dac which gave me the Failed to apply overlay '0_hifiberry-dac' (kernel) error.