Issue with NAU8822 Codec on Verdin AM62

Issue with NAU8822 Codec on Verdin AM62: arecord: pcm_read:2221: read error: Input/output error

Board and Setup Information:

  • Carrier Board: Verdin Development Board
  • SoM: Verdin AM62
  • Audio Codec: NAU8822
  • Software: Custom Yocto Build (Toradex BSP)
  • $uname -r
    6.1.80-6.7.0-devel+git.79fe3839eaae

Problem Description

I’m trying to record audio using the NAU8822 codec on Verdin AM62. However, running the arecord command results in the following error:

arecord -D hw:0,0 -V mono -c 2 -f S16_LE -r 48000 -t wav mic.wav
Recording WAVE 'mic.wav': Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:2221: read error: Input/output error

for linux -bsp using below devictree for building
https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi?h=toradex_ti-linux-6.6.y

Any guidance or suggestions for resolving this issue would be greatly appreciated.

Regards
Teju SH

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Teju SH,

Thank you for reaching out with your issue regarding the NAU8822 codec on the Verdin AM62. Let’s go through some steps to help you troubleshoot and resolve the input/output error you’re encountering:

  1. Verify Device Tree Configuration: Ensure that your device tree is correctly set up for the NAU8822 codec. Check that the I2C and I2S interfaces are properly defined and that the codec is initialized correctly. You can refer to the device tree file you mentioned to verify these settings.

  2. Check ALSA Configuration: Use tools like amixer or alsamixer to confirm that your audio settings are correctly configured. Make sure the correct sound card is selected and that the input channels are unmuted. You can list available sound cards using cat /proc/asound/cards to ensure the NAU8822 is recognized by the system.

  3. Test with Different Audio Settings: Try recording with different audio settings, such as altering the sample rate or format. For instance, you might try a lower sample rate or a different audio format to see if the issue persists.

  4. Kernel and Driver Checks: Verify that your kernel and audio drivers are up to date and compatible with the NAU8822 codec. Check the kernel logs (dmesg) for any error messages related to the audio subsystem or the codec itself.

By following these steps, you should be able to identify and resolve the issue with the NAU8822 codec on your Verdin AM62 setup. If the problem persists, further investigation into the software configuration may be necessary.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

IMX8DX (Iris like) with a ICS 43434 audio (microphone on I2S) - device tree question.

Hi @HM_user !

Since you have a custom built image, it is hard to pinpoint what could be the issue on your side.

Please follow the general recommendation from @ToradexAI to check what could be wrong.

I just tested on my side following https://developer.toradex.com/linux-bsp/application-development/multimedia/audio-linux/#nau8822-record-from-microphone-mic1 and I couldn’t reproduce the issue on a Reference Multimedia Image from BSP 7.0.0-build.1.

For reference, here is my tdx-info:

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.6.32-7.0.0-g803472c67051 #1 SMP PREEMPT Fri Sep 27 07:55:54 UTC 2024
Kernel command line:      root=PARTUUID=5b277828-02 ro rootwait console=tty1 console=ttyS2,115200
Distro name:              NAME="TDX Wayland with XWayland"
Distro version:           VERSION_ID=7.0.0-build.1
Hostname:                 verdin-am62-15479352
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin AM62 WB on Verdin Development Board
Toradex version:          0076 V1.2A
Serial number:            15479352
Processor arch:           aarch64
------------------------------------------------------------

I am using a Verdin Development Board V1.1A.

Best regards,

Hi @henrique.tx ,

Thanks for your reply,
There was some jumper setting mismatch in development board.
Its working fine now.

Regards,
Teju S H

Hi @HM_user !

That’s great that you managed to solve it!

Please don’t forget to mark the solution for this thread :wink:

Best regards,