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.

Video capture issue

I have a custom board with a TFT on the VID1 pins (not VID0 as on the EVM). I can use the display fine by specifying the output to 800x480-60 and 1:hdmi for the nodes. 

I also have a FPGA sending me 720p on the VIN0 pins, however, when I try to capture it, I never get any frames.

I had to 'hack' a fake v2l_subdev driver, as the current framework forces you to use an i2c video driver, which I don't have/need.

When I use saLoopbackScale, the initialisation appears to go fine, but the display just shows a frame of single color, and it never actually captures anything (it stops, and has to be interrupted with control-c). I tried to use mplayer too, but that actually hangs the board completely.

The pin mux for the VIN0 are done properly...

How can I debug that problem? I do appear to have CLK/HSYNC/VSYNC coming in just fine... just no capture.


DM814X prcm_config_app version: 2.0.0.1
Doing PRCM settings...
PRCM for IVHD0 is in Progress, Please wait.....
BW Phy Addr : 0x48180600 Data : 0x00000001
AW Phy Addr : 0x48180600 Data : 0x00000002
Phy Addr : 0x48180c04 Data : 0x00000037
BW Phy Addr : 0x48180620 Data : 0x00070000
AW Phy Addr : 0x48180620 Data : 0x00070002
BW Phy Addr : 0x48180624 Data : 0x00030000
AW Phy Addr : 0x48180624 Data : 0x00010002
Phy Addr : 0x48180600 Data : 0x00000102
BW Phy Addr : 0x48180c10 Data : 0x00000007
AW Phy Addr : 0x48180c10 Data : 0x00000003
Phy Addr : 0x48180c14 Data : 0x00000004
BW Phy Addr : 0x58088000 Data : 0xbb366941
AW Phy Addr : 0x58088000 Data : 0xeafffffe
BW Phy Addr : 0x58098000 Data : 0xb00350e0
AW Phy Addr : 0x58098000 Data : 0xeafffffe
BW Phy Addr : 0x48180c10 Data : 0x00000003
AW Phy Addr : 0x48180c10 Data : 0x00000000
Phy Addr : 0x48180c14 Data : 0x00000007
PRCM for IVHD0 is Done Successfully
PRCM Initialization completed
SysLink version : 2.20.02.20
SysLink module created on Date:Mar 22 2013 Time:15:43:22
FIRMWARE: I2cInit will be done by M3
FIRMWARE: Memory map bin file not passed
Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
===Mandatory arguments===
<Processor Id> 0: DSP, 1: Video-M3, 2: Vpss-M3
<Location of Firmware> firmware binary file
<start|stop> to start/stop the firmware
===Optional arguments===
-mmap input memory map bin file name
-i2c 0: i2c init not done by M3, 1(default): i2c init done by M3
FIRMWARE: isI2cInitRequiredOnM3: 1
FIRMWARE: Default memory configuration is used
Firmware Loader debugging not configured
Default FL_DEBUG: warning
Allowed FL_DEBUG levels: error, warning, info, debug, log
MemCfg: DCMM (Dynamically Configurable Memory Map) Version : 2.1.2.1
FIRMWARE: 1 start Successful
Loading HDVPSS Firmware
FIRMWARE: I2cInit will be done by M3
FIRMWARE: Memory map bin file not passed
Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
===Mandatory arguments===
<Processor Id> 0: DSP, 1: Video-M3, 2: Vpss-M3
<Location of Firmware> firmware binary file
<start|stop> to start/stop the firmware
===Optional arguments===
-mmap input memory map bin file name
-i2c 0: i2c init not done by M3, 1(default): i2c init done by M3
FIRMWARE: isI2cInitRequiredOnM3: 1
FIRMWARE: Default memory configuration is used
Firmware Loader debugging not configured
Default FL_DEBUG: warning
Allowed FL_DEBUG levels: error, warning, info, debug, log
MemCfg: DCMM (Dynamically Configurable Memory Map) Version : 2.1.2.1
FIRMWARE: 2 start Successful
VPSS_FVID2: M3 firmware version 0x1000145 is newer,driver may not work properly.
VPSS_DCTRL: venc mode(800x480-60) is not supported.
Console: switching to colour frame buffer device 240x67
Configuring fb0 to LCD
/ # modprobe ti81xxvo
/ # modprobe ti81xxvin
***: Registering non-i2c v2l subdev
***: vps_fpga_select_video_decoder 0
***: vps_fpga_set_mode 13
ti81xxvin ti81xxvin: registered sub device FPGA In
ti81xxvin ti81xxvin: TI81xx HDVPSS Capture driver initialized
/ # echo 0 >/sys/devices/platform/vpss/graphics0/enabled
/ # saLoopBackScale
VPSS_GRPX : (0)- venc 4 not running.
sh: write error: Invalid argument
Driver Name: ti81xxvin
Drivefpga: vps_fpga_set_mode 9
r bus info: TI81xx Platform
Driver is capable of doing capture
saLoopBackScale:
Mode set is 720P60
Driver Name:
Driver bus info: Tɾ
=============================================================
Capture Format:
=============================================================
fmt.type = 1
fmt.width = 1280
fmt.height = 720
fmt.pixelformat = 1448695129
fmt.bytesperline = 2560
fmt.sizeimage = 1843200
=============================================================
=============================================================
Display Format:
=============================================================
fmt.type = 2
fmt.width = 1280
fmt.height = 720
fmt.pixelformat = 1448695129
fmt.bytesperline = 2560
fmt.sizeimage = 1843200
=============================================================
^C

  • Hello,

    What is the EZSDK version that you are using here?

    Could you run saLoopBack demo?

    Let me know the result.

    Regarding video capture driver you could check here:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_VIDEO_CAPTURE_Driver_User_Guide

    Best Regards,

    Margarita

  • I'm using ezsdk 5_05_02_00.

    I can run saLookback*, however, they don't seem to capture any frame at all. I placed a counter in linux/drivers/cap/ti81xx/vpss/capt.c capture_complete_cb() and it's never called. I did check the signals for the video on VIN[0]* and it's all there, the pin MUX is configured properly (same as the EVM, my HSYNC is the HSYNC1, not the HSYNC0) but nothing seems to happend.

    I'm really stuck on this one, it seems the binary blob in the M3 isn't doing anything, and I have no control over there at all...

  • hi Michael,

     

    can you check if there is any overflow in vip? if there is any, it will not give out any frames?

     

    Rgds,

    Brijesh

  • Err, how do I check "overflow in vip" ?

    I see some mentions of debug log from the m3, but I have no idea how to get to them...

  • I managed to find out how to read the M3 logs:


    /tmp # ./loggerSMDump.out 0x9e400000 0x100000 all
    Opened loggerSM.bin to store encoded records
    N:Video P:1 #:00000 T:0000000001e29631 M:xdc.runtime.Main S:Enabling Status Logger
    N:VPSS P:2 #:00000 T:0000000023ed871b M:xdc.runtime.Main S:Enabling Status Logger
    N:Video P:1 #:00001 T:0000000001e2f5e1 M:xdc.runtime.Main S:Enabling User1 Logs
    N:VPSS P:2 #:00001 T:0000000023edead5 M:xdc.runtime.Main S:Enabling User1 Logs
    N:Video P:1 #:00002 T:0000000001e36149 M:xdc.runtime.Main S:Disabling User1 Logs
    N:VPSS P:2 #:00002 T:0000000023ee5711 M:xdc.runtime.Main S:Disabling User1 Logs
    N:Video P:1 #:00003 T:0000000001e3c4d7 M:xdc.runtime.Main S:Disabling User1 Logs
    N:VPSS P:2 #:00003 T:0000000023eeb873 M:xdc.runtime.Main S:Disabling User1 Logs
    N:Video P:1 #:00004 T:0000000001e424a5 M:xdc.runtime.Main S:Disabling User1 Logs
    N:VPSS P:2 #:00004 T:0000000023ef173d M:xdc.runtime.Main S:Disabling User1 Logs
    N:Video P:1 #:00005 T:0000000001e4866b M:xdc.runtime.Main S:Disabling User1 Logs
    N:VPSS P:2 #:00005 T:0000000023ef7895 M:xdc.runtime.Main S:Disabling User1 Logs
    N:Video P:1 #:00006 T:0000000001e4ea4d M:xdc.runtime.Main S:Enabling Analysis Logs
    N:VPSS P:2 #:00006 T:0000000023efdd65 M:xdc.runtime.Main S:Enabling Analysis Logs
    N:Video P:1 #:00007 T:0000000001e7c749 M:xdc.runtime.Main S:Module<ti.omx> Entering<DomxCore_procAttach> @line<151>
    N:VPSS P:2 #:00007 T:0000000023f6058d M:xdc.runtime.Main S:edma3init() Passed
    N:Video P:1 #:00008 T:00000000023fa1f9 M:xdc.runtime.Main S:Module<ti.omx> @<DomxCore_procAttach> @line<177> msg<Before Ipc_attach>
    N:VPSS P:2 #:00008 T:0000000025f86eb9 M:xdc.runtime.Main S:isI2cInitReq is 1
    N:Video P:1 #:00009 T:0000000007557c67 M:xdc.runtime.Main S:Module<ti.omx> @<DomxCore_procAttach> @line<184> msg<After Ipc_attach>
    N:VPSS P:2 #:00009 T:00000000291c97db M:xdc.runtime.Main S:Module<ti.omx> Entering<DomxCore_procAttach> @line<151>
    N:Video P:1 #:00010 T:000000000756131d M:xdc.runtime.Main S:Module<ti.omx> @<DomxCore_procAttach> @line<186> msg<Ipc_attach successful>
    N:VPSS P:2 #:00010 T:000000002971c13b M:xdc.runtime.Main S:Module<ti.omx> @<DomxCore_procAttach> @line<191> msg<Before Ipc_attach>
    N:Video P:1 #:00011 T:0000000007568959 M:xdc.runtime.Main S:Module<ti.omx> Leaving<DomxCore_procAttach> @line<233> with error<0:ErrorNone>
    N:VPSS P:2 #:00011 T:000000002be14663 M:xdc.runtime.Main S:Module<ti.omx> @<DomxCore_procAttach> @line<198> msg<After Ipc_attach>
    N:Video P:1 #:00012 T:00000000075b865f M:xdc.runtime.Main S:Module<ti.omx> Entering<DomxCore_procInit> @line<250>
    N:VPSS P:2 #:00012 T:000000002be1e4ad M:xdc.runtime.Main S:Module<ti.omx> @<DomxCore_procAttach> @line<200> msg<Ipc_attach successful>
    N:Video P:1 #:00013 T:00000000075bfd83 M:xdc.runtime.Main S:Module<ti.omx> Entering<DomxCore_procMsgQInit> @line<115>
    N:VPSS P:2 #:00013 T:000000002be25c91 M:xdc.runtime.Main S:Module<ti.omx> Leaving<DomxCore_procAttach> @line<233> with error<0:ErrorNone>
    N:Video P:1 #:00014 T:00000000075cc2e1 M:xdc.runtime.Main S:Module<ti.omx> @<OmxRpc_moduleRegisterMsgqHeap> @line<927> msg<Before MessageQ_registerHeap>
    N:VPSS P:2 #:00014 T:000000002be78e3d M:xdc.runtime.Main S:Module<ti.omx> Entering<DomxCore_procInit> @line<250>
    N:Video P:1 #:00015 T:00000000075d4c71 M:xdc.runtime.Main S:Module<ti.omx> @<OmxRpc_moduleRegisterMsgqHeap> @line<932> msg<After MessageQ_registerHeap>
    N:VPSS P:2 #:00015 T:000000002be80085 M:xdc.runtime.Main S:Module<ti.omx> Entering<DomxCore_procMsgQInit> @line<115>
    N:Video P:1 #:00016 T:00000000075dc9c1 M:xdc.runtime.Main S:Module<ti.omx> Leaving<DomxCore_procMsgQInit> @line<142> with error<0:ErrorNone>
    N:VPSS P:2 #:00016 T:000000002be8ce67 M:xdc.runtime.Main S:Module<ti.omx> @<OmxRpc_moduleRegisterMsgqHeap> @line<927> msg<Before MessageQ_registerHeap>
    N:Video P:1 #:00017 T:00000000075e3f05 M:xdc.runtime.Main S:Module<ti.omx> Leaving<DomxCore_procInit> @line<346> with error<0:ErrorNone>
    N:VPSS P:2 #:00017 T:000000002be9580d M:xdc.runtime.Main S:Module<ti.omx> @<OmxRpc_moduleRegisterMsgqHeap> @line<932> msg<After MessageQ_registerHeap>
    N:Video P:1 #:00018 T:00000000075ed9c1 M:xdc.runtime.Main S:@ omxrpc_rcm_server_create: rcmServerName OmxRpcRcmServer_1, priority 8
    N:VPSS P:2 #:00018 T:000000002be9dc85 M:xdc.runtime.Main S:Module<ti.omx> Leaving<DomxCore_procMsgQInit> @line<142> with error<0:ErrorNone>
    N:Video P:1 #:00019 T:00000000075f4a05 M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_create> @line<225> msg<Before RcmServer_Params_init>
    N:VPSS P:2 #:00019 T:000000002bea5617 M:xdc.runtime.Main S:Module<ti.omx> Leaving<DomxCore_procInit> @line<346> with error<0:ErrorNone>
    N:Video P:1 #:00020 T:00000000075fc7a7 M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_create> @line<229> msg<After RcmServer_Params_init>
    N:VPSS P:2 #:00020 T:000000002beaee13 M:xdc.runtime.Main S:@ omxrpc_rcm_server_create: rcmServerName OmxRpcRcmServer_2, priority 8
    N:Video P:1 #:00021 T:000000000760418f M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_create> @line<232> msg<Before RcmServer_create>
    N:VPSS P:2 #:00021 T:000000002beb6121 M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_create> @line<225> msg<Before RcmServer_Params_init>
    N:Video P:1 #:00022 T:000000000765f28f M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_create> @line<240> msg<After RcmServer_create>
    N:VPSS P:2 #:00022 T:000000002bebe489 M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_create> @line<229> msg<After RcmServer_Params_init>
    N:Video P:1 #:00023 T:0000000007667e6f M:xdc.runtime.Main S:@ omxrpc_rcm_server_remote_fxn_register regFxnCategory 0
    N:VPSS P:2 #:00023 T:000000002bec6055 M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_create> @line<232> msg<Before RcmServer_create>
    N:Video P:1 #:00024 T:000000000766e859 M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcGetHandle)
    N:VPSS P:2 #:00024 T:000000002bf221bb M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_create> @line<240> msg<After RcmServer_create>
    N:Video P:1 #:00025 T:0000000007677ead M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcFreeHandle)
    N:VPSS P:2 #:00025 T:000000002bf2b3e7 M:xdc.runtime.Main S:@ omxrpc_rcm_server_remote_fxn_register regFxnCategory 0
    N:Video P:1 #:00026 T:0000000007681333 M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcCreateProxyLite)
    N:VPSS P:2 #:00026 T:000000002bf31e65 M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcGetHandle)
    N:Video P:1 #:00027 T:0000000007688b65 M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcGetHeapMemStats)
    N:VPSS P:2 #:00027 T:000000002bf3d36f M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcFreeHandle)
    N:Video P:1 #:00028 T:000000000769029b M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcDeleteProxyLite)
    N:VPSS P:2 #:00028 T:000000002bf4566d M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcCreateProxyLite)
    N:Video P:1 #:00029 T:0000000007697ab7 M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_start> @line<256> msg<Before RcmServer_start>
    N:VPSS P:2 #:00029 T:000000002bf4e033 M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcGetHeapMemStats)
    N:Video P:1 #:00030 T:00000000076a0297 M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_start> @line<258> msg<After RcmServer_start>
    N:VPSS P:2 #:00030 T:000000002bf559a3 M:xdc.runtime.Main S:Calling RcmServer_addSymbol(OmxRpcDeleteProxyLite)
    N:VPSS P:2 #:00031 T:000000002bf5d88d M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_start> @line<256> msg<Before RcmServer_start>
    N:VPSS P:2 #:00032 T:000000002bf65e0b M:xdc.runtime.Main S:Module<ti.omx> @<omxrpc_rcm_server_start> @line<258> msg<After RcmServer_start>

  • Hi michael,

     

    Do you see any overflow in this dump? i dont see that.

     

    Regards,

    Brijesh Jadav