Skip to content
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

not working on RPI5 #9

Closed
devriesewouter89 opened this issue Feb 8, 2024 · 12 comments · Fixed by raspberrypi/linux#5972
Closed

not working on RPI5 #9

devriesewouter89 opened this issue Feb 8, 2024 · 12 comments · Fixed by raspberrypi/linux#5972

Comments

@devriesewouter89
Copy link

I can't seem to get the codec zero (I have an IQAudio one) working with the raspberry pi 5.
If I take all the steps as instructed here . If I switch the codec + SD card from an RPI5 to an RPI4 everything works.

Another person also has the same issue: https://forums.raspberrypi.com/viewtopic.php?t=365243 with the exact description of actions as me.

@lurch
Copy link

lurch commented Feb 15, 2024

Hello @devriesewouter89

I've managed to reproduce this issue, and with the help of a colleague I've come up with a potential fix. Can you please download
hat_map.zip, unzip it, and copy hat_map.dtb to /boot/firmware/overlays/ (overwrite the existing file) and then reboot. Does that get the IQAudio Codec Zero board working on your Pi 5?
If it doesn't, could you please let me know the output of cat /proc/device-tree/hat/uuid - thanks!

@kaosbeat
Copy link

kaosbeat commented Feb 15, 2024

Hi,

I'm having the same issue, I tried overwriting hat_map.dtb with your updated version and I still have the problem.

During boot I hear several pops, like "power on/off cycle" clicks (in pairs)

dmesg tells me:

[    2.946618] da7213 1-001a: supply VDDA not found, using dummy regulator
[    2.946684] da7213 1-001a: supply VDDIO not found, using dummy regulator
[    2.949514] da7213 1-001a: supply VDDMIC not found, using dummy regulator
[    3.154249] da7213 1-001a: ALC auto calibration failed with overflow
[    3.431145] da7213 1-001a: ALC auto calibration failed with overflow

if I do cat /proc/device-tree/hat/uuid

I get

pi@rpi5:~ $ cat /proc/device-tree/hat/uuid
e15c739c-877d-4e29-ab36-4dc73c21127c

I also tested the audio with a USB soundcard (cheap USB class compliant device) and it works without a glitch

If I enable iq-audio-codec in the /boot/firmware/config.txt

# Enable audio (loads snd_bcm2835)
#dtparam=audio=on
dtoverlay=iqaudio-codec

The device shows up whether or not it is actually installed

@lurch
Copy link

lurch commented Feb 20, 2024

After further research, it turns out that my tweaked hat_map.dtb from last week wasn't quite correct - can you try this version instead please?
hat_map.zip

Also, which OS and version of that OS are you running? What does uname -a say?
My hat has the same UUID as yours, I also get the occasional "click" during bootup, I also see the same "dummy regulatator" messages in dmesg as you, but I see nothing about "ALC auto calibration".

If you could also please test this @devriesewouter89 that would be great.

lurch added a commit to lurch/linux that referenced this issue Feb 20, 2024
lurch added a commit to lurch/linux that referenced this issue Feb 20, 2024
pelwell pushed a commit to raspberrypi/linux that referenced this issue Feb 20, 2024
pelwell pushed a commit to raspberrypi/linux that referenced this issue Feb 20, 2024
pelwell pushed a commit to raspberrypi/linux that referenced this issue Feb 20, 2024
pelwell pushed a commit to raspberrypi/linux that referenced this issue Feb 20, 2024
@kaosbeat
Copy link

After further research, it turns out that my tweaked hat_map.dtb from last week wasn't quite correct - can you try this version instead please?
hat_map.zip

Also, which OS and version of that OS are you running? What does uname -a say?
My hat has the same UUID as yours, I also get the occasional "click" during bootup, I also see the same "dummy regulatator" messages in dmesg as you, but I see nothing about "ALC auto calibration".

If you could also please test this @devriesewouter89 that would be great.

I'm currently traveling, will try next week

@Martin-HiPi
Copy link

Hi,

I tested the file from here on a Pi 5 and the HAT is now detected!

Thanks!

@lurch
Copy link

lurch commented Feb 21, 2024

Thanks for the confirmation 👍

@kaosbeat
Copy link

I'm afraid not on mine.
Using latest hat_map.dtb
uname -a
says
Linux rpi5 6.1.0-rpi8-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux

I also tried updating the firmware as described in the raspberry pi forum thread using rpi-audio-flash This results in a message telling me everything is already up to date after correctly auto detecting the hat

what else can I try?

@pelwell
Copy link
Collaborator

pelwell commented Feb 23, 2024

You can start by posting the output of the following command:

$ grep -a . /proc/device-tree/hat/*

@kaosbeat
Copy link

grep -a . /proc/device-tree/hat/*
/proc/device-tree/hat/name:hat
/proc/device-tree/hat/product:Pi-CodecZero
/proc/device-tree/hat/product_id:0x0013
/proc/device-tree/hat/product_ver:0x0001
/proc/device-tree/hat/uuid:e15c739c-877d-4e29-ab36-4dc73c21127c
/proc/device-tree/hat/vendor:IQaudIO Limited www.iqaudio.com

@pelwell
Copy link
Collaborator

pelwell commented Feb 23, 2024

Thanks - your device has the correct UUID, so the hat_map should be causing it to load the iqaudio-codec overlay. However, you can rule out any hat_map-related issues by putting the following two lines, exactly as written, at the top of your config.txt:

dtoverlay=
dtoverlay=iqaudio-codec

I suspect it will still fail, and that the failure is caused by a hardware problem, but I'm open to other possibilities.

popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 23, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Feb 23, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 5, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 5, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 5, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 11, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 11, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 19, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 19, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Mar 27, 2024
@mwshafer
Copy link

mwshafer commented Mar 27, 2024

I originally posted this issue here and can confirm that the hat file allowed my RPI 5 to detect the Codec Zero. I can see it in when I right click on the volume icon and it shows up when I do aplay -l all in terminal. The issue isn't totally resolved however, because now when I try to run sudo alsactl restore -f /home/dasl/code/audioRecorder2/Pi-Codec/Codec_Zero_OnboardMIC_record_and_SPK_playback.state I get the following:

alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
No state is present for card vc4hdmi0
alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "vc4-hdmi" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card vc4hdmi0
alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
No state is present for card vc4hdmi1
alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Found hardware: "vc4-hdmi" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card vc4hdmi1
alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:2 use case configuration -2

@lurch
Copy link

lurch commented Mar 27, 2024

It's totally safe to ignore those "errors" 🙂

pelwell pushed a commit to raspberrypi/linux that referenced this issue Apr 5, 2024
popcornmix pushed a commit to raspberrypi/linux that referenced this issue Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants