-
Notifications
You must be signed in to change notification settings - Fork 5.2k
5.15 kernel break Hifiberry DAC 2 HD Hat #4898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hifiberry configuration instructions: https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/ |
Uncommented the followling line in my config.txt
Rebooted. No change. |
What does |
|
DOH! Forgot to enable i2c.
|
The overlay should have enabled i2c1, so something has clearly gone wrong. What do you get from this command?
|
|
I don't have a HiFiBerry DAC2 HD HAT to test, but looking at the overlay I see it is expecting to find the DAC at I2C address 0x4c, and a PLL/clock at I2C address 0x62. Your i2cdetect output shows the PLL but no DAC, which is going to cause problems for the driver. |
Is there anything I need to do on my side? Do you need more information from me? |
The working theory is that your hardware has developed a fault - I don't know what else would explain the lack of the DAC at address 0x4c. You could try downgrading to a 5.10 kernel using Do you have any suggestions, @j-schambacher? |
@apastuszak, I tend to agree with Phil. Please confirm that the downgraded kernel version works (again). We have not yet tested and verified 5.15. But at a first look, I do not see an obvious reason, why it should not work. Thanks for your help |
uname -a
aplay -l
sudo i2cdetect -y 1
|
@apastuszak Thanks! I'll try to dig into it. |
@j-schambacher Thank you! |
I can confirm the a.m. behaviour with the 5.15 64bit kernel: the modules are loaded, but show no activity: I can't observe any I2C bus communication (tested with logic analyzer) nor do printk-statement while in the driver-probe function leave any trace in the logs. @pelwell any hint? I'm meanwhile going to check with the 5.15 32 bit kernel. |
What does |
Just as above: 0x62, the PLL is detected, the DAC needs the PLL clock, which is not configured, therefore no function on the I2C and can't be detected. I wonder, why I can't see any activity on the I2C? |
Do you see the i2cdetect scanning? |
yep, that works as expected. |
Your overlay (or rather the device tree it creates) is unusual in that there are two instances of the dacplushd compatible string - one as an I2C device and one as a random platform device. The I2C device is relies on the platform device for its clock. One thing that has changed since 5.10 (if my memory of the timing is correct) is that the system does more to establish that the dependencies for a device node are ready before calling the probe function. If you remove the "clocks" declaration from the pll@62 node does it get into the probe function? |
Ok, I'll try. |
Also, how does the non-I2C/platform instance ever get instantiated since there is no platform driver probe function, only one for the I2C mode? |
I fixed it by removing the "clocks" declaration from either parts, DAC and PLL. I'm preparing a PR for 5.15 to fix it. |
@j-schambacher Thank you for fixing this! |
Joerg's fix #4904 has been merged, and the updated overlay will appear in future kernel releases. In the meantime there's a fresh build here: Install it with:
|
It's working, but I had to modify the config.txt. In 5.10 it worked without me needing to modify config.txt. But that's on the vendor to provide instructions IMHO. Thank you! |
If the HAT EEPROM includes the contents of the overlay (and not just its name) then you will have to continue to use |
Normally, we provide the entire DT-overlay in the EEPROM. We'll discuss internally how to handle this. I'll keep you posted. force_eeprom_read=0 in config.txt may also help to avoid reading the HAT EEPROM. |
That will stop the firmware even looking for the EEPROM, which is probably fine in this case. |
Hi, In /boot/config.txt I have killed both the HDMI audio and the jack with Do I also need:
Could someone explain what having "dtoverlay=" at the top of the file does? I don't understand that. Thanks very much. Bob. |
Some HAT EEPROMs include the full overlay - that's how things were intended to work originally. Unfortunately, newer versions of the kernel have changed the layout of the Device Trees and how they are processed; things that used to work may no longer work. Since we package the overlays with a kernel it is easy to adapt to changes, but this doesn't work if the overlay is compiled into the EEPROM. That is why we added the ability to just embed the name of the overlay into the HAT. The firmware loads overlays in several stages. When it finds a
To recap, the suggestion is that your config.txt should contain the following:
|
That's brilliant I'm now confident on config.txt thanks so much Phil. I'm sorry to be a bit slow but could I / should I install this ... Hoping to try this out tomorrow night and over the weekend. Thanks again. Bob. |
It's not necessary to install the overlay from the downloaded zip file unless you haven't updated your kernel in the last 6 months. If you were curious you could:
I tried this on a Pi 4 running a recent kernel and it said:
i.e. the downloaded version is the same as the one already installed. |
Thanks Phil. Cheers, |
This seems to be a good point to close the issue. |
Hi folks! Unfortunately, with Kernel 5.15 my HiFiberry Digi2 Pro (HW 2.1) stopped being recognized as well. I'd appreciate any suggestions. Thanks!
|
Read my answers to @mightyoakbob. |
I can confirm that Phil's advice does work for my DAC which is a HiFiBerry Dac2 HD.
I made "dtoverlay=" the very first line in the file and then the DAC works fine. This DAC also has a hardware volume control built into it. Some music players have this working but unfortunately not with mpd so the only volume control is the software one. That kind of defeats the object of having a high quality dac. No one in the Linux community seems to want to look at it and I know HiFiBerry have offered support to anyone willing to have a go at this. Cheers, Bob. |
I tried everything but my HiFiberry Digi2 Pro (HW 2.1) is simply not recognized in 5.15 on my RPi4 Rev 1.2.
|
Does |
BTW, ideally you would have opened a new issue for this, since your card isn't a DAC 2 HD HAT. |
https://github.com/raspberrypi/utils/tree/master/vclog should work on both 32 and 64 bit systems to read the firmware logs. |
Describe the bug
Upgrading to the 5.15 Linux kernel breaks compatibiilty with the Hifiberry DAC 2 HD. I did an rpi-update, rebooted my pi, and aplay no longer sees the HAT.
This is what is in my config.txt
Output of aplay -l
Steps to reproduce the behaviour
Use rpi-update to upgrade the kernel to 5.15
Device (s)
Raspberry Pi 4 Mod. B
System
Logs
Additional context
This was working with kernel 5.10.
The text was updated successfully, but these errors were encountered: