Hello,
Please share your dmesg:
dmesg | grep -i -E "xrun|overrun|dma|fifo|sdma|sai"
With that error log the issue could be caused by an overrun, please try to increase period and buffer size, for example:
arecord -D hw:0,0 -f S32_LE -r 768000 -c 2 --buffer-size=65536 --period-size=8192 -d 5 test.wav
Best regards.