LicheePi Zero - ION_ALLOC_ERROR after increasing CMA_AREAS and CMA_SIZE_MBYTES
Hey,
First, thanks for uploading the driver and library. I managed to compile both for the Lichee Pi Zero (V3S) following your instructions, but I am still getting ION_IOC_ALLOC even after increasing CMA_AREAS (7) and CMA_SIZE_MBYTES (32). I am using Kernel 5.3 at the moment because I could not get the USB to work on 5.4 yet.
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : omx_venc <openVencDriver:3221>:AVC 4 byte interleave nalu Disable.
debug : cedarc <VideoEncInit:195>: (f:VideoEncInit, l:195)
debug : cedarc <VideoEncInit:210>: (f:VideoEncInit, l:210)
error : ionAlloc <ion_alloc_palloc:335>:ION_IOC_ALLOC error
I am using a camera attached to the Lichee via USB, and run ffmpeg as bellow:
ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video0 -codec:v h264_omx -b:v 2048k webcam.mkv
I thought I could be genuinely running out of memory, but this is what I get when I run free -k
# free -k
total used free shared buff/cache available
Mem: 53812 6216 41108 336 6488 44008
Swap: 0 0 0
Am I missing something? Or could you share your Buildroot and Linux defconfigs so I can check if I missed something?
Appreciate any help...
I encountered a very similar issue https://github.com/aodzip/cedar/issues/4 but on a F1C100S instead. Not matter how much i allocate memory to CMA, (i can only go as far as 16MB on my Soc), it just seemingly fails. I am also using ffmpeg 4.3 with omx enabled btw.
The only difference is that i'm using kernel 4.14.0 rather than 5.3/5.4.
Maybe it works only on an older ffmpeg build ? I'm not sure as i also tried the CedarX Player and encountered a similar issue too. I thought it would be a memory allocation issue but seeing that you tried it on the v3s and also encounter the same issue (despite you having 64MB of RAM).
I made some changes to libcedarc that displays how much memory it is trying to allocate. Have a look:
https://github.com/matheusrfdesign/libcedarc/commit/f17465e55541e65618c5d0f8b429b3298ff339f2
It might shed some light on the issue. On the V3S, it is only trying to allocate 8MB and it still fails...
I made some changes to libcedarc that displays how much memory it is trying to allocate. Have a look:
https://github.com/matheusrfdesign/libcedarc/commit/f17465e55541e65618c5d0f8b429b3298ff339f2
It might shed some light on the issue. On the V3S, it is only trying to allocate 8MB and it still fails...
Hello, Did you not managed to solve ion allocation failure? Can this article help wtih issue? https://blog.csdn.net/tugouxp/article/details/116714552
I encountered a very similar issue #4 but on a F1C100S instead. Not matter how much i allocate memory to CMA, (i can only go as far as 16MB on my Soc), it just seemingly fails. I am also using ffmpeg 4.3 with omx enabled btw.
The only difference is that i'm using kernel 4.14.0 rather than 5.3/5.4.
Maybe it works only on an older ffmpeg build ? I'm not sure as i also tried the CedarX Player and encountered a similar issue too. I thought it would be a memory allocation issue but seeing that you tried it on the v3s and also encounter the same issue (despite you having 64MB of RAM).
did you get the F1C00S to play H264 correctly (26fps or better)?
I encountered a very similar issue #4 but on a F1C100S instead. Not matter how much i allocate memory to CMA, (i can only go as far as 16MB on my Soc), it just seemingly fails. I am also using ffmpeg 4.3 with omx enabled btw. The only difference is that i'm using kernel 4.14.0 rather than 5.3/5.4. Maybe it works only on an older ffmpeg build ? I'm not sure as i also tried the CedarX Player and encountered a similar issue too. I thought it would be a memory allocation issue but seeing that you tried it on the v3s and also encounter the same issue (despite you having 64MB of RAM).
did you get the F1C00S to play H264 correctly (26fps or better)?
Nope, could not even get it to work at all. I really hope the opensource decoder supports the F1C100S because clearly this isn't going to work.
but, some got it working, the only problem is that something is suboptimal somewhere because the framerate is well below the 30fps it should be, but at least the whole pipeline works.
https://whycan.com/t_4219.html https://whycan.com/p_58245.html
i have a secret dream to use the VE (video engine) and maybe the whole CEDAR api on bare metal or RTOS, but it is quite a task.
also, have you ever tried TINA 3.5? as far as i kow everything is fully implemented on this distro, and mplayer is very smooth with mp4 and hardware decoding, i wish i could try it too. https://whycan.com/t_6113.html
Hey,
First, thanks for uploading the driver and library. I managed to compile both for the Lichee Pi Zero (V3S) following your instructions, but I am still getting ION_IOC_ALLOC even after increasing CMA_AREAS (7) and CMA_SIZE_MBYTES (32). I am using Kernel 5.3 at the moment because I could not get the USB to work on 5.4 yet.
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS *** debug : omx_venc <openVencDriver:3221>:AVC 4 byte interleave nalu Disable. debug : cedarc <VideoEncInit:195>: (f:VideoEncInit, l:195) debug : cedarc <VideoEncInit:210>: (f:VideoEncInit, l:210) error : ionAlloc <ion_alloc_palloc:335>:ION_IOC_ALLOC errorI am using a camera attached to the Lichee via USB, and run ffmpeg as bellow:
ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video0 -codec:v h264_omx -b:v 2048k webcam.mkvI thought I could be genuinely running out of memory, but this is what I get when I run
free -k# free -k total used free shared buff/cache available Mem: 53812 6216 41108 336 6488 44008 Swap: 0 0 0Am I missing something? Or could you share your Buildroot and Linux defconfigs so I can check if I missed something?
Appreciate any help...
Can you fix this problem? I also get this error
debug : cedarc <VideoEncInit:195>: (f:VideoEncInit, l:195) debug : cedarc <VideoEncInit:210>: (f:VideoEncInit, l:210) error : ionAlloc <ion_alloc_palloc:335>:ION_IOC_ALLOC error error : cedarc <BitStreamCreate:45>: pSbmBuf == NULL. error : cedarc <H264InitMemory:904>: h264Context->pBSMamager == NULL error : cedarc <BitStreamFreeBufferSize:180>: BitStreamManager == NULL. error : cedarc <BitStreamFreeBufferSize