Audio Injector Installation

Audio Injector Stereo Soundcard and the Raspberry Zero Soundcard by Audio Injector are audio hats for the Raspberry Pi. These sound cards comes with two inputs and two outputs, plus a build in microphone.


This manual is made for an Raspberry Pi 4 running Raspian Buster on it. It's also tested with a Raspberry Pi Zero running Raspian Buster.

After connecting the Audio Injector to the Raspberry Pi some software should be installed.
First you have to download the deb package from Unpack it:

 $ tar -xf audio.injector.scripts_0.1-1_all.deb.tar.gz

And install it:

 $ sudo apt install ./audio.injector.scripts_0.1-1_all.deb

Change some configurations, in:

 $ sudo nano /boot/config.txt

Comment out:

 # dtparam=audio=on

And type in:


ctl + o for saving, press return and ctl + x to leave.
Reboot your Raspberry Pi:

 $ sudo reboot

Alsa Mixer Settings
There are two reference alsa mixer files which will allow you to setup default output with either line input or microphone input : Download:

 $ wget

Unpack it:

 $ unzip

go into the folder:

 $ cd stereo-and-zero-master/audio.injector.scripts-0.1

and run:

 $ alsactl --file asound.state.MIC.thru.test restore
 $ alsactl --file asound.state.RCA.thru.test restore


For the 10 kHz test follow the instructions on
Then install sox:

 $ sudo apt install sox

In /home/pi/stereo-and-zero-master/ run:

 $ sudo chmod 755
 $ ./

Simple Play and Record


 $ arecord -r 48000 -f S16_LE -c 2 -d 20 test.wav

Playing back:

 $ aplay test.wav

I2S and I2C Pins

The following pins are used by the sound card, don't use them for anything else!
Beside the power (5V and 3V3) and ground (GND) the I2S bus needs the following pins:

 GPIO 18 (Pin12)    BIT CLOCK (BCLK);
 GPIO 19 (Pin 35)   IN and OUT LR CLOCK (DACLRC and ADCLRC);
 GPIO 20 (Pin 38)   DATA IN (ADCDAT);
 GPIO 21 (Pin 40)   DATA OUT (DACDAT);

And the I2C bus needs these pins:

 GPIO 02 (pin 03)   SDIN
 GPIO 03 (pin 05)   SCLK

graphic from:


This manual is made by Wolfgang Spahn 2020.
It is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Creative Commons License