The IQaudIO Codec Zero is a 24-bit high-definition Raspberry Pi HAT which allows recording of audio from a number of different devices, including the board’s own built-in MEMS microphone!
The board has connections to allow users to also record audio from stereo phono sockets (via aux in connections) or mono external electret microphones.
You can also playback sound via the stereo phono sockets (via aux out connections) or the handy mono speaker connector terminal (external speaker required - 1.2W / 8Ω)
The Codec Zero includes a HAT EEPROM allowing for auto-configuration if needed, and includes green (GPIO23) and red (GPIO24) LEDs which can be used for status indications, alongside a tactile button (GPIO27) that can be used to start an event.
The Codec Zero is a great starting point for a walkie talkie, intelligent doorbell, vintage radio hack or smart speaker project.
No soldering required - pushes straight on to your Raspberry Pi GPIO pins!
Codec and Mixers
The IQaudio Codec Zero board uses the Dialog Semiconductor DA7212 codec. The DA7212 allows the recording of audio from the board’s built-in MEMS microphone, from stereo Phono sockets (AUX IN), 2x mono external Electret microphones and playback through stereo Phono sockets (AUX OUT)
and mono speaker connector.
Each input and output device has its own “mixer” allowing the audio levels/volume to be adjusted independently. Within the codec itself, other mixers/switches exist to allow the output to be Mono’d for single speaker output, signals may also be inverted and there is a 5-band Equaliser to adjust certain frequency bands. These settings can be controlled through alsamixer interactively or programmatically.
It is important to note that the AUX IN and AUX OUT are both 1vRMS. It may be necessary to adjust the AUX IN’s mixer to ensure the input signal doesn’t saturate the ADCs (Analogue to Digital Convertors). Similarly, the output mixers may require adjustment to get the best possible output.
Features
- High-performance 24-bit audio codec
- Supports common audio sample rates between 8-96kHz
- Built-in MEMS microphone (Mic2)
- Mono Electret microphone (Mic2 left)
- Automatic MEMS disabling on Mic2 insert detect
- Supports additional (no fit) Mono Electret microphone (Mic1 right)
- Stereo auxiliary input channel (AUX IN) - PHONO/RCA connectors
- Stereo auxiliary output channel (Headphone / AUX OUT) - 3.5mm Stereo jack
- Flexible analogue and digital mixing paths
- DSP for ALC (Automatic Level Control)
- 5-band EQ (Equalisation)
- No soldering required
- Mono line-out / mini speaker driver: 1.2W @ 5V, THD<10%, R=8Ω
Board Features

- P1 and P2 will support external PHONO / RCA sockets if needed. P1: AUX IN, P2: AUX OUT (Pin 1 is square). See the user guide for more information.
Resources
The IQaudIO Product Guide and Manual provides a great deal of information about each IQaudIO board including setup, configuration, software options and project suggestions.
There are also a set of preconfigured scripts available (loadable ALSA settings) via the board's GitHub site: https://github.com/iqaudio/Pi-Codec. These cover several use cases such as:
- Mono MEMS mic recording, mono speaker playback
- Mono MEMS mic recording, mono AUX OUT playback
- Stereo AUX IN recording, stereo AUX OUT playback
- Stereo MIC1/MIC2 recording, stereo AUX OUT playback
Note: Input/Output Boot Settings
The Codec Zero's DA7212 chip needs to know what is input and what is output at each power cycle for it to operate successfully. We suggest your application does this at startup or you add a suitable configuration to the /etc/rc.local file.
Storing the alsamixer setting can be achieved by performing the following at the command line:
sudo alsactl store
It is possible to save the current state to a file, then reload that state at startup.
To save:
sudo alsactl store -f /home/pi/usecase.state
To restore a saved file:
sudo alsactl restore -f /home/pi/usecase.state