Hi,
I am working with i.mx8mm evk and one dsp is interfaced to it. Yocto distribution 4.19.35 imx-warrior.
SAI1 interface connected to serial port of DSP for I2S playback and
SAI5 interface connected to another serial port of DSP for I2S capture.
when i tried to do pass-through test (aplay, followed by arecord alsa utils)
hw_params for playback and capture: channels : 8, format : S32_LE and sampling rate : 48000
The capture starts and i get the paging request error, please find the log below:
root@imx8mmevk:~# ./play32.sh
root@imx8mmevk:~# Playing WAVE 'ref8_32bit.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Channels 8
root@imx8mmevk:~# ./cap.sh
[ 26.962635] MIC BE: adsp_pcm_be_startup [be_mic_rec]
[ 26.977791] MIC_FE: adsp_pcm_fe_startup [fe_mic_rec]
Recording WAVE 'mic.wav' : [ 26.995513] MIC BE: adsp_pcm_be_hw_params [be_mic_rec] rate 48000 ch 8 bits 32 period 160-4
Signed 32 bit Little Endian, Rate[ 27.007136] MIC BE: adsp_pcm_be_hw_params [be_mic_rec] mclk 24576000 lrck_width 32
48000 Hz, Channels 8
[ 27.020052] MIC BE: adsp_pcm_be_hw_params [be_mic_rec] lrck_inv 0 bck_inv 0
[ 27.038681] MIC_FE: adsp_pcm_fe_hw_params [fe_mic_rec] rate 48000 ch 8 bits 32 period 160-4
[ 27.154868] MIC_FE: buf : 0xf3b7cf0 , hwbuf : 0x1a9c5000 , copy_bytes : 163840
[ 27.169518] Unable to handle kernel paging request at virtual address ffff00001a9cd000
[ 27.177450] Mem abort info:
[ 27.180242] ESR = 0x96000007
[ 27.183318] Exception class = DABT (current EL), IL = 32 bits
[ 27.189254] SET = 0, FnV = 0
[ 27.192307] EA = 0, S1PTW = 0
[ 27.195466] Data abort info:
[ 27.198362] ISV = 0, ISS = 0x00000007
[ 27.202215] CM = 0, WnR = 0
[ 27.205201] swapper pgtable: 4k pages, 48-bit VAs, pgdp = 00000000a64ad819
[ 27.212099] [ffff00001a9cd000] pgd=00000000bdffe803, pud=00000000bdffd803, pmd=00000000b02e7003, pte=0000000000000000
[ 27.222739] Internal error: Oops: 96000007 [#1] PREEMPT SMP
[ 27.228311] Modules linked in: 8021q garp stp mrp qca9377(O) crc32_ce crct10dif_ce galcore(O)
[ 27.236847] Process arecord (pid: 4276, stack limit = 0x00000000444534a6)
[ 27.243635] CPU: 2 PID: 4276 Comm: arecord Tainted: G O 4.19.35-1.1.0+g0f9917c #1
[ 27.252416] Hardware name: FSL i.MX8MM EVK board (DT)
[ 27.257465] pstate: 20000005 (nzCv daif -PAN -UAO)
[ 27.262260] pc : __memcpy_fromio+0x48/0x88
[ 27.266357] lr : copy_to_user_fromio+0xf4/0x108
[ 27.270884] sp : ffff00001a98ba80
[ 27.274196] x29: ffff00001a98ba80 x28: 0000000000000000
[ 27.279507] x27: 0000000000000000 x26: ffff8000752c8880
[ 27.284817] x25: 0000000000000000 x24: ffff80007542d000
[ 27.290128] x23: ffff0000096086c8 x22: ffff00001a9cd000
[ 27.295439] x21: 000000000f3bfcf0 x20: 0000000000000010
[ 27.300749] x19: 0000000000000010 x18: 0000000000000010
[ 27.306059] x17: 0000000000000000 x16: 0000000000000000
[ 27.311370] x15: ffffffffffffffff x14: ffff0000096086c8
[ 27.316680] x13: ffff0000897d0437 x12: ffff0000097d043f
[ 27.316684] x11: ffff000009620000 x10: ffff00001a98b7f0
[ 27.316688] x9 : 00000000ffffffd0 x8 : ffff000008663c28
[ 27.316692] x7 : 5f707364615f3037 x6 : 0000000000000010
[ 27.316696] x5 : 000000000f3bfcf0 x4 : ffff00001a9cd000
[ 27.316700] x3 : ffff00001a98bad8 x2 : 0000000000000010
[ 27.357669] x1 : ffff00001a9cd000 x0 : ffff00001a98bac8
[ 27.362981] Call trace:
[ 27.365428] __memcpy_fromio+0x48/0x88
imx8mmevk kernel: [ 27.222739] Internal error: Oops: 96000007 [#1] PREEMPT SMP
Message from syslogd@imx8mmevk at Tue May 18 07:40:03 2021 ...
imx8mmevk kernel: [ 27.236847] Process arecord (pid: 4276, stack limit = 0x00000000444534a6)
[ 27.369178] adsp_pcm_pcm_copy+0x104/0x200
[ 27.369183] soc_rtdcom_copy_user+0x3c/0x60
[ 27.369189] interleaved_copy+0x54/0x60
[ 27.369197] __snd_pcm_lib_xfer+0x414/0x6c8
[ 27.422797] snd_pcm_common_ioctl+0x570/0xec8
[ 27.427152] snd_pcm_ioctl+0x28/0x40
[ 27.430726] do_vfs_ioctl+0xb8/0x890
[ 27.434299] ksys_ioctl+0x78/0xa8
[ 27.437612] __arm64_sys_ioctl+0x1c/0x28
[ 27.441535] el0_svc_common+0x84/0xf0
[ 27.445195] el0_svc_handler+0x2c/0x80
[ 27.448942] el0_svc+0x8/0xc
[ 27.451823] Code: 927df0c6 910020c6 8b060003 d503201f (f9400085)
[ 27.457916] ---[ end trace 843b67e7e18b29be ]---
Message from syslogd@imx8mmevk at Tue May 18 07:40:03 2021 ...
imx8mmevk kernel: [ 27.451823] Code: 927df0c6 910020c6 8b060003 d503201f (f9400085)
./cap.sh: line 1: 4276 Segmentation fault arecord -D hw:3,0 -f S32_LE -c 8 -r 48000 mic.wav
root@imx8mmevk:~#
The page request is failing exactly after 32768 (0x8000) bytes copy. The hwbuf base addr : 0x1a9c5000
paging request failure at ffff00001a9cd000, 0x1a9cd000 - 0x1a9c5000 = 0x8000.
Since the HW is EVK, I am ruling out the DDR issue.
Could you please tell me where i could look at hwbuf allocation for the programmed hardware parameters.
Any pointers and suggestions will definitely help in me in resolving this issue.
Thank you, Sreedhar
Solved! Go to Solution.
Hi Zhiming Liu,
The number of bytes to copy/read is more than the dma buffer (hwbuff) size.
So I am facing the above issue. Now I have controlled the number of bytes to read based on the allocated hwbuf size, and the above issue is resolved.
Thank you, Sreedhar
It seem when you use that capture command ,the pointer is beyond the max hardware address. can you attach your test command?
Hi Zhiming Liu,
Please find the test cmd:
play32.sh : aplay -D hw:2,0 ref8_32bit.wav
cap.sh : arecord -D hw:3,0 -f S32_LE -c 8 -r 48000 mic.wav
Thank you, Sreedhar
Hi Zhiming Liu,
The number of bytes to copy/read is more than the dma buffer (hwbuff) size.
So I am facing the above issue. Now I have controlled the number of bytes to read based on the allocated hwbuf size, and the above issue is resolved.
Thank you, Sreedhar