Difficulty in configuring Pi codec zero audio hat

Hi Alll

I have raspberry pi zero 2 with Raspibian 32 bit operating system with Audio codec zero hat just purchase from core electronics…

I had difficulty in configuring Audio codec hat and figure out as internal product name was different then core electronic document pdf for this product says


I added this to /boot/config.txt This did not worked, and does not start raspberry pi at boot.
Then I query and found out product name as pi-codeczero.


This worked…started raspberry pi…

I have also updated my rc.local with following command

‘sudo alsactl restore -f /home//meross/Pi-Codec/IQaudIO_Codec_OnboardMIC_record_and_SPK_playback.state’

Now I have one problem. When I tried to record using the following command first time, it did not starts recording but the terminal hangs up and no control + c working. I had to kill the terminal.

‘sudo arecord -vv --format=cd --file-type raw | lame -r - /home/meross/test.mp3’

Then immediately I open a new terminal and issue the second time same command and it works and records the audio successfully!

‘sudo arecord -vv --format=cd --file-type raw | lame -r - /home/meross/test.mp3’

Audio successfully recorded…

In short first initiations of Audio codec zero hat hangs terminal. Second initiations of device audio codec zero hat works successfully. WEARIED…

Can any one help to sort out the problem?


kesh Patel

check the configuration in your /boot/config.txt file. Open the file using a text editor and ensure that the following line is present:


Make sure there are no typos or extra spaces in these lines. Save the changes and exit the text editor.

Thanks.The current configuration is allready setup exactaly as you suggested. Any other idea is highly welcomed to resolve the issue…Kesh

Hi Kesh,

Welcome to the forum :slight_smile:

It looks like our linked PDF may be out of date as it is from when these modules were still using the IQAudio branding.

I’ve found a more up to date set of instructions from the Raspberry Pi Documentation site which includes some extra configuration steps for the Pi Codec Zero, check the heading Extra Codec Zero configuration from the link below.