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.

in the chain demo_vcap_vdis,there is no link runs on A8,how A8 recieve msg from M3 VPSS

in  the demo_vcap_vdis,i add my alg in the dsp

i want to send msg from M3 VPSS to A8,but in the demo_vcap_vdis,there is no LINK running on A8,

for example,i use API SystemLink_control API,it need a LINKid of the recieve core.

i need to send the phyaddr of every video frame from M3 VPSS to A8 when a new video frame comes in the M3 VPSS ipcframesout task. A8 get the phyaddr.

now how can i send msgs from M3 VPSS to A8 in the usecse of demo_vcap_vdis added with alg running on dsp.

thanks.best regards.

  • I am sorry I don't understand clearly.

    If you want to export video frames from M3 to A8 you should update the usecase to have

    ipcFramesOut (M3VPSS) -> ipcFramesIn (A8)

    If you only want to send some occasional msgs you can use

    System_linkControl( SYSTEM_LINK_ID_HOST,<event_id>,params)

    Refer /dvr_rdk/mcfw/src_bios6/links_m3video/iva_dec/decLink_h264.c System_linkControl SYSTEM_LINK_ID_HOST

    code for example

  •  

    thanks for your reply.best regards.

    my meaning is,i do not need to transport video frames from M3 VPSS to A8.

    my usecase is,vcap_vdis added alg runs on dsp,the link is M3 cap ->M3 nsf ->M3 dei ->M3 ipcframesout -> DSP ipcframesin ->DSP alg -> DSP ipcframesout -> M3 ipcframesin ->M3 merge ->M3 dup ->M3 swms -> M3 vdis.

    now i need to, in the M3 dup Link  send the every frame phyaddr to A8, A8 just to get the phyaddr,it do not need to transport the fames from dup Link to A8.but A8 need to get the phyaddr. 

    so i need to send a msg from dup Link to some Link running on A8.i have do a work in vdec_vdis,i just send a msg from M3ipcout Link to A8 Ipcbitsin Link use the API System_ipcMsgQSendMsg or System_linkControl, it is easy to do,because there is a Ipcbitsin Link running on A8. but now,there is no Link like Ipcbitsin or others running on A8. you say there is a  SYSTEM_LINK_ID_HOST Link running on A8, i have care about it ,and i have do my work,it just like it is correctly logically. but i have a question about the SYSTEM_LINK_ID_HOST Link.

    in the systemLink_tsk.c,the function SystemLink_tskMain ,it recieve msg different from other link:

    the first picture is the function SystemLink_tskMain:

            status = Utils_tskRecvMsg(pTsk, &pMsg, BIOS_WAIT_FOREVER);
            if (status != FVID2_SOK)
                break;

            cmd = Utils_msgGetCmd(pMsg);

            switch (cmd)
            {
                case SYSTEM_CMD_DELETE:
                    done = TRUE;
                    ackMsg = TRUE;
                    break;

     

    the second picturn is the function IpcBitsOutLink_tskMain in the ipcBitsOutLink_tsk.c file:

        SystemLink_Obj *pObj = (SystemLink_Obj*)pTsk->appData;
        Uint16 cmd = OSA_msgGetCmd(pMsg);

      if (SYSTEM_LINK_IS_SLAVE_CORE_EXCEPTION(cmd))
      {
       UInt procId = SYSTEM_LINK_SLAVE_CORE_EXCEPTION_MAP_CMD_TO_SYSTEMPROCID(cmd);

       OSA_assert(procId < SYSTEM_PROC_MAX);
       SystemLink_handleSlaveCoreException(pObj, procId);
      }
      else
      {
       if(pObj->eventHandler!=NULL)
       {
        status = pObj->eventHandler(
                        OSA_msgGetCmd(pMsg),
                        OSA_msgGetPrm(pMsg),
                        pObj->eventHandlerAppData
                        );
            }
      }

     

     

    first:
    you can see,in the IpcBitsOutLink_tskMain,it first execute this function status = OSA_tskWaitMsg(pTsk, &pMsg); in the above of while loop,then excute
    cmd = OSA_msgGetCmd(pMsg) this function to get the cmd.
    but in the function SystemLink_tskMain,it just excute Uint16 cmd = OSA_msgGetCmd(pMsg) to get the cmd without execute OSA_tskWaitMsg before get the cmd like above.
    why?

    second:
    i just do not know clearly about what it do in the function SystemLink_tskMain?

    thanks.best regards.

     

  • cherish said:
    first:
    you can see,in the IpcBitsOutLink_tskMain,it first execute this function status = OSA_tskWaitMsg(pTsk, &pMsg); in the above of while loop,then excute
    cmd = OSA_msgGetCmd(pMsg) this function to get the cmd.
    but in the function SystemLink_tskMain,it just excute Uint16 cmd = OSA_msgGetCmd(pMsg) to get the cmd without execute OSA_tskWaitMsg before get the cmd like above.
    why?

    SystemLink_tskMain will be invoked from OSA_tskThrMain which in turn blocks forever waiting for msg. Refer OSA_tskThrMain function.Similar logic is present in IpcBitsOutLink_tskMain. The only difference is after link create ,it will no longer return to OSA_tskThrMain function. Instead it will itself handle further msgs until linkDelete.

    second:
    i just do not know clearly about what it do in the function SystemLink_tskMain?

    You don't have to do anything in  SystemLink_tskMain. Add a new event and associated payload and when you get the msg , you will get a callback. Refer demo.c Demo_eventHandler for example on how other events are handled.

    My opinion is it is better to use  ipcFrameout ipcFrameIn as it will be better performance compared to sending a message for every frame.

     

     

  • usecase  vcap_venc_vdis  create thread; 

    /* Init the application specific module which will handle video frame exchange */
         VcapVenc_ipcFramesCreate(useCase);
         VcapVenc_ipcFramesInSetCbInfo();
     
    you can get yuv from Vpss, Ofcourse, you can change it to get yuv from Video.

    It's a better choose than MsgQ, I think.

  • my usecase is,vcap_vdis added alg runs on dsp,the link is M3 cap ->M3 nsf ->M3 dei ->M3 ipcframesout -> DSP ipcframesin ->DSP alg -> DSP ipcframesout -> M3 ipcframesin ->M3 merge ->M3 dup ->M3 swms -> M3 vdis. but i need to use A8 to transfer the frames to 6678 by pcie interface.but in the vcap_vdis ,there is no link configured by use runs on A8,there is just a SYSTEM_LINK_ID_HOST link ,but when i send msg from M3 VPSS DUP link to SYSTEM_LINK_ID_HOST link,in the SYSTEM_LINK_ID_HOST link tskmain function ,it can not get the msg from M3 VPSS,why? ?

    another question,if above can not work,is there other solution, A8 get the fames from M3 VPSS,A8 thansfer frames to 6678 by pcie,after process,then A8 transfer frame to M3. base on the above link case,i have make a new link case, M3 cap ->M3 nsf ->M3 dei ->M3 ipcframesout -> DSP ipcframesin ->DSP alg -> DSP ipcframesout -> M3 ipcframesin ->M3 merge ->M3 dup ->M3 ipcframesout (processlinkid=A8 ipcframein)-> M3 swms -> M3 vdis. as:

    ipcFramesOutVpssPrm[1].baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.swMsId[0];

    ipcFramesOutVpssPrm[1].baseCreateParams.processLink = gVcapModuleContext.ipcFramesInHostId;

    can i do like this??

    best regards.help hearing from you.

  • and i have added a  A8 ipcframesout link base on the original link case,A8 ipcframesout is just a empty link,the prelink is valid ,the nextlink is a other link which do not exit in my case,i just use the A8 ipcframesout link,to get the msg from M3 VPSS,M3 VPSS send the phyaddr of frames to the A8 link,A8 use the phyaddr to transfer the frames to 6678 by pcie.but the A8 link can not get the msg.i want to know why it can not get msg,why it can not work?

    best regards.

  • Pls  share  your code for sending and receiving msg. There is no need to send msg. You can connect ipcFramesIn->ipcFramesOutHost and receive the frame physical address.

  • Your suggestion of doing below will work and is the best approach compared to tryng to send msgs,

    ipcFramesOutVpssPrm[1].baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.swMsId[0];

    ipcFramesOutVpssPrm[1].baseCreateParams.processLink = gVcapModuleContext.ipcFramesInHostId;

  • not to send msg ,but i need to frames to vpss after a 8 transfer it to 6678 and get frames back 。