hi JorgeCas:
thanks for your reply.
the same error when increase period and buffer size.
------------------------------------
root@mx8mm:/tmp# arecord -v -D hw:0,0 -f S16_LE -r 768000 -c 2 -d 1 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 768000 Hz, Stereo
Hardware PCM card 0 'pcmdev-audio' device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 768000
exact rate : 768000 (768000/1)
msbits : 16
buffer_size : 131064
period_size : 16383
period_time : 21332
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 16383
period_event : 0
start_threshold : 1
stop_threshold : 131064
silence_threshold: 0
silence_size : 0
boundary : 9222809086901354496
appl_ptr : 0
hw_ptr : 0
root@mx8mm:/tmp# ls test.wav -la
-rw-r--r-- 1 root root 3072044 Jul 22 22:09 test.wav
root@mx8mm:/tmp# arecord -D hw:0,0 -f S32_LE -r 768000 -c 2 --buffer-size=65536 --period-size=8192 -d 5 test.wav
Recording WAVE 'test.wav' : Signed 32 bit Little Endian, Rate 768000 Hz, Stereo
arecord: pcm_read:2221: read error: Input/output error
root@mx8mm:/tmp# dmesg | grep -i -E "xrun|overrun|dma|fifo|sdma|sai"
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000b8400000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vdevbuffer@b8400000, compatible id shared-dma-pool
[ 0.000000] DMA [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Policy zone: DMA
[ 0.043871] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[ 0.044176] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.044364] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.105243] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.195002] imx-sdma 302c0000.dma-controller: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2
[ 0.195018] imx-sdma 302c0000.dma-controller: Falling back to sysfs fallback for: imx/sdma/sdma-imx7d.bin
[ 0.199761] mxs-dma 33000000.dma-controller: initialized
[ 1.996379] mmc2: SDHCI controller on 30b60000.mmc [30b60000.mmc] using ADMA
[ 2.786360] mmc1: SDHCI controller on 30b50000.mmc [30b50000.mmc] using ADMA
[ 8.812860] imx-sdma 302c0000.dma-controller: firmware found.
[ 8.818748] imx-sdma 30bd0000.dma-controller: firmware found.
[ 8.825901] imx-sdma 30bd0000.dma-controller: loaded firmware 4.6
[ 91.326700] [857] soc_hw_sanity_check:775: 30010000.sai-pcmdevice-codec: ASoC: pcmdevice-codec <-> 30010000.sai info:
[ 91.326722] [857] soc_hw_sanity_check:777: 30010000.sai-pcmdevice-codec: ASoC: rate mask 0x154c0
[ 91.326728] [857] soc_hw_sanity_check:778: 30010000.sai-pcmdevice-codec: ASoC: ch min 2 max 8
[ 91.326734] [857] soc_hw_sanity_check:780: 30010000.sai-pcmdevice-codec: ASoC: rate min 44100 max 768000
[ 91.342776] [857] fsl_sai_set_bclk:460: fsl-sai 30010000.sai: ratio 2 for freq 24576000Hz based on clock 49152000Hz
[ 91.342784] [857] fsl_sai_set_bclk:481: fsl-sai 30010000.sai: best fit: clock id=1, div=2, deviation =0
[ 91.343315] [857] dapm_update_dai_unlocked:2698: fsl-sai 30010000.sai: Update DAI routes for 30010000.sai capture
[ 113.965788] [861] soc_hw_sanity_check:775: 30010000.sai-pcmdevice-codec: ASoC: pcmdevice-codec <-> 30010000.sai info:
[ 113.965809] [861] soc_hw_sanity_check:777: 30010000.sai-pcmdevice-codec: ASoC: rate mask 0x154c0
[ 113.965816] [861] soc_hw_sanity_check:778: 30010000.sai-pcmdevice-codec: ASoC: ch min 2 max 8
[ 113.965822] [861] soc_hw_sanity_check:780: 30010000.sai-pcmdevice-codec: ASoC: rate min 44100 max 768000
[ 113.977610] [861] fsl_sai_set_bclk:460: fsl-sai 30010000.sai: ratio 1 for freq 49152000Hz based on clock 49152000Hz
[ 113.977618] [861] fsl_sai_set_bclk:481: fsl-sai 30010000.sai: best fit: clock id=1, div=1, deviation =0
[ 113.978149] [861] dapm_update_dai_unlocked:2698: fsl-sai 30010000.sai: Update DAI routes for 30010000.sai capture
[ 124.127055] [861] wait_for_avail:1936: asoc-simple-card sound-pcmdev: capture write error (DMA or IRQ trouble?)
root@mx8mm:/tmp# ls test.wav -la
-rw-r--r-- 1 root root 44 Jul 22 22:09 test.wav
root@mx8mm:/tmp#