-
Notifications
You must be signed in to change notification settings - Fork 432
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
Intermittent DAC initialization (power up to power up) with HiFiBerry DAC2 HD #402
Comments
Hey @jcat2 when did you install the balenaSound instance? As we recently did an update in the audio block to bring in the new driver. |
Hi @shawaj. I did the installation last night and this morning I did a clean Balena application using the latest github repo and still had the same problem. The additional information that I can provide is that the DAC is detected the first time the installation boots and has its configuration variable set. Every other boot after that the DAC is not detected. It looks like this is isolated to balenaSound. I've tried rebooting the same device and DAC with HiFiBerry OS and have had no issues. |
Unfortunately I don't have one of these DACs available to test. Perhaps the people in #357 or #377 @arjan5340 @richardpringle might be able to comment on whether they are seeing the same issue at all? Also @jcat2 have you got any device variables set? Such as the sound output one? If not, please try adding the |
@shawaj I've tried setting the auto output to AUTO and DAC. When DAC is set and error message stating that no DAC was found gets displayed in the logs. |
What pi version are you using? And what power supply? It sounds like it might be an issue with it not receiving enough power or something but it's hard to say without having one to test with so I'm just guessing at this point. |
@shawaj I'm using a Raspberry Pi 4. The power supply is the official Raspberry Pi 4 power supply. At it's face I would agree that it sounds like a power problem, however, given that it's been working reliably with HiFiBerry OS power cycle after power cycle it makes me think it's something else. |
@jcat2, I've seen similar issues with one of my two pi-4s with the DAC2 HD. I didn't try loading the hifiberry OS though. I'm not actually too familiar with Linux and how it scans for audio devices, you should be able to check if the card is picked up somewhere in the filesystem right (there should be a file-descriptor somewhere)? Any ideas @shawaj? This seems like a concurrency issue or something to me, as though it's possible that the OS scans for cards before the card receives power. I'm not sure if this makes sense at all though. Is there a process that actually scans for an audio card? Or is it more like a plug-n-play USB type thing? I don't think it's actually a pulse-audio issue, it must be a problem with the OS? What do you get when you |
@richardpringle the cards are at |
@richardpringle and @shawaj I just powered up my balena-sound image and the DAC was not detected. There is nothing listed in /proc/asound/cards. The results of ls -la /proc/asound are found below.
On the next power up the DAC was detected. Here are the results
It looks like for whatever reason the OS is not picking DAC on certain power ups. Almost all the power ups have resulted in the DAC not being detected. |
On the boot ups where it doesn't show, does anything show in i2cdetect -y 1 ? It's almost like it's booting up too fast for the DAC to power up or something. Also what happens on the times when it doesn't show if you reboot it without removing the power? Lastly, in the hifiberry os you mentioned, does it have a /boot/config.txt file? |
@shawaj Just had a bot up were the DAC does not show up. Here is the log
And here is the return of i2cdetect -y 1
I'll reinstall HiFiBerry OS to get the /boot/config/txt Below is the log is i2cdetect from a good boot.
If I reboot it without removing power more times than not the DAC is not detected. |
Here is the /boot/config.txt from HiFiBerry OS
|
Interesting that they are running a custom kernel. Doubt that's the issue but still. It looks like they're also using the software i2c controller, forcing the vc4 audio off and forcing the eeprom not to be read.
Especially the last line implies that they have got some issue with the eeprom contents or something that is incorrect. I guess we should try replicating this in balenaCloud and see if that fixes things. What do you have in the dtoverlay section of balenaCloud device currently? Can you also try the following commands on the host OS shell:
Also do you have any other devices attached to the Pi or is it just the DAC? FYI pinout info here https://www.hifiberry.com/docs/hardware/gpio-usage-of-hifiberry-boards/ |
If you could do the commands above on HiFiBerry OS as well that would be amazing! |
@shawaj Regarding the command do you want them from HiFiBerry OS or balena? In balena there is no /etc/asound.conf file on the host shell. uname -r reports 5.4.58 and uname -a reports Linux ce5ba44 5.4.58 #1 SMP PREEMPT Wed Dec 16 14:42:39 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux I'll try them on HiFiBerry also. |
Sorry the /etc/asound.conf would be on the audio container, my bad. And yes if you could try on HiFiBerry OS that would be great. I'm thinking this is some issue with the 5.4 kernel and the old overlay perhaps as there was some changes in the 5.4 kernel that caused issues with some overlays. |
@shawaj |
@shawaj |
Adding the HiFiBerry OS config.txt overlays and eeprom commands did not fix the issue. |
Here is the data requested on HiFiBerry OS
|
Any updates on this issue? |
I'm still having the same issue. I started to move away from balena sound and just use the HiFiBerry OS seeing it works on every power up and have every similar capabilities. The HiFiBerry maker is willing to send boards to developers if anyone from the development team wants to troubleshoot this further. |
Describe the problem
From power to power up the output of the device changes. On one power up it will be the headphone jack. On the next power up it will be DAC output. No settings are changed between power ups or application restarts. It appears that the DAC is not always being detected. Most of the time the DAC is not being detected or configured as an output.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expectation is that the DAC would always be detected and the preferred output
Screenshots
Below are the log traces
Run with DAC not being detected
Run with DAC being detected
Device information
Additional context
Device Configuration Variables
BALENA_HOST_CONFIG_dtoverlay hifiberry-dacplushd
Balena Sound Version
3.4.5
The text was updated successfully, but these errors were encountered: