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.

dm8127 MCFW link problem

hi,

appro dm8127 3.2 RDK!

I want to get YUV image in A8 and do some proces in the YUV image. Then  send the YUV back to M3Vpss. so the flow is:

camera link--->Dup--->Merger LInk-->IpcFramesOutLinkRTOS-->IpcFramesInLinkHLOS--> IpcFramesOutLinkHLOS-->IpcFramesInLinkRTOS-->swosd-->ipcOutVpss-->ipcInVideo

however, the M3 program get an error in IpcFramesInLink_putEmptyFrames. the following is the log info

 [m3vpss ] Command 1 recived from HOST A8
 [m3vpss ]  5615: CAMERA: Fields = 2 (fps = 0), Total Resets = 0 (Avg 0 ms per reset)

 [host] MCFW_IPCFRAMES: Callback function:App_ipcFramesInCbFxn
 [host] MCFW_IPCFRAMES:Received first frame notify...
 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:2
 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:5708   virtAddr[0][0]:(nil)    phyAddr[0][0]:0xb841c500
 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:1    fid:0   frameWidth:720  frameHeight:480 timeStamp:5708  virtAddr[0][0]:(nil)     phyAddr[0][0]:0xb9beb500
 [host] Vdis_getEmptyVideoFrames:status 0 Num:0

 [host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:INFO: periodic print.. [m3video]  Channel:0 inputframerate:30 targetfps:60
 [m3vpss ]  5745: Assertion @ Line: 562 in links_common/ipcFramesIn/ipcFramesInLink_tsk.c: pListElem->frameBuf.phyAddr[0][0] == pFrameBuf->addr[0][0] : failed !!!

 [host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn
 [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:INFO: periodic print.. [m3video]  Channel:1 inputframerate:15 targetfps:60

 

the following is the code:

    /* Merge Link params */
 #ifdef YUV_FRAMES_TO_A8
    mergePrm[CAM_STREAM_MERGE_IDX].numInQue = 2;
 #else
 mergePrm[CAM_STREAM_MERGE_IDX].numInQue = 3;
 #endif
    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[0].prevLinkId = dupId[MJPEG_DUP_LINK_IDX];
    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[0].prevLinkQueId = 0;
    if(gUI_mcfw_config.glbceEnable)
  mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkId = ispId;
    else
    {
     #ifdef RAW_FRAMES_TO_A8
  mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkId = ispId;
  #else
  mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkId = gVcamModuleContext.cameraId;
  #endif
  
    }

    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkQueId = 1;
 #ifdef YUV_FRAMES_TO_A8
 //none
 #else
    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[2].prevLinkId = dupId[MJPEG_DUP_LINK_IDX];
    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[2].prevLinkQueId = 1;
 #endif
//    mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink = gVsysModuleContext.swOsdId;
    mergePrm[CAM_STREAM_MERGE_IDX].notifyNextLink = TRUE;
#ifdef YUV_FRAMES_TO_A8
 mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink = gVcamModuleContext.ipcFramesOutVpssToHostId;

 /* Set ipcFramesOutVpss link info */
 ipcFramesOutVpssToHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesOutVpssToHostPrm.baseCreateParams.notifyNextLink = FALSE;
 ipcFramesOutVpssToHostPrm.baseCreateParams.notifyPrevLink = TRUE;
 ipcFramesOutVpssToHostPrm.baseCreateParams.inQueParams.prevLinkId = mergeId[CAM_STREAM_MERGE_IDX];
 ipcFramesOutVpssToHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
 ipcFramesOutVpssToHostPrm.baseCreateParams.outQueParams[0].nextLink = gVcamModuleContext.ipcFramesInHostId;
 ipcFramesOutVpssToHostPrm.baseCreateParams.processLink       =  SYSTEM_LINK_ID_INVALID; //johnlin add

 ipcFramesInHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesInHostPrm.baseCreateParams.notifyNextLink = FALSE;
 ipcFramesInHostPrm.baseCreateParams.notifyPrevLink = FALSE;
 ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkId = gVcamModuleContext.ipcFramesOutVpssToHostId;
 ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
 ipcFramesInHostPrm.baseCreateParams.outQueParams[0].nextLink =SYSTEM_LINK_ID_INVALID;//gVsysModuleContext.swOsdId;//SYSTEM_LINK_ID_INVALID;
 ipcFramesInHostPrm.exportOnlyPhyAddr = TRUE;

 ipcFramesInHostPrm.cbCtx = &gVcamModuleContext;
 ipcFramesInHostPrm.cbFxn = Vcam_ipcFramesInCbFxn;

 ipcFramesOutHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesOutHostPrm.baseCreateParams.notifyNextLink = FALSE;
 ipcFramesOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
 ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID;
 ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
 ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.ipcFramesInVpssFromHostId;

 ipcFramesInVpssFromHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesInVpssFromHostPrm.baseCreateParams.notifyNextLink = TRUE;
 ipcFramesInVpssFromHostPrm.baseCreateParams.notifyPrevLink = FALSE;    
 ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesOutHostId;
 ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
 ipcFramesInVpssFromHostPrm.baseCreateParams.outQueParams[0].nextLink = gVsysModuleContext.swOsdId;
#else
 mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink = gVsysModuleContext.swOsdId;
#endif

    /* SWOSD Link Params */
#ifdef YUV_FRAMES_TO_A8
 swosdPrm.inQueParams.prevLinkId = gVcamModuleContext.ipcFramesInHostId;//gVdisModuleContext.ipcFramesInVpssFromHostId; //johnlin
#else
 swosdPrm.inQueParams.prevLinkId = mergeId[CAM_STREAM_MERGE_IDX];
#endif
   
    swosdPrm.inQueParams.prevLinkQueId = 0;
    swosdPrm.outQueParams.nextLink = ipcOutVpssId;
    swosdPrm.frameSync = 0;                                // frame sync is
                                                           // not required
    swosdPrm.frameSycChId = 0;                             // not used

    /* IPC Out VPSS link params */
    ipcOutVpssPrm.inQueParams.prevLinkId = gVsysModuleContext.swOsdId;
    ipcOutVpssPrm.inQueParams.prevLinkQueId = 0;
    ipcOutVpssPrm.numOutQue = 1;
    ipcOutVpssPrm.outQueParams[0].nextLink = ipcInVideoId;
    ipcOutVpssPrm.notifyNextLink = TRUE;
    ipcOutVpssPrm.notifyPrevLink = TRUE;
    ipcOutVpssPrm.noNotifyMode = FALSE;

    /* IPC In VIDEO params */
    ipcInVideoPrm.inQueParams.prevLinkId = ipcOutVpssId;
    ipcInVideoPrm.inQueParams.prevLinkQueId = 0;
    ipcInVideoPrm.numOutQue = 1;
    ipcInVideoPrm.outQueParams[0].nextLink = gVencModuleContext.encId;
    ipcInVideoPrm.notifyNextLink = TRUE;
    ipcInVideoPrm.notifyPrevLink = TRUE;
    ipcInVideoPrm.noNotifyMode = FALSE;

 

 Ti_mcfw_ipncframes.c

 

static Void * App_ipcFramesSendRecvFxn(Void * prm)
{
     App_IpcFramesCtrlThrObj *thrObj = ( App_IpcFramesCtrlThrObj *) prm;
    static Int printStatsInterval = 0;
    VIDEO_FRAMEBUF_LIST_S bufList;
    Int status;

#ifdef CUSTOM_SD_DEMO
    App_ipcFramesFileOpen();
#endif

    OSA_printf("MCFW_IPCFRAMES:%s:Entered...",__func__);
    OSA_semWait(&thrObj->framesInNotifySem,OSA_TIMEOUT_FOREVER);
    OSA_printf("MCFW_IPCFRAMES:Received first frame notify...");
    while (FALSE == thrObj->exitFramesInOutThread)
    {
        status =  Vcam_getFullVideoFrames(&bufList,0);   

        OSA_assert(0 == status);
        if (bufList.numFrames)
        {
             App_ipcFramesPrintFullFrameListInfo(&bufList,"FullFrameList");
#ifdef CUSTOM_SD_DEMO
             App_ipcFrameFileWrite(&bufList);
#endif
            status = Vdis_putFullVideoFrames(&bufList);    

            OSA_assert(0 == status);
        }
        status =  Vdis_getEmptyVideoFrames(&bufList,0);    

        OSA_assert(0 == status);

  OSA_printf("Vdis_getEmptyVideoFrames:status %d Num:%d \n",status,bufList.numFrames);

  if (bufList.numFrames)
        {
            App_ipcFramesPrintFullFrameListInfo(&bufList,"EmptyFrameList");
            status = Vcam_putEmptyVideoFrames(&bufList);
            OSA_assert(0 == status);
        }
#ifdef IPC_FRAMES_DEBUG
        if ((printStatsInterval % MCFW_IPCFRAMES_INFO_PRINT_INTERVAL) == 0)
        {
            OSA_printf("MCFW_IPCFRAMES:%s:INFO: periodic print..",__func__);
        }
#endif
        printStatsInterval++;
        OSA_waitMsecs(MCFW_IPCFRAMES_SENDRECVFXN_PERIOD_MS);
    }
#ifdef CUSTOM_SD_DEMO
    if(gApp_ipcFramesCtrl.fileFrameWriteEnable)
    {
        if(gApp_ipcFramesCtrl.fileFrameWriteState==FILE_WRITE_RUNNING)
        {
            fclose(gApp_ipcFramesCtrl.fp);
            OSA_printf(" Closing file [%s] for CH%d\n", gApp_ipcFramesCtrl.fileFrameWriteName, gApp_ipcFramesCtrl.fileFrameWriteChn);
        }
    }
#endif
    OSA_printf("MCFW_IPCFRAMES:%s:Leaving...",__func__);
    return NULL;
}

 

 What should I do? Is there something that I miss to config? Or the current config is wrong?  It's very strange. The custom dm8127 board work fine in the lowpower mode. However if I change the flow to get the YUV data in A8, the M3 vpss stop work after get the following assert.  Any suggestion would be  grateful. Thanks

 

  •  the followint is the link create order:

     

      /* Dup Link */
        System_linkCreate(dupId[MJPEG_DUP_LINK_IDX], &dupPrm[MJPEG_DUP_LINK_IDX], sizeof(dupPrm[MJPEG_DUP_LINK_IDX]));

        /* Merge Link */
        System_linkCreate(mergeId[CAM_STREAM_MERGE_IDX],
                          &mergePrm[CAM_STREAM_MERGE_IDX],
                          sizeof(mergePrm[CAM_STREAM_MERGE_IDX]));

    #ifdef YUV_FRAMES_TO_A8
     System_linkCreate(gVcamModuleContext.ipcFramesOutVpssToHostId, &ipcFramesOutVpssToHostPrm, sizeof(ipcFramesOutVpssToHostPrm));
     System_linkCreate(gVcamModuleContext.ipcFramesInHostId, &ipcFramesInHostPrm, sizeof(ipcFramesInHostPrm));

     System_linkGetInfo(gVcamModuleContext.ipcFramesInHostId,&framesProducerLinkInfo);
     OSA_assert(framesProducerLinkInfo.numQue == 1);
     ipcFramesOutHostPrm.inQueInfo = framesProducerLinkInfo.queInfo[0];

     System_linkCreate(gVdisModuleContext.ipcFramesOutHostId, &ipcFramesOutHostPrm, sizeof(ipcFramesOutHostPrm));
     System_linkCreate(gVdisModuleContext.ipcFramesInVpssFromHostId, &ipcFramesInVpssFromHostPrm, sizeof(ipcFramesInVpssFromHostPrm));
    #endif 

        /* SWOSD Link */
        System_linkCreate(gVsysModuleContext.swOsdId, &swosdPrm, sizeof(swosdPrm));

        /* IPC Links */
        System_linkCreate(ipcOutVpssId, &ipcOutVpssPrm, sizeof(ipcOutVpssPrm));
        System_linkCreate(ipcInVideoId, &ipcInVideoPrm, sizeof(ipcInVideoPrm));

        /* Video Encoder Link */
        System_linkCreate(gVencModuleContext.encId, &encPrm, sizeof(encPrm));

     /* VSTAB link */
     System_linkCreate(vstabId, &vstabPrm, sizeof(vstabPrm));

        /* IPC Bits Links */
        System_linkCreate(gVencModuleContext.ipcBitsOutRTOSId, &ipcBitsOutVideoPrm,
                          sizeof(ipcBitsOutVideoPrm));
        System_linkCreate(gVencModuleContext.ipcBitsInHLOSId, &ipcBitsInHostPrm0,
                          sizeof(ipcBitsInHostPrm0));

        OSA_printf("USECASE SETUP DONE\n");

  •  the log info:

     [host] MCFW_IPCFRAMES: Callback function:App_ipcFramesInCbFxn
     [host] MCFW_IPCFRAMES:Received first frame notify...
     [host] Vcam_getFullVideoFrames:status 0 Num:2

     [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:2
     [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:6812   virtAddr[0][0]:(nil)    phyAddr[0][0]:0xb841c500
     [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:1    fid:0   frameWidth:720  frameHeight:480 timeStamp:6813  virtAddr[0][0]:(nil)     phyAddr[0][0]:0xb9beb500
     [host] Vdis_getEmptyVideoFrames:status 0 Num:0

     [host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:INFO: periodic print..
     [host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn
     [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:INFO: periodic print.. [m3video]  Channel:0 inputframerate:30 targetfps:60
     [m3vpss ] pListElem->frameBuf.phyAddr[0][0] =0xc086c20a  pFrameBuf->addr[0][0]=0xb841c500
     [m3vpss ]  6838: Assertion @ Line: 565 in links_common/ipcFramesIn/ipcFramesInLink_tsk.c: pListElem->frameBuf.phyAddr[0][0] == pFrameBuf->addr[0][0] : failed !!!
     [m3video]  Channel:1 inputframerate:15 targetfps:60

  • It looks like the link after ipcFramesIn on M3VPSS is modifying the FVID2 frame pointer.Or the usecase connection is wrong such that ipcFramesIn -> nextLink and the actual nextLinks prevLink and prevLinkQueueId are not set correctly. I have forwarded the issue to IPNC team. They may reply with better inputs.

  • Thank you for your quick reply, Badri. Your answer do really give me the power and the hope. I will keep on going deep into this problem.

    Meanwhile I have another question. In TI Multich_capturedisplay.c file,  YUV_FRAMES_TO_A8 mode, why the display_SD previous link id is gVcamModuleContext.ipcFramesInHostId?  That confuses me. I think display_SD previous link id should be  gVdisModuleContext.ipcFramesInVpssFromHostId.

     

    #ifdef YUV_FRAMES_TO_A8
     displayPrm_SD.inQueParams[0].prevLinkId = gVcamModuleContext.ipcFramesInHostId;
    #else
        displayPrm_SD.inQueParams[0].prevLinkId = dupId[TVOUT_DUP_IDX];
    #endif

  • hi, Badri

    when i set the ipcFramesInHostPrm.exportOnlyPhyAddr to FALSE, A8 gets an error in IpcFramesInLink_setVirtBufAddr function.The following is the log:

     [host] Response from M3 is : 1

     [host] Response from M3 is : 1

     [host] Default parameters were sent sucessfully

     [host] Server Socket created with ID <25>
     [m3vpss ] Command 2 recived from HOST A8
     [m3vpss ] New DCC data of size <28820>
     [m3vpss ] Call to VNF_LINK_CMD_UPDATE_DCC -1
     [m3vpss ]  4779: CAMERA: Fields = 2 (fps = 0), Total Resets = 0 (Avg 0 ms per reset)
     ASSERT (ipcFramesInLink_tsk.c|IpcFramesInLink_setVirtBufAddr|588)
    INIT: Entering runlevel: 5
     inside autorun
     sbulla: unknown partition table
     [m3vpss ] Posting message <be903e00> in QId <30002> Brightness: 136

     

    After A8 get an error, App_ipcFramesSendRecvFxn could not work normal. But the A8 and M3Vpss are still running.

    Should I set the  ipcFramesInHostPrm.exportOnlyPhyAddr to FALSE? They all confuse me.

  • hi Badri,

    when i use the ti capturedisplay usecase, the camera work ok. the log is:

     [host] Response from M3 is : 1
     [m3vpss ]  10212: CAMERA: Fields = 2 (fps = 0), Total Resets = 0 (Avg 0 ms per reset)

     [host] MCFW_IPCFRAMES: Callback function:App_ipcFramesInCbFxn
     [host] MCFW_IPCFRAMES:Received first frame notify...
     [host] Vcam_getFullVideoFrames:status 0 Num:1

     [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:1
     [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:720  frameHeight:480 timeStamp:14361     virtAddr[0][0]:(nil)    phyAddr[0][0]:0xba3d4500
     [host]  Vdis_getEmptyVideoFrames:status 0 Num:0

     [host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:INFO: periodic print..
     [host]  Vcam_getFullVideoFrames:status 0 Num:0

     [host] Vdis_getEmptyVideoFrames:status 0 Num:0

     [host] Vcam_getFullVideoFrames:status 0 Num:1

     [host]  Vdis_getEmptyVideoFrames:status 0 Num:0
     [m3vpss ] Command 2 recived from HOST A8
     [m3vpss ] New DCC data of size <28820>

     [host] Response from M3 is : 1

     [host] Default parameters were sent sucessfully

     [host] Server Socket created with ID <25>
     [m3vpss ] Call to VNF_LINK_CMD_UPDATE_DCC -1
     [m3vpss ] pListElem->frameBuf.phyAddr[0][0] =0xba3d4500  pFrameBuf->addr[0][0]=0xba3d4500

     [host] Vcam_getFullVideoFrames:status 0 Num:0

     [host] Vdis_getEmptyVideoFrames:status 0 Num:1

     [host] Vcam_getFullVideoFrames:status 0 Num:1

     [host] Vdis_getEmptyVideoFrames:status 0 Num:0
     [m3vpss ] pListElem->frameBuf.phyAddr[0][0] =0xba46eb00  pFrameBuf->addr[0][0]=0xba46eb00

     [host] Vcam_getFullVideoFrames:status 0 Num:0

     [host] Vdis_getEmptyVideoFrames:status 0 Num:1

     [host] Vcam_getFullVideoFrames:status 0 Num:1

     [host] Vdis_getEmptyVideoFrames:status 0 Num:0
     [m3vpss ] pListElem->frameBuf.phyAddr[0][0] =0xba509100  pFrameBuf->addr[0][0]=0xba509100

     

    So I have a question. Dose the IPCFRAMEINHOST link support two channel YUV image as input?

  • Hi Badri,

    I have modify a simple usecase base on the CaptureDisplay usecase.    I change the  data flow from  IpcFramesInLinkRTOS-->Display_SD to

    IpcFramesInLinkRTOS-->ipcOutVpss-->ipcInVideo. However, the mcfw still get the following error:

     

     [host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:INFO: periodic print..
     [host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn
     [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:INFO: periodic print.. [m3vpss ] pListElem->frameBuf.phyAddr[0][0] =0x2c253ca0  pFrameBuf->addr[0][0]=0xba3d4500
     [m3vpss ]  13583: Assertion @ Line: 565 in links_common/ipcFramesIn/ipcFramesInLink_tsk.c: pListElem->frameBuf.phyAddr[0][0] == pFrameBuf->addr[0][0] : failed !!!

     

    The attachment is the code. Please help me!

  • Which defines are enabled in your case RAW_FRAMES_TO_A8 , YUV_FRAMES_TO_A8 ?

  • YUV_FRAMES_TO_A8  is enabled.

  • hi Badri, I think what you said is right.

    accroding to zhuoran's analyze , the root cause should be

    1, when frame transfer from A8 to M3,  it is recoder to pOrgListMPElem(IpcFramesInLink_copyFrameInfo)

    2. when the frame transfer from M3 VPSS to M3 VIDEO, it is changed again abut the pOrgListMPElem(IpcInM3Link_processFrames)

    so the second action changed the value make it can't return back the frame to A8, we need add one more point to record the informaion to avoid such kind of issue.

  • The analysis looks correct. We never had ipcFramesOut -> ipcFramesIn -> ipcOUtM3 connection in DVR RDK so this may never have been exercised. Can the frame be sent directly to Video M3.Why is A8 sending frame to VPSS M3 and then forwarding to Video M3.

  • hi, Badri

    I think the current mcfw doesn't support A8 sending Frame to Video M3.  When I config the link flow like what you said, Video M3 could work. The following is the log info.

     

     [host] IpcFramesInLink_tskMain:Entered
     [host]  499: IPC_FRAMES_IN   : Create in progress !!!

     [host]  499: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_24] ...

     [host]  502: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_24] ...
     [m3vpss ] DCC server task running
     [m3vpss ] HW_BitClient_tskMain running
     [m3vpss ]  9715: NULL   : Create Done !!!
     [m3vpss ]  9716: NULL   : Create Done !!!
     [m3vpss ]  9716: IPC_FRAMES_OUT   : Create in progress !!!

     [host]  508: IPC_FRAMES_IN   : Create Done !!!

     [host]  508: IPC_FRAMES_OUT   : Create in progress !!!

     [host]  511: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  9719: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  9731: IPC_FRAMES_IN   : Create in progress !!!
     [m3vpss ]  9732: SYSTEM: Opening ListMP [HOST_IPC_OUT_23] ...
     [m3vpss ]  9732: SYSTEM: Opening ListMP [HOST_IPC_IN_23] ...
     [m3vpss ]  9734: SYSTEM: Opening MsgQ [HOST_MSGQ] ...
     [m3video]  9754: IPC_IN_M3   : Create in progress !!!
     [m3video]  9754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...
     [m3vpss ] IPC_FRAMES_IN:HEAPID:0       USED:240
     [m3vpss ]  9738: IPC_FRAMES_IN   : Create Done !!!
     [m3vpss ]  9739: DISPLAY: Create in progress !!!
     [m3vpss ]  9741: DISPLAY: Create Done !!!
     [m3vpss ]  9742: DISPLAY: Create in progress !!!
     [m3vpss ]  9753: DISPLAY: Create Done !!!
     [m3video]  10754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...
     [m3video]  11754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...
     [m3video]  12754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...
    ApproDrvInit: 7
    queue id:131076
     [m3video]  13754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...
    TimeOut occure in boot_proc.
    Program exit.
     [m3video]  14754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...
     [m3video]  15754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...
     [m3video]  16754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...
     [m3video]  17754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...
     [m3video]  18754: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_26] ...

  • Can you attach the usecase file after latest modification. I think there is some wrong link id being set. ipcFramesIn is supported on Video M3 in DVR RDK.It would mostly be supported in IPNC RDK as well.

  • hi Shawn Yang,

    Thank you for your reply.

    I add the printf to show the pOrgListMPElem address.  The following is the log info.

    //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------//

     [host] MCFW_IPCFRAMES: Callback function:App_ipcFramesInCbFxn
     [host] MCFW_IPCFRAMES:Received first frame notify...
     [host] <HWZT> Vcam_getFullVideoFrames:status 0 Num:1

     [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:1
     [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:720  frameHeight:480 timeStamp:10417 virtAddr[0][0]:(nil)     phyAddr[0][0]:0xba3d4500
     [host] Vdis_getEmptyVideoFrames:status 0 Num:0

     [host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:INFO: periodic print.. [m3vpss ]  10324: CAMERA: Fields = 2 (fps = 0), Total Resets = 0 (Avg 0 ms per reset)
     [m3video]  IPC_IN_M3   : IpcInM3Link_processFrames: pFrameInfo->pOrgListMPElem =  0xbe9a3a00
     [m3vpss ]  IPC_FRAME_IN   : IpcFramesInLink_copyFrameInfo: frmInfo->pOrgListMPElem =  0xbea87700
     [m3vpss ] pListElem->frameBuf.phyAddr[0][0] =0x6082c190  pFrameBuf->addr[0][0]=0xba3d4500
     [m3vpss ]  10431: Assertion @ Line: 568 in links_common/ipcFramesIn/ipcFramesInLink_tsk.c: pListElem->frameBuf.phyAddr[0][0] == pFrameBuf->addr[0][0] : failed !!!

     [host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn

    //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------//

    pOrgListMPElem  address  is different from each other.  So which address should i record?

  • Here is the usecase file. A8FRAME2M3VIDEO is enabled to send the A8 frame to videoM3.

  • The usecase is wrong. IpcFramesOut (A8) should be connected to ipcFramesIn (VideoM3) and not ipcInM3. You shoud remove ipcOutM3 and ipcInM3 and instead use ipcFramesIn link. The ipcFramesIn link should be on VIdeo M3 and not VPSS M3.

  • hi Badri,

    There are no ipcFramesIn/Out(videoM3) link id in ipnc RDK 3.2. Please take a look at the attachment.

    Do I have to  add the ipcFramesIn/Out(videoM3) link id by myself? 

    system_linkId.h
  • hi, Badri

    I add the ipcFrameInVideo link id in system_linkId.h.


    //--------------------------------------------------------------------------------------------//

    #define SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_IN_0  VIDEO_LINK(SYSTEM_LINK_ID_IPC_FRAMES_IN_0)
    #define SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_IN_1  VIDEO_LINK(SYSTEM_LINK_ID_IPC_FRAMES_IN_1)

    #define SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_0  VIDEO_LINK(SYSTEM_LINK_ID_IPC_FRAMES_OUT_0)
    #define SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_1  VIDEO_LINK(SYSTEM_LINK_ID_IPC_FRAMES_OUT_1)
    #define SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_2  VIDEO_LINK(SYSTEM_LINK_ID_IPC_FRAMES_OUT_2)
    //--------------------------------------------------------------------------------------------//

     

    The attachment is the usecase.  But the result is disappointing. The M3 vpss stop and A8 is halt too.

    The following is the log info.

     

     [host] IpcFramesInLink_tskMain:Entered
     [host]  513: IPC_FRAMES_IN   : Create in progress !!!

     [host]  513: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_24] ...

     [host]  515: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_24] ...

     [host]  521: IPC_FRAMES_IN   : Create Done !!!

     [host]  522: IPC_FRAMES_OUT   : Create in progress !!!

     [host]  524: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  12652: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  12664: IPC_FRAMES_IN   : Create in progress !!!
     [m3vpss ]  12664: SYSTEM: Opening ListMP [HOST_IPC_OUT_23] ...
     [m3vpss ]  12665: SYSTEM: Opening ListMP [HOST_IPC_IN_23] ...
     [m3vpss ]  12667: SYSTEM: Opening MsgQ [HOST_MSGQ] ...
     [m3vpss ] IPC_FRAMES_IN:HEAPID:0       USED:240
     [m3vpss ]  12671: IPC_FRAMES_IN   : Create Done !!!
     [m3vpss ]  12671: DISPLAY: Create in progress !!!
     [m3vpss ]  12674: DISPLAY: Create Done !!!
     [m3vpss ]  12675: DISPLAY: Create in progress !!!
     [m3vpss ]  12686: DISPLAY: Create Done !!!
    TimeOut occure in boot_proc.
    Program exit.
    ApproDrvInit: 7
    queue id:131076
    TimeOut occure in boot_proc.
    Program exit.
    ApproDrvExit: 7
    Error: WaitStreamReady Fail.
    Error: SemWait: Invalid Semaphore handler

     

  • hi Badri,

    I add the ipcFramesIn/OutLink_init in the M3Video system_init. The following is the log info.

     [host] IpcFramesInLink_tskMain:Entered
     [host]  518: IPC_FRAMES_IN   : Create in progress !!!

     [host]  518: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_24] ...

     [host]  520: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_24] ...

     [host]  526: IPC_FRAMES_IN   : Create Done !!!

     [host]  527: IPC_FRAMES_OUT   : Create in progress !!!

     [host]  529: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  9731: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  9743: IPC_FRAMES_IN   : Create in progress !!!
     [m3vpss ]  9743: SYSTEM: Opening ListMP [HOST_IPC_OUT_23] ...
     [m3vpss ]  9744: SYSTEM: Opening ListMP [HOST_IPC_IN_23] ...
     [m3vpss ]  9746: SYSTEM: Opening MsgQ [HOST_MSGQ] ...
     [m3video]  9765: IPC_FRAMES_IN   : Create in progress !!!
     [m3vpss ] IPC_FRAMES_IN:HEAPID:0       USED:240
     [m3video]  9766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3vpss ]  9750: IPC_FRAMES_IN   : Create Done !!!
     [m3vpss ]  9750: DISPLAY: Create in progress !!!
     [m3vpss ]  9753: DISPLAY: Create Done !!!
     [m3vpss ]  9754: DISPLAY: Create in progress !!!
     [m3vpss ]  9765: DISPLAY: Create Done !!!
     [m3video]  10766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  11766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  12766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
    ApproDrvInit: 7
    queue id:131076
     [m3video]  13766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
    TimeOut occure in boot_proc.
    Program exit.
     [m3video]  14766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  15766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  16766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  17766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  18766: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
    TimeOut occure in boot_proc.
    Program exit.
     [m3video]  19766: Assertion @ Line: 105 in links_common/system/system_ipc_listMP.c: 0 : failed !!!
    ApproDrvExit: 7
    Error: WaitStreamReady Fail.
    Error: SemWait: Invalid Semaphore handler

     

     

  • hi Shawn Yang

    Could you tell me how to modify the program to avoid this issue? Thanks!

  • The below code is wrong:

     ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.ipcFramesInVpssFromHostId;

     ipcFramesInVpssFromHostPrm.baseCreateParams.noNotifyMode = TRUE;
     ipcFramesInVpssFromHostPrm.baseCreateParams.notifyNextLink = TRUE;
     ipcFramesInVpssFromHostPrm.baseCreateParams.notifyPrevLink = FALSE;
     ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesOutHostId;
     ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
     ipcFramesInVpssFromHostPrm.baseCreateParams.outQueParams[0].nextLink = ipcInVideoId; 
     ipcFramesInVpssFromHostPrm.baseCreateParams.numOutQue = 1;       //johnlin add


     dupPrm[TVOUT_DUP_IDX].outQueParams[1].nextLink = sdNullId;
        dupPrm[TVOUT_DUP_IDX].notifyNextLink = TRUE;

        /* IPC Out VPSS link params */
        ipcOutVpssPrm.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesInVpssFromHostId;//gVcamModuleContext.ipcFramesInHostId;//johnlin modify
        ipcOutVpssPrm.inQueParams.prevLinkQueId = 0;
        ipcOutVpssPrm.numOutQue = 1;
        ipcOutVpssPrm.outQueParams[0].nextLink = ipcInVideoId;
        ipcOutVpssPrm.notifyNextLink = TRUE;
        ipcOutVpssPrm.notifyPrevLink = TRUE;
        ipcOutVpssPrm.noNotifyMode = FALSE;

        /* IPC In VIDEO params */
     ipcInVideoPrm.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesInVpssFromHostId;
       
        ipcInVideoPrm.inQueParams.prevLinkQueId = 0;
        ipcInVideoPrm.numOutQue = 1;
        ipcInVideoPrm.outQueParams[0].nextLink = gVencModuleContext.encId;
        ipcInVideoPrm.notifyNextLink = TRUE;
        ipcInVideoPrm.notifyPrevLink = TRUE;
        ipcInVideoPrm.noNotifyMode = FALSE;

     

     

    There should be no ipcFramesInVpssFromHost.Delete all code  related to links that you are not using and connect ipcFramesOutHOST to ipcFramesInVideo.

  • hi Badri

    Thank you for you reply.  After I change the code as you said, it still get the following error!

     

     [m3vpss ]  12707: NULL   : Create Done !!!
     [m3vpss ]  12708: NULL   : Create Done !!!
     [m3vpss ]  12708: IPC_FRAMES_OUT   : Create in progress !!!

     [host]  508: IPC_FRAMES_IN   : Create Done !!!

     [host]  508: IPC_FRAMES_OUT   : Create in progress !!!

     [host]  510: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  12711: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  12723: DISPLAY: Create in progress !!!
     [m3vpss ]  12725: DISPLAY: Create Done !!!
     [m3vpss ]  12726: DISPLAY: Create in progress !!!
     [m3vpss ]  12727: SYSTEM: Opening MsgQ [HOST_MSGQ] ...
     [m3video]  12739: IPC_FRAMES_IN   : Create in progress !!!
     [m3vpss ]  12738: DISPLAY: Create Done !!!
     [m3video]  12739: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  13739: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  14739: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
    TimeOut occure in boot_proc.
    Program exit.
     [m3video]  15739: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
    ApproDrvInit: 7
    queue id:131076
     [m3video]  16739: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  17739: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  18739: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  19739: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  20740: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
     [m3video]  21740: SYSTEM: Opening ListMP [HOST_IPC_OUT_26] ...
    TimeOut occure in boot_proc.
    Program exit.
     [m3video]  22739: Assertion @ Line: 105 in links_common/system/system_ipc_listMP.c: 0 : failed !!!

     

    M3Video could not open the ListMp of HOST_IPC_OUT_26. Why M3Video can't open this ListMp? And what is this error mean?

    The attachment is the newest usecase.

  • ipcFrameInVideoPrm.baseCreateParams.inQueParams.prevLinkId should be gVdisModuleContext.ipcFramesOutHostId not gVcamModuleContext.ipcFramesInHostId

  • hi Badri,

    After I change the ipcFrameInVideoPrm.baseCreateParams.inQueParams.prevLinkId to gVdisModuleContext.ipcFramesOutHostId, it gets the following error!

     

     [m3vpss ]  9759: NULL   : Create Done !!!
     [m3vpss ]  9760: NULL   : Create Done !!!
     [m3vpss ]  9761: IPC_FRAMES_OUT   : Create in progress !!!

     [host]  515: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_24] ...

     [host]  521: IPC_FRAMES_IN   : Create Done !!!

     [host]  521: IPC_FRAMES_OUT   : Create in progress !!!

     [host]  523: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  9763: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ]  9776: DISPLAY: Create in progress !!!
     [m3vpss ]  9778: DISPLAY: Create Done !!!
     [m3vpss ]  9779: DISPLAY: Create in progress !!!
     [m3vpss ]  9780: SYSTEM: Opening MsgQ [HOST_MSGQ] ...
     [m3video]  9791: IPC_FRAMES_IN   : Create in progress !!!
     [m3vpss ]  9790: DISPLAY: Create Done !!!
     [m3video]  9791: SYSTEM: Opening ListMP [HOST_IPC_OUT_23] ...
     [m3video]  9792: SYSTEM: Opening ListMP [HOST_IPC_IN_23] ...
     [m3video]  9794: SYSTEM: Opening MsgQ [HOST_MSGQ] ...
     [m3video] IPC_FRAMES_IN:HEAPID:0       USED:240
     [m3video]  9798: IPC_FRAMES_IN   : Create Done !!!
     [m3video]  9799: ENCODE: Create in progress ... !!!
     [m3video]  9800: Assertion @ Line: 1123 in links_m3video/iva_enc/encLink_common.c: pPrm->inQueParams.prevLinkQueId < pObj->inTskInfo.numQue : failed !!!

     

     

    It's very confuse for me. Why the ipnc rdk 3.2 do not have ipcFrameIn/OutLInk in M3Video? 

  • hi Badri , several days ago, I have asked you a question. Please take a look at the following.

    Meanwhile I have another question. In TI Multich_capturedisplay.c file,  YUV_FRAMES_TO_A8 mode, why the display_SD previous link id is gVcamModuleContext.ipcFramesInHostId?  That confuses me. I think display_SD previous link id should be  gVdisModuleContext.ipcFramesInVpssFromHostId.

  •     encPrm.inQueParams.prevLinkId = ipcInVideoId; - This is wrong. It should be ipcFrameInVideoId.

    I don't know about IPNC RDK to comment but the setting of  display_SD previous link id is gVcamModuleContext.ipcFramesInHostId is wrong. PrevLinkID of displayLink cannot be ipcFramesInHostId. Someone from IPNC team will provide the correct info.

  • hi Badri,

    Thank you very much. The issue is resolved.

    I can get the H264 video and A8 can also get the YUV image.

    Thanks again.

    I will move on the next step.

  • Hi Narayanan,

    I meet a new problem. When I send the two channel YUV frames to A8 with  the resolutions 1080I and D1, the two h264 streams work fine. However, when I change the resolution to 5Mega(2432X2048) and D1, the 5M h264 streams  couldn't work fine. When I connet the 5M h264 stream, VLC play the video stream ok for seconds, then the stream stops. It's very strange. But  the D1 h264 stream still work fine.  From the uart log information,  the two streams stills work and A8 get the two streams continuous.

    Everything seems ok except PC can't continuously get the 5M H264 stream under the above usecase.  Besides, i have check that 5M and D1 streams work ok under low power usecase.

    So can I send the 5Mega YUV to A8 ?  or something that I have to modify?  

    Please help me, thanks!

     

  • hi john  how can you get yuv image???

  • can you tell me how get yuv ?