18. Pi-Codec+ / Pi-CodecZero Configuration
The IQaudIO Pi-Codec boards 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 it’s 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
programatically.
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 been to be adjusted to get the best possible output.
Pi-Codec+ 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 analog and digital mixing paths
• DSP for ALC (Automatic Level Control)
• 5-band EQ (Equalisation)
• Mono line-out / mini speaker driver: 1.2W @ 5V, THD<10%, R=8
Ω
We’ve created a set of preconfigured scripts (loadable ALSA settings) on our GitHub site.
- 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: THE CODEC BOARD’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. See the
FAQ section of this document on how to store/save or restore ALSA settings.
v32
24-Nov-2019
28