The HiFiBerry Codec Stage is a audio codec (DAC and ADC) for the Raspberry Pi (newer models with 40 pin GPIO connector). This is a special sound card for the Raspberry Pi, optimised for one specific use case: affordable audio recording and playback. It is designed specifically for OEMs that require analog input and output capabilities at an affordable price.
Please note that this board isn’t available to end users. If you’re a business customer, please contact us to discuss your specific needs.
- Stereo input and output
- Hardware volume control for DAC and ADC. You can control the input and output parameters using “alsamixer” or any application that supports ALSA mixer controls.
- Connects directly to the Raspberry Pi, no additional cables needed
- No soldering, comes as a pre-fabricated kit.
- Compatible with all Raspberry Pi models with a 40-pin GPIO connector
- Directly powered from the Raspberry Pi, no additional power supply. Power supply via I/O board possible if Pi’s power jack isn’t expose to the outside of your enclosure
- Mic bias voltage for the use with electret microphones
|1||Analog input (connected in parallel to the phone jack input)|
|2||Microphone selector (onboard or external)|
|3||Analogue output (headphone)|
|4||Microphone bias voltage|
|Maximum input voltage||2.1Vrms|
|Maximum output voltage||2.1Vrms|
|Line in ADC signal-to-noise ratio||85 dB||typical|
|DAC signal-to-noise ratio||100dB||typical (headphone 16 Ohm)|
|Line in ADC THD+N||-70 dB||typical|
|DAC THD+N||-80dB||typical (headphone 16 Ohm)|
|Sample rates||32,44.ö1,48 and 96 kHz|
Overlay for config.txt:
There are lots of mixer controls, it’s important to set these correctly.
Simple record/playback settings
amixer set 'Headphone' 103 amixer set 'Headphone Mux' 'DAC' amixer set 'PCM' 192 amixer set 'Lineout' 0 amixer set 'Mic' 1 amixer set 'Capture' 6 amixer set 'Capture Attenuate Switch (-6dB)' 'on' amixer set 'Capture Mux' 'LINE_IN' amixer set 'Digital Input Mux' 'I2S'
Note that the RCA output connector and the pin header is connected to the Headphone output, not to the line-out of the codec!
Recording from the onboard-microphone
Set the jumper first to select the onboard microphone:
amixer set 'Capture Mux' 'MIC_IN'
Record 5 seconds of audio and play back recording
arecord -c 2 -r 44100 -f S16_LE -d 5 x.wav; aplay x.wav
Recording from an external microphone
Set the jumper to “external”. Depending on the microphone you’re using you might have to set the Mic bias jumper to enable a bias voltage to your microphone (electret microphones will need this, dynamic microphones should not have Mic bias enabled).
You can use the same play/record command as in the previous example.
Note that this board is not available to the general public. If you’re an OEM that requires a large number of these boards, please contact us.