Arecord failed

we arecord failed.
scala@localhost:~$ arecord -Dplughw:1,0 -q -N -f S16_LE -r 44100 -d 10 -t wav /home/scala/1111.wav
[ 4940.270392] rt5640 2-001c: Unsupported clock setting 44100 for DAI 0
[ 4940.276763] rt5640 2-001c: ASoC: can’t set rt5640-aif1 hw params: -22
[ 4940.283966] tegra-asoc: sound: ASoC: PRE_PMU: x AIF1 Capture-I2S4 DAP Receive event failed: -22

Hello!

Per the rt5640 driver the error comes from here. Looking at the code that it cannot find a valid divider based upon the current sysclk setting for the codec.

The first question is who is the I2S master, is it Jetson or the codec? The second question is what clock is driving the codec MCLK?

Regards,
Jon

How to check I2S master, I think it should be Jetson, our hardware pins used DAP4 pins.
And MCLK used AUD_MCLK.

Hello!

Check the device-tree dai-link node for the appropriate I2S interface. By default, the dai-links have ’ bitclock-slave’ and ‘frame-slave’ indicating that the codec is the slave and Jetson is the master. If this has not been changed then Jetson is the master.

If that is the case, then you need to ensure that you modify the tegra audio machine driver to configure the codec sysclk appropriate during playback/record. If you refer to the audio documentation you will see a chapter called ’ Update the Machine Driver to Support a Custom Audio Card’ that describes how to add an init function to program the sysclk for the codec.

Regards,
Jon

Thank you, we had found our problem ,the case could close!

Hello!

Great. Thanks for letting us know.

Jon