As directed in the official docs, I have `#dtparam=audio=on` commented out in `/boot/config.txt`, and I rebooted after that. I ran `raspi-config` and selected the Codec Zero HAT for audio option. The HAT is detected by the kernel:
Code: Select all
$ grep -a . /proc/device-tree/hat/*
/proc/device-tree/hat/name:hat
/proc/device-tree/hat/product:Raspberry Pi Codec Zero
/proc/device-tree/hat/product_id:0x0101
/proc/device-tree/hat/product_ver:0x0001
/proc/device-tree/hat/uuid:7c582b02-e8d3-4142-976d-24290cc45f3f
/proc/device-tree/hat/vendor:Raspberry Pi Ltd.
Code: Select all
$ sudo alsactl restore -D Zero -f Pi-Codec-master/IQaudIO_Codec_OnboardMIC_record_and_SPK_playback.state
No state is present for card Zero
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Found hardware: "RPi_Codec_Zero" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card Zero
I noticed that a similar issue was mentioned by people using the pre-rebranding IQaudIO Codec Zero. It seems my issue is different. I have a fairly new, post-rebrand Codec Zero (from the Pi shop in Cambridge!), and it is detected correctly as so by the kernel.
Some more diagnostics:
Code: Select all
$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault
Default Audio Device
default
output
hw:CARD=vc4hdmi,DEV=0
vc4-hdmi, MAI PCM i2s-hifi-0
Direct hardware device without any conversions
plughw:CARD=vc4hdmi,DEV=0
vc4-hdmi, MAI PCM i2s-hifi-0
Hardware device with all software conversions
sysdefault:CARD=vc4hdmi
vc4-hdmi, MAI PCM i2s-hifi-0
Default Audio Device
hdmi:CARD=vc4hdmi,DEV=0
vc4-hdmi, MAI PCM i2s-hifi-0
HDMI Audio Output
dmix:CARD=vc4hdmi,DEV=0
vc4-hdmi, MAI PCM i2s-hifi-0
Direct sample mixing device
hw:CARD=Zero,DEV=0
RPi Codec Zero, Raspberry Pi Codec Zero HiFi da7213-hifi-0
Direct hardware device without any conversions
plughw:CARD=Zero,DEV=0
RPi Codec Zero, Raspberry Pi Codec Zero HiFi da7213-hifi-0
Hardware device with all software conversions
sysdefault:CARD=Zero
RPi Codec Zero, Raspberry Pi Codec Zero HiFi da7213-hifi-0
Default Audio Device
dmix:CARD=Zero,DEV=0
RPi Codec Zero, Raspberry Pi Codec Zero HiFi da7213-hifi-0
Direct sample mixing device
$ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault
Default Audio Device
default
output
hw:CARD=Zero,DEV=0
RPi Codec Zero, Raspberry Pi Codec Zero HiFi da7213-hifi-0
Direct hardware device without any conversions
plughw:CARD=Zero,DEV=0
RPi Codec Zero, Raspberry Pi Codec Zero HiFi da7213-hifi-0
Hardware device with all software conversions
sysdefault:CARD=Zero
RPi Codec Zero, Raspberry Pi Codec Zero HiFi da7213-hifi-0
Default Audio Device
dsnoop:CARD=Zero,DEV=0
RPi Codec Zero, Raspberry Pi Codec Zero HiFi da7213-hifi-0
Direct sample snooping device
Any help will be much appreciated!