Cant get IQAudio Codec Zero work on RPI 4

Hey there,

I’m currently trying to get a IQAudio Codec Zero work with Patchbox OS and MODEP. But it seems, like that sound card is not working with the Pi. I also tried it on 2 different RPI 4 with to different IQAudio hats. The hat is recognized (aplay -l and arecord -l, shows up in the patchbox Jack config menu) the status LED on that hat is on as well.

I’ve already modified my config.txt

patch@patchbox:~ $ cat /boot/firmware/config.txt
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
#dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
max_framebuffers=2

# IQAudio
dtoverlay=iqaudio-codec

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

Tried to load the GitHub - raspberrypi/Pi-Codec: Tools for the IQaudIO Pi-Codec / CodecZero sound cards States:

patch@patchbox:~ $ sudo alsactl restore Pi-Codec/Codec_Zero_AUXIN_record_and_HP_playback.state
alsactl: snd_card_iterator_sinit:257: Cannot find soundcard 'Pi-Codec/Codec_Zero_AUXIN_record_and_HP_playback.state'...

and even the PiStomp States that I found here in the community:

patch@patchbox:~ $ sudo alsactl restore iqaudio-pistomp.state
alsactl: snd_card_iterator_sinit:257: Cannot find soundcard 'iqaudio-pistomp.state'...

But every time I try to configure Jack I get an error:

Jack service restarted!
Waiting for Jack to boot...
Error: Failed to start Jack service! Try different settings!

No matter what settings I try (44100, 48000 / 64, 128, 256, 512, 1024 / 2)

The interesting part is, I do have an old and cheap Behringer USB Card that runs without any problems at 48000/256/2. I only would like to get a better latency and maybe better sound.

Are there any further ideas what to do to get this working? Any help is appreciated.

the link suggested in the post says

sudo alsactl restore -f <filename>

-f argument is omitted in your command and I guess it indicates state file. and without -f alsactl seems thinking upcomming parameter as a soundcard to control, rather than state file to write.

1 Like

Oh yes, you are totally right!
Tried it once again with the following result:

sudo alsactl restore -f Pi-Codec/Codec_Zero_AUXIN_record_and_HP_playback.state
alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2

Jack is not starting either.

I’m in the same boat. Let’s compare notes.

I’ve got a Pi 4 with an original IQ Audio Codec Zero. It worked after a lot of effort on the older 2022 version of Patchbox OS and the sound quality was exceptional for the price, but then… well, don’t rely on cheap SD cards and always back up your configuration. The no-name SD card went ‘bad’ and I can’t recover anything (the whole thing is toast). So I thought I’d try the new 2024 beta of Patchbox OS instead, on a SanDisk card this time, and I’m getting the same Jack issues as you.

Are you running the new beta as well, or the old one? I’m considering rolling back to see if I can get it all to work again.

Black or green codec zero?

@IrregularShed Ouch!
But good to know, that this card does not work out of the box. I’ve already felt really stupid about that. :slight_smile:

I’m running the current version of PatchboxOs (2024-04-04) and also tried the an older Debian Lite Version and installed ModEP manually, guided by PiStomp.

@deathbeard
I’m using a black Codec Zero. Just bought two of them this month, so they should be the current version.

1 Like

We are using the iqaudio codec zero(black board) in pi-Stomp without issue! Very quiet card!

I know! This is why I bought that card. :smile:
But anyways, I do not get it to work with Jack and so not with ModEP.
Have you tried it with the latest Versions of PatchboxOS?
What exact Versions (OS, ModEP, etc.) are you using for PiStomp?
Is there any additional setup for using the Codec Zero?
What I tried so far was just editing the /boot/firmware/config.txt and restoring the alsactl settings.

It looks like you’re using a pi4 right? Stick with Bullseye for now. Check out the install.sh in the setup/mod folder of pi-Stomp and the audio card folder too

1 Like

I’m running a RPi5 with the 2024 Patchbox OS update and facing the same issue.

Has anybody figured out a way to install PatchboxOS with an IQAudio Codec Zero without running into the Jack error?

EDIT: black Codec Zero