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.

DM388: capture create error on dm388

Part Number: DM388
Other Parts Discussed in Thread: TVP5158, TVP7002

Hi all,

I am using the following code to create capture instance

/*Capture Link params*/
    CaptureLink_CreateParams_Init(&capturePrm);
    //capturePrm.numVipInst    = 2;
    capturePrm.numVipInst    = 1;
    capturePrm.outQueParams[0].nextLink = gVdisModuleContext.displayId[VDIS_DEV_HDMI];
    capturePrm.tilerEnable              = FALSE;
    capturePrm.vipInst[0].vipInstId = SYSTEM_CAPTURE_INST_VIP0_PORTA; //PORTA:24bit data, PORTB:8bit data
   
        pCaptureInstPrm                     = &capturePrm.vipInst[0];
        //pCaptureInstPrm->standard           = SYSTEM_STD_1080P_60;
        pCaptureInstPrm->standard           = SYSTEM_STD_1080I_60;//SYSTEM_STD_VGA_60;
        pCaptureInstPrm->numOutput          = 1;

        pCaptureOutPrm                      = &pCaptureInstPrm->outParams[0];
        pCaptureOutPrm->dataFormat          = SYSTEM_DF_YUV422SP_UV;
        pCaptureOutPrm->scEnable            = FALSE;
        pCaptureOutPrm->scOutWidth          = 1920;
        pCaptureOutPrm->scOutHeight         = 1080;
        pCaptureOutPrm->outQueId            = 0;

while creating the link the following error has been encountered

" Front Left: Capture 80 [67%] [40.00dB] [on]nks_m3vpss/capture/captureLink_drv.c: pInst->captureVipHandle != NULL : failed !!!:

I am using ipnc rdk 3.8 and my input is through VGA cable connected from cpu and output is hdmi display. I am using DM388EVM.

Please suggest the solutions.

Thanks

Kailash

  • Hi Kailash,

    I hope you are using IPNCRDK V3.8.1.

    What is your capture device?

    As i can see its failing while creating VIP handle so i doubt there is some issue in driver code.

    I hope you have done the necessary changes for adding your capture device in HDVPSS Code.

    In your create param you have not initialize a few param like videoDecoderId,inDataFormat etc.

    Can you please initialize all the params and try again.

    For captureLink Params reference you can look into the below file.

    Source/ipnc_rdk/ipnc_mcfw/mcfw/interfaces/link_api/captureLink.h

  • Hi Anuj,

    Yes I am using IPNCRDK V3.8.1.

    I am trying to get video input from Pentium 4 CPU with ubuntu installed on it, Through a VGA connector , output end is connected through CPU(the same output which goes to PC monitor) and input is connected to the VGA in of DM388EVM.

    Here are my parameters. I believe these parameters are enough to start the capture link.

    gVcapModuleContext.captureId = SYSTEM_LINK_ID_CAPTURE;
    gVdisModuleContext.displayId[VDIS_DEV_HDMI] = SYSTEM_LINK_ID_DISPLAY_0;

    /*Capture Link params*/
    CaptureLink_CreateParams_Init(&capturePrm);
    capturePrm.numVipInst = 1;
    capturePrm.outQueParams[0].nextLink = gVdisModuleContext.displayId[VDIS_DEV_HDMI];
    capturePrm.tilerEnable = FALSE;
    capturePrm.vipInst[0].vipInstId = SYSTEM_CAPTURE_INST_VIP0_PORTA; //PORTA:24bit data, PORTB:8bit data

    pCaptureInstPrm = &capturePrm.vipInst[0];
    //pCaptureInstPrm->standard = SYSTEM_STD_1080I_60;
    pCaptureInstPrm->standard = SYSTEM_STD_1080P_60;//SYSTEM_STD_VGA_60;
    pCaptureInstPrm->numOutput = 1;
    pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;//SYSTEM_DF_YUV422I_YUYV;
    pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_TVP7002_DRV;//SYSTEM_DEVICE_VID_DEC_TVP5158_DRV

    pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
    pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422SP_UV;
    pCaptureOutPrm->scEnable = FALSE;
    pCaptureOutPrm->scOutWidth = 1920;
    pCaptureOutPrm->scOutHeight = 1080;
    pCaptureOutPrm->outQueId = 0;

    thanks
    Kailash
  • Hi Kailash,

    Are you still facing same issue with these params also?
    Can you change dataFormat to FVID2_DF_YUV422I_YUYV.

  • Hi Anuj,

    Thanks for replying i am able to create capture link with the following params but i am not able to start the capture link now
    /*Capture Link params*/
    CaptureLink_CreateParams_Init(&capturePrm);
    capturePrm.numVipInst = 1;
    capturePrm.outQueParams[0].nextLink = gVdisModuleContext.displayId[VDIS_DEV_HDMI];
    capturePrm.tilerEnable = FALSE;
    capturePrm.enableSdCrop = FALSE;

    #if 1
    for(vipInstId=0; vipInstId<capturePrm.numVipInst; vipInstId++)
    {
    pCaptureInstPrm = &capturePrm.vipInst[vipInstId];
    pCaptureInstPrm->vipInstId = (SYSTEM_CAPTURE_INST_VIP0_PORTA+vipInstId)%SYSTEM_CAPTURE_INST_MAX;
    pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_TVP7002_DRV;//SYSTEM_DEVICE_VID_DEC_TVP5158_DRV;
    pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;
    pCaptureInstPrm->standard = SYSTEM_STD_AUTO_DETECT;//SYSTEM_STD_MUX_4CH_D1;
    pCaptureInstPrm->numOutput = 1;

    pCaptureOutPrm = &pCaptureInstPrm->outParams[vipInstId];
    pCaptureOutPrm->dataFormat = FVID2_DF_YUV422I_YUYV;//SYSTEM_DF_YUV422P;//SYSTEM_DF_YUV422I_YUYV;
    pCaptureOutPrm->scEnable = FALSE;
    pCaptureOutPrm->scOutWidth = 640;
    pCaptureOutPrm->scOutHeight = 480;
    pCaptureOutPrm->outQueId = 0;
    }

    for(vipInstId = 0; vipInstId< capturePrm.numVipInst; vipInstId++)
    {
    vidDecVideoModeArgs[vipInstId].videoIfMode = DEVICE_CAPT_VIDEO_IF_MODE_16BIT;
    vidDecVideoModeArgs[vipInstId].videoDataFormat = SYSTEM_DF_YUV422P;
    vidDecVideoModeArgs[vipInstId].standard = SYSTEM_STD_AUTO_DETECT;//SYSTEM_STD_MUX_4CH_D1;
    vidDecVideoModeArgs[vipInstId].videoCaptureMode =
    DEVICE_CAPT_VIDEO_CAPTURE_MODE_MULTI_CH_PIXEL_MUX_EMBEDDED_SYNC;
    vidDecVideoModeArgs[vipInstId].videoSystem =
    DEVICE_VIDEO_DECODER_VIDEO_SYSTEM_AUTO_DETECT;
    vidDecVideoModeArgs[vipInstId].videoCropEnable = FALSE;
    vidDecVideoModeArgs[vipInstId].videoAutoDetectTimeout = -1;
    }

    OSA_printf("MultiCh_createVCaptureVDisplay1\n");
    Vcap_configVideoDecoder(vidDecVideoModeArgs, 1);
    #endif

    My code is not able to do VCAP_START.
    And seems link there is no support for TVP7002. Can you please take a look at the following post as well.
    e2e.ti.com/.../624654



    thanks
    Kailash
  • small correction
    pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422P; not pCaptureOutPrm->dataFormat =FVID2_DF_YUV422I_YUYV;

    thanks
    Kailash
  • Hi Kailash,
    If possible then can you share your usecase file.
    If you have any issue in sharing it publicly then please send it to my email-id.(If you need please ask)
    Share your boot logs also.
  • Hi Anuj,

    Can you share your email id, I will share my code .

    My capture create and start is successfull but i am not getting any data from the input source , HDMI display shows up green/blue/black even if i am not connecting any input.

    My set up is VGA cable is connected to VGA connector which is connected to tvp7002 on DM388EVM , source of input is Pentium 4 cpu.


    Thanks
    Kailash
  • Use case:
    {
    CaptureLink_CreateParams capturePrm;
    DisplayLink_CreateParams displayPrm;

    CaptureLink_VipInstParams *pCaptureInstPrm;
    CaptureLink_OutParams *pCaptureOutPrm;

    OSA_printf("MultiCh_createVCaptureVDisplay0\n");
    MultiCh_detectBoard();
    MULTICH_INIT_STRUCT(DisplayLink_CreateParams,displayPrm);
    System_linkControl(SYSTEM_LINK_ID_M3VPSS,
    SYSTEM_M3VPSS_CMD_RESET_VIDEO_DEVICES,
    NULL,
    0,
    TRUE
    );

    /*Initialize link IDs*/
    gVcapModuleContext.captureId = SYSTEM_LINK_ID_CAPTURE;
    gVdisModuleContext.displayId[VDIS_DEV_HDMI] = SYSTEM_LINK_ID_DISPLAY_0;

    /*Capture Link params*/
    {
    CaptureLink_CreateParams_Init(&capturePrm);

    capturePrm.numVipInst = 1;
    capturePrm.outQueParams[0].nextLink = gVdisModuleContext.displayId[VDIS_DEV_HDMI];

    #if 0//def ENABLE_TILER_CAMERA
    capturePrm.tilerEnable = TRUE;
    #else
    capturePrm.tilerEnable = FALSE;
    #endif
    capturePrm.enableSdCrop = FALSE;
    capturePrm.numBufsPerCh = 8;
    capturePrm.numExtraBufs = 1;
    capturePrm.fakeHdMode = FALSE;
    capturePrm.enableSdCrop = FALSE;
    capturePrm.doCropInCapture = FALSE;

    pCaptureInstPrm = &capturePrm.vipInst[0];
    pCaptureInstPrm->vipInstId = SYSTEM_CAPTURE_INST_VIP0_PORTA;
    pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_TVP7002_DRV;
    pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;//SYSTEM_DF_RGB24_888;
    pCaptureInstPrm->standard = SYSTEM_STD_720P_60;//SYSTEM_STD_VGA_60;//SYSTEM_STD_1080P_60;//SYSTEM_STD_AUTO_DETECT;
    pCaptureInstPrm->numOutput = 1;

    pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
    pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV420SP_UV;
    pCaptureOutPrm->scEnable = FALSE;
    //pCaptureOutPrm->scOutWidth = 1920;
    //pCaptureOutPrm->scOutHeight = 1080;
    pCaptureOutPrm->outQueId = 0;
    }

    /*Display link params*/
    MULTICH_INIT_STRUCT(DisplayLink_CreateParams,displayPrm);
    displayPrm.inQueParams[0].prevLinkId = gVcapModuleContext.captureId;
    displayPrm.inQueParams[0].prevLinkQueId = 0;
    displayPrm.displayRes = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_HDMI].resolution;
    displayPrm.displayId = DISPLAY_LINK_DISPLAY_SC2;//Auxilary video path(support full hd/sd)

    /*Create Links*/
    System_linkCreate(gVcapModuleContext.captureId, &capturePrm, sizeof(capturePrm));
    //System_linkControl(gVcapModuleContext.captureId,
    //CAPTURE_LINK_CMD_DETECT_VIDEO, NULL, 0, TRUE);
    System_linkCreate(gVdisModuleContext.displayId[VDIS_DEV_HDMI], &displayPrm, sizeof(displayPrm));

    MultiCh_memPrintHeapStatus();
    OSA_printf("MultiCh_createVCaptureVDisplayend\n");
    }

    I am not able to get video data from input source.
    thanks
    kailash
  • Hi Kailash,

    My email-id is anuj.gupta@pathpartnertech.com.
    Please share your usecase code file and log file.