This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

mt9p031 error



I'm using the DVSDK 4 and I'm getting this error when I load the camera, I can load video and it works fine, when I boot the board it detects the sensor anyone know what this error means? or what can I do to fix it?

 

dm365-evm login: root                                                          
root@dm365-evm:~# /etc/init.d/loadmodule-rc restart                            
cmemk unregistered                                                             
irqk unregistered                                                              
CMEMK module: built on Mar 24 2011 at 19:34:57                                 
  Reference Linux version 2.6.32                                               
  File /sdk/build/DVSDK_4_02/4_02_00_06/arago-install/arago-tmp/work/dm365-evm-c
allocated heap buffer 0xc8000000 of size 0x4400000                             
heap fallback enabled - will try heap if pool buffer is not available          
CMEM Range Overlaps Kernel Physical - allowing overlap                         
CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83600000)            
cmemk initialized                                                              
IRQK module: built on Mar 24 2011 at 19:35:11                                  
  Reference Linux version 2.6.32                                               
  File /sdk/build/DVSDK_4_02/4_02_00_06/arago-install/arago-tmp/work/dm365-evm-c
irqk initialized                                                               
EDMAK module: built on Mar 24 2011 at 19:35:06                                 
  Reference Linux version 2.6.32                                               
  File /sdk/build/DVSDK_4_02/4_02_00_06/arago-install/arago-tmp/work/dm365-evm-c
root@dm365-evm:~# cat /dev/zero > /dev/fb2 2> /dev/null                        
root@dm365-evm:~# gst-launch -v v4l2src always-copy=FALSE ! 'video/x-raw-yuv, \
> format=(fourcc)NV12, framerate=(fraction)30/1, width=(int)1280, height=(int)72
0' \                                                                           
> ! tidisplaysink2 video-standard=720p display-output=component                
Setting pipeline to PAUSED ...                                                 
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124                        
davinci_previewer davinci_previewer.2: ipipe_set_preview_config                
vpfe-capture vpfe-capture: IPIPE Chained                                       
vpfe-capture vpfe-capture: Resizer present                                     
mt9p031 1-0048: control id -2147483648 not supported                           
vpfe-capture vpfe-capture: input information not found for the subdev          
mt9p031 1-0048: control id 9963776 not supported                               
mt9p031 1-0048: control id 9963777 not supported                               
mt9p031 1-0048: control id 9963778 not supported                               
mt9p031 1-0048: control id 9963779 not supported                               
mt9p031 1-0048: control id 9963780 not supported                               
mt9p031 1-0048: control id 9963781 not supported                               
mt9p031 1-0048: control id 9963782 not supported                               
mt9p031 1-0048: control id 9963783 not supported                               
mt9p031 1-0048: control id 9963784 not supported                               
mt9p031 1-0048: control id 9963785 not supported                               
mt9p031 1-0048: control id 9963786 not supported                               
mt9p031 1-0048: control id 9963787 not supported                               
mt9p031 1-0048: control id 9963788 not supported                               
mt9p031 1-0048: control id 9963789 not supported                               
mt9p031 1-0048: control id 9963790 not supported                               
mt9p031 1-0048: control id 9963791 not supported                               
mt9p031 1-0048: control id 9963792 not supported                               
mt9p031 1-0048: control id 9963794 not supported                               
mt9p031 1-0048: control id 9963798 not supported                               
mt9p031 1-0048: control id 9963799 not supported                               
mt9p031 1-0048: control id 9963800 not supported                               
mt9p031 1-0048: control id 9963801 not supported                               
mt9p031 1-0048: control id 9963802 not supported                               
mt9p031 1-0048: control id 9963803 not supported                               
mt9p031 1-0048: control id 9963804 not supported                               
mt9p031 1-0048: control id 9963805 not supported                               
mt9p031 1-0048: control id 9963806 not supported                               
mt9p031 1-0048: control id 9963807 not supported                               
mt9p031 1-0048: control id 9963808 not supported                               
mt9p031 1-0048: control id 9963809 not supported                               
vpfe-capture vpfe-capture: couldn't set pix format in ccdc                     
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                      
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperli4
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytes2
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 1                      
vpfe-capture vpfe-capture: adjusted width = 32, height = 2, bpp = 1, bytesperli6
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 1              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 1, bytes4
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                      
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperli4
vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2                      
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperli4
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytes2
vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytes2
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                      
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperli4
vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2                      
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperli4
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytes2
vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytes2
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                      
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperli4
vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2                      
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperli4
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytes2
vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytes2
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2                      
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperli4
vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2                      
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperli4
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytes2
vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2              
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytes2
ERROR: Pipeline doesn't want to pause.                                         
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to set.
Additional debug info:                                                         
v4l2_calls.c(975): gst_v4l2_set_input (): /GstPipeline:pipeline0/GstV4l2Src:v4l:
system error: Invalid argument                                                 
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to set.
Additional debug info:                                                         
v4l2_calls.c(739): gst_v4l2_set_norm (): /GstPipeline:pipeline0/GstV4l2Src:v4l2:
system error: Invalid argument                                                 
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negott
Additional debug info:                                                         
gstbasesrc.c(2755): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4:
Check your filtered caps, if any                                               
Setting pipeline to NULL ...                                                   
Freeing pipeline ...                                                           
root@dm365-evm:~#

  • anyone has any ideas?

  • the reply is blank

  • I guess there's something wrong with the system, I tried to post a couple of times, but it kept complaining the content is empty.

    Anyway, for your issue, first make sure you can run the encode demo properly before you try gstreamer. According to TI developer, you need to patch v4l2src to make camera input work with gstreamer.

  • Thanks Hongfend, any reference of what files I have to patch and what should I look for? I'm using the leopard board dm365 with the mt9p031 5MP camera module.

  • has anyone encounter this problem?

  • Hie Andre

     

    I have got the same problem I have speak with TI  engineers and it's still have no solution to solve this problem. You can't use gstreamer with LI-5M02 camera :(

     


    I have already succeed with gstreamer, dm368evm and an analog camera. But I can't use the provided camera (LI-5M02) with gstreamer. After search and discussion with TI engineer, it's seems impossible to use this camera with gstreamer.

     



    MY QUESTION: What way should I follow to develop my application ? Is there an other possibility to stream video over network who don't use Gstreamer ?


    Regards,


    Maxime Suire

  • Gstreamer works with MP4 over network, I'm been trying to figure out how to configure the camera so it would work with gstreamer, I email TI regarding this problem but they havent got back to me yet.

  • anyone know why I get this "vpfe-capture vpfe-capture" error, but if I select on the kernel capture SoC camera and compile the kernel with that selection all the "vpfe-capture vpfe-capture" errors dissapear and I get different errors.

  • was anyone able to get the leopard board DM365 and  the MT9P031 camera board working with the DVSDK 4?

  • Is the patch for this available?

    I am able to run the encodedecode demo program with the LI-5M02 camera just fine, and I am able to run gstreamer loop-back pipelines using an NTSC camera just fine.  However, I am unable to run a loopback pipeline using the LI-5M02 camera.  The pipeline I a trying to use is:

    gst-launch -v v4l2src always-copy=FALSE input-src=Camera num-buffers=400 ! video/x-raw-bayer, bpp=1, width=1280, height=720, bytesperline=1280 ! bayer2rgb ! ffmpegcolorspace ! tidisplaysink2 video-standard=auto display-output=component

    I get the following error:

    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
    Additional debug info:
    gstbasesrc.c(2755): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Check your filtered caps, if any

    Any word on the patch that is mentioned?

    Doug

  • With a hack I got it working.

    First of all, it turns out that I don't want video/x-raw-bayer caps, but this pipeline:

    gst-launch -v v4l2src always-copy=FALSE input-src=Camera num-buffers=800 ! video/x-raw-yuv, format=\(fourcc\)NV12, width=1280, height=720 ! queue ! tidisplaysink2 video-standard=720p display-output=component

    The hack, however, is in the mt9p031.c file.  In the mt9p031_querystd function, change:

     *id = V4L2_STD_MT9P031_STD_ALL;

    to:

    *id = V4L2_STD_720P_60;

    This hack tells gstreamer that the detected standard is 720P_60, overriding the "all" value returned.

    This is not the "correct" solution, but it's a place to start.

  • Hi Doug,

     

    you said, you got the encodedecode demo working with the li-5m02.

    I'm trying to get the encode demo working on my dm365evm with the li-5m02,

    but I always get the error:

    Encode demo started.                                                           
    CMEMK Error: Failed to find a pool which fits 28672                            
    CMEM Error: getPCMEMK Error: get_phys: Unable to find phys addr for 0x00000000 
    ool: Failed to gCMEMK Error: get_phys: get_user_pages() failed: -14            
    et a pool fittinCMEMK Error: GETPHYS: Failed to convert virtual 0x0 to physical.
    g a size 28672                                                                 
    CMEMK Error: get_phys: Unable to find phys addr for 0x00000000                 
    CMEM Error: getPCMEMK Error: get_phys: get_user_pages() failed: -14            
    hys: Failed to gCMEMK Error: FREE: Failed to convert virtual 0x0 to physical   
    et physical address of 0                                                       
    CMEM Error: free: failed to free 0                                             
    Error: Failed to create attribute window device

     

    The capture_prev_rsz_onthe_fly_bayer app works with the li-5m02 and the encode demo works with the component input.

    Can you give me a hint, what I'm doing wrong and how you got the demo working?

     

    BR,

    Simon

  • Simon your error is here

    CMEMK Error: Failed to find a pool which fits 28672   

    you can find the solution here:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/p/116107/412296.aspx

    you need to increase the pool size


  • Hi Andre,

    thank you for your quick response.

    I added an additional pool with the size the error complains about (1x28672) in my "loadmodules_hd.sh" (also tried "loadmodules.sh"),

    but there is still the same problem, that it can't find a pool which fits 28672.



    I don't know if it's a problem, that I'm using the DM365, as the encode demo says:

    Video inputs available: ... 4 Imager/Camera - for DM368

    I'm trying to use Input 4, as I try to encode videos from my Li-5M02-camera.



    Would be nice, if anyone could help me.



    BR,

    Simon

  • Could anyone tell me if you are able to use MT9P031 with gstreamer using DMA-COPY=true?  When I try to do it I get a warning

    0:00:02.001614220  2215    0xfa258 WARN          tidisplaysink2 gsttidisplaysink2.c:340:xcopy:<tidisplaysink20> DMA copy is not possible on non contiguous buffer, defaulting to slow copy

    Here it is gstreamer command

    gst-launch --gst-debug=2 -v v4l2src always-copy=true input-src
    =Camera ! video/x-raw-yuv, format=\(fourcc\)NV12, width=1280, height=720 ! queue
     max-size-buffers=3 ! dmaiperf ! tidisplaysink2 video-standard=720p display-out
    put=component

    When I use mmap-buffer=true and always-copy=true I can achieve about 24fps with CPU usage over 90%. I don't know where is mistake. dma-copy=true works well when i play some mp4 file.

    Is there any solution for such problem?

     

  • Simon,

    In my loadmodules.sh i have:

     modprobe cmemk phys_start=0x85800000 phys_end=0x88000000 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672 useHeapIfPoolUnavailable=1

    and it works fine

    You need to change phys_start and phys_end to match it to your memory size

     

  • Hi Karol,

     

    I finally got time to test your suggestion, but it unfortunately doesn't work for me.

    I tried to play a little bit with module insertion of cmemk and finally I tried:

    insmod cmemk.ko phys_start=0x83C08000 phys_end=0x88000000 allowOverlap=1 phys_start_1=0x83C01000 phys_end_1=0x83C08000 pools_1=1x28672 useHeapIfPoolUnavailable=1

    but if I try to start any of the demos, I get the error:

    :/~ encode -I 4 -y 3 -v test.mpeg4  
    Encode demo started.
    Error: Failed to create attribute window device

     

    Any idea, where my failure is?

     

    BR,

    Simon

  •  

    You should run a debug to v4l2 and to DMAI module using

    DMAI_DEBUG=2 encode...

    also you can turn on debug on all dm3x modules using

    echo 1 > /sys/module/../parameters/debug

    It would much easier to detect problem

     

    Karol

  •  

    I tried the DMAI-Debug and the output is:

    root@dm365:/opt/dvsdk/dm365# DMAI_DEBUG=2 encode -I 4 -y 3 -v test.mpeg4
    Encode demo started.
    @0x000634c2:[T:0x4001f070] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note
    that calling CERuntime_init after this point may cause unexpected change to DMAI
    tracing behavior.
    @0x0007bdc3:[T:0x4001f070] ti.sdo.dmai - [Display] Failed to open fb device /dev
    /fb2 (No such file or directory)
    Error: Failed to create attribute window device

     

    After this, I tried the capture_prev_rsz_onthe_fly_bayer_mew, which worked for me before, but now I get there an error, too,

    although I tried it with my original loadmodules_hd.sh:

     

    root@dm365:/opt/dvsdk/dm365# ./loadmodules_hd.sh
    cmemk unregistered
    irqk unregistered
    CMEMK module: built on Nov 4 2011 at 12:54:40
    Reference Linux version 2.6.32
    File /home/simmal/development/ti-dvsdk_dm365-evm_4_01_00_09/linuxutils_2_25_05
    _11/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
    allocated heap buffer 0xc8000000 of size 0x4400000
    cmemk initialized
    IRQK module: built on Nov 4 2011 at 12:54:42
    Reference Linux version 2.6.32
    File /home/simmal/development/ti-dvsdk_dm365-evm_4_01_00_09/linuxutils_2_25_05
    _11/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
    irqk initialized
    EDMAK module: built on Nov 4 2011 at 12:54:44
    Reference Linux version 2.6.32
    File /home/simmal/development/ti-dvsdk_dm365-evm_4_01_00_09/linuxutils_2_25_05
    _11/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
    root@simmals_board:/opt/dvsdk/dm365# ./capture_prev_rsz_onthe_fly_bayer_mew -i1
    -m4 -h60
    input_std_paramsCMEMK Error: ALLOC: invalid pool (0) passed.
    : name = V4L2_STD_720P_30
    input_std_params: output size = 1280 * 720
    calling cmem utilities for allocating frame buffers
    CMEM Error: allocPool: ioctl CMEM_IOCALLOC failed from pool 0: -1
    Failed to allocate cmem pool
    Unable to Allocate user buffers

     

    I didn't change anything, so I'm really confused, why I get now an error here.

  • Have you setup your bootargs?

    If you didn't make any changes besides cmem module configuration, it should not make any other change to system structure. Have you rebuild your kernel or make any changes inside it? You are using framebuffer, maybe try with v4l2 /dev/video. I don't know your board configuration so I can't tell more

     

    Karol

  • As bootargs, I use the recommened ones from TI:

    bootargs=console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.168.178.40:/home/simmal/development/nfs,nolock mem=60M video=davincifb:vid0=OFF:vid1=OFF:osd0=1920x1080x4,32400K dm365_imp.oper_mode=0 vpfe_capture.interface=1 vpfe_capture.bufsize=4147200 davinci_enc_mngr.ch0_mode=1080I-30

    I changed my Kernel a few weeks ago, but I used the camera after this kernel-upgrade successfully. I didn't make any further changes of the kernel or inside the kernel.

    Do you mean the hardware config of my board? At the moment I'm still using the original DM365-EVM.

    Is there a guide or sth like that, how I can change from framebuffer to v4l2, which you can recommend to me? I'm quite new to this topic, as you can guess ;)

     

  • To enable video you have to change line

    video=davincifb:vid0=OFF:vid1=OFF:osd0=1920x1080x4

    to

    video=davincifb:vid0=0,4050K:vid1=OFF:osd0=1920x1080x4,32400K davinci_display.cont2_bufsize=4147200

    that is my commandline works well although I got board based on DM368 designed by our company  not DVEVM

    In /dev/ you should get /dev/video2

    All memory settings for output you can find in /sys/module/davinci_display/parameters

    You got mt9p031 camera? Was it working well with gstreamer using DMA? I still got problem with DMA and this cam with gstreamer, and I cannot check if it is runing correct on DVEVM.

  • Thank you for this hint. I hope I can try it soon, maybe tomorrow. For today I have a lot of other work, which is waiting (next week are midterm exams).

    I never worked with gstreamer, yet. At the moment, I just try to run the TI-Demos with the camera. When I have this working, I probably will try gstreamer.

    I can't figure out gstreamer's advantages at the moment, as I'm not deeply involved in this topic, yet.

  • Hi Karol,

    I tried your proposed bootargs, but that did't change anything, the camera is still not working. Maybe I'll try gstreamer, but I'm not sure if this is usefull, before I didn't get the demos running.

    Are your using the original DVSDK? Which version?

    BR,

    Simon