R36.4.4 audio driver error

Good to know it worked. It would be great if you could update how the issue is resolved.

As such not aware of.

A macro definition named CONFIG_P2021_SOUND has been configured with a driver. However, there is currently an issue with recording. I’m not sure why, but suddenly it’s not recording anymore, and every time I try, an error is reported:
hzx@hzx-desktop:~/test$ arecord -D hw:APE,0 -r 48000 -c 2 -f s16_le r.wav
xcb_connection_has_error() returned true
Recording WAVE ‘r.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:2221: read error: Input/output error

-rw-r–r-- 1 hzx hzx 44 3月 6 09:52 r.wav

Could you please take a look? Thank you

The first time I played the audio, there was a snow background sound, which should be due to an incorrect mclk. When playing a mono file, the mclk changed to 24M, and later when playing stereo files, it became normal, with the mclk also being 24M. Where can I set the mclk to be fixed at 24M

The Input/output error during arecord usually indicates a PCM read timeout, meaning the CPU is waiting for a clock or data signal that isn’t arriving. Since this “suddenly” stopped working, please check the following:

  1. Hardware Connections: Verify the connections. A loose ground or data wire is a common cause for sudden I/O failures.

  2. Clock Signaling: The error often occurs if the Bit Clock (BCLK) or LRCK is missing. If possible, use an oscilloscope to probe these pins while running arecord to see if they are toggling.

  3. Codec Power: Ensure the codec hasn’t entered a power-down state. If it uses a Reset/Enable GPIO, verify that the pin hasn’t toggled. I would suggest to try with different codec.

Define below property in sound node and delete mclk-fs.

sound {
......
    
    assigned-clock-rates = <clock_value>;
};

The broadcast had snow background noise, which was resolved by setting a fixed clock. Thank you

During the recording process, neither BCLK nor LRCK was generated

The recording was working fine before the adjustment, but it stopped working afterwards. Is there something that hasn’t been configured correctly? Currently, I2S doesn’t have LRCLK and BCLK, and 8316 hasn’t started recording either

Could it be that the audio recording routing is incorrect

When recording, es8316-playback-capture: Off

root@hzx-desktop:/sys/kernel/debug/asoc/NVIDIA Jetson Orin Nano APE/dapm# cat es8316-playback-capture
es8316-playback-capture: Off in 0 out 0
out “static” “I2S2 DAP-Playback”
in “static” “ES Capture”

Could you please take a look? Thank you

In this place, it should normally be 1. I reinstalled the system and it became normal again. I don’t know what the situation was or what modifications were made at that time that caused it to become 0

root@hzx-desktop:/home/hzx# cat /sys/kernel/debug/tracing/trace_pipe | grep *

alsa-source-teg-1496 [001] … 1692.911916: snd_soc_dapm_path: *ADMAIF1 XBAR-Capture → (direct) → tegra-dlink-20-capture
alsa-source-teg-1496 [001] … 1692.911920: snd_soc_dapm_path: *ADMAIF1 XBAR-Capture → (direct) → ADMAIF1 Capture

Could you please take a look? There is no routing after ADMAIF1 Capture

The problem has been solved. Switch the input source to Line-in/Mic (to resolve the Differential Mux configuration). Thank you very much for your continuous support!