Hifiberry DAC Plus with Kodi 18 based image

I have a Raspberry Pi 2B that I have just bought a HiFiBerry DAC2 Pro for (requires dtoverlay=hifiberry-dacplus). I am running the November 2020 Raspberry Pi 2 image on the Pi as I haven’t wanted to upgrade to the version that removed hardware decoding of VC-1 and MPEG2.

I can’t get the Pi to recognise the DAC as the audio output. Should the above approach apply to the image I’m using? The file /boot/config-user.txt doesn’t exist…

That is for the new images, if you are staying with old versions you need to follow old instructions.
dtoverlay=hifiberry-dacplus-overlay

1 Like

Thanks, I thought I tried that, but I’ll give it a whirl and report back

OK. So I tried that and the DAC still doesn’t show up under Settings → System → Audio. I only get HDMI or Analogue.

In addition, under MyOSMC → Pi Config where I enabled the dtoverlay I see this warning… could that be contributing?

Perhaps it makes sense to create a new topic? And I can provide debug logs?

Done that.

Please upload logs (no need for debug right now) grab-logs -A and share the URL

1 Like

Done.
https://paste.osmc.tv/ejucagajir

This seems to be your problem

snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry

Don’t have a direct idea, maybe google with that.

Thanks! Hmm googling has revealed that others have experienced a similar issue, but I haven’t found a resolution yet.
This page seems to have some ideas, but the first suggestion to remove the following

dtparam=audio=on

seems somewhat redundant as dtparam=audio=off is already in /boot/config.txt

I added the following to /boot/config.txt

dtdebug=1

Then ran the following command

dmesg | grep hifiberry

[   10.026728] clk-hifiberry-dacpro clocks:dacpro_osc: Fail to register clock driver
[   10.026771] clk-hifiberry-dacpro: probe of clocks:dacpro_osc failed with error -17
[   10.281559] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry
[   10.990152] snd-rpi-hifiberry-dacplus soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered - will retry

It seems as though it’s failing to register the clock driver on the dac??

Well the confusing part of that page is that it refers to Linux 4.x with the new DTB.
But while your OSMC is 4.19 it should still use the old DTB and the dtparam parameter should not be existing.

Maybe try on another SD Card either with Raspbian and/or a newer OSMC version to check if the DAC works.

Also I just read

are you sure that is supported by the old DAC+ overlay?

This is a great question… I have my suspicions. But all the HiFiBerry docs and the physical board have the following listed as the dtoverlay

dtoverlay=hifiberry-dacplus

For what it’s worth I have a second Raspberry Pi 2B, I just chucked the SD card and DAC2 Pro HAT onto that board and got the exact same issue. I did this as I read that Pis can sometimes have issues with GPIO pins… But I think this rules that out…

I’ve posted a question with the dmesg output in the HiFiBerry support community forum.
I’ll post back if they indicate anything or are able to help…

As mentioned I suggest to first try it with raspbian to verify the DAC works.

1 Like

OK. I have just tried with Raspberry Pi OS Lite and it works!

I assume you used latest version and then dtoverlay=hifiberry-dacplus?

Yes.
In summary I made the following changes to the /boot/config.txt as I was following a guide for iqaudio (similar DAC):

  • Uncomment dtparam=i2s=on
  • Remove line dtparam=audio=off
  • Added dtoverlay=hifiberry-dacplus
  • Updated dtoverlay = vc4-kms-v3d to dtoverlay = vc4-kms-v3d,noaudio

My wild guess is still the DAC2 Pro is not supported by the old overlay

Ahhhh and with my image of OSMC it is still using the old overlay?
So might be resolved if I update to a later image of OSMC?

Yes, if you install an updated version of OSMC it will use the new Overlay (with also the new config.txt parameters.

1 Like

My only reticence in that approach is that I would lose the ability to hardware decode VC-1 and MPEG2 codecs…

Oh well, I guess it can’t be helped as I would like to use this DAC HAT.