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.

8168 no videos

Other Parts Discussed in Thread: TVP5158

#include <demos/link_api_demos/common/chains.h>
#include <mcfw/interfaces/ti_venc.h>
#include <demos/link_api_demos/common/chains_ipcFrames.h>

static SystemVideo_Ivahd2ChMap_Tbl systemVid_encDecIvaChMapTbl =
{
.isPopulated = 1,
.ivaMap[0] =
{
.EncNumCh = 10,
.EncChList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0 , 0, 0},
.DecNumCh = 0,
.DecChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
.ivaMap[1] =
{
.EncNumCh = 0,
.EncChList = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
.DecNumCh = 12,
.DecChList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0 , 0, 0},
},
.ivaMap[2] =
{
.EncNumCh = 6,
.EncChList = {10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.DecNumCh = 4,
.DecChList = {12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
};

Void Chains_singleChCapEncSend(Chains_Ctrl *chainsCfg)
{
CaptureLink_CreateParams capturePrm;
CaptureLink_VipInstParams *pCaptureInstPrm;
CaptureLink_OutParams *pCaptureOutPrm;

IpcFramesOutLinkRTOS_CreateParams ipcFramesOutVpssPrm;
IpcFramesInLinkHLOS_CreateParams ipcFramesInDspPrm;
DisplayLink_CreateParams displayPrm;
AlgLink_CreateParams osdPrm;

UInt32 captureId;
UInt32 vipInstId;

UInt32 ipcFramesOutVpssId;
UInt32 ipcFramesInDspId;
UInt32 osdId;
UInt32 displayId;

UInt32 i = 0;
// char ch;


Chains_ipcFramesInit();

CHAINS_INIT_STRUCT(CaptureLink_CreateParams, capturePrm);
CHAINS_INIT_STRUCT(DisplayLink_CreateParams, displayPrm);
CHAINS_INIT_STRUCT(IpcFramesOutLinkRTOS_CreateParams, ipcFramesOutVpssPrm);
CHAINS_INIT_STRUCT(IpcFramesInLinkHLOS_CreateParams, ipcFramesInDspPrm);
CHAINS_INIT_STRUCT(AlgLink_CreateParams,osdPrm);

CHAINS_INIT_STRUCT(DisplayLink_CreateParams, displayPrm);
;


captureId = SYSTEM_LINK_ID_CAPTURE;

ipcFramesOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0;


ipcFramesInDspId = SYSTEM_DSP_LINK_ID_IPC_FRAMES_IN_0;
osdId = SYSTEM_DSP_LINK_ID_ALG_0;

displayId = SYSTEM_LINK_ID_DISPLAY_0;

System_linkControl(
SYSTEM_LINK_ID_M3VIDEO,
SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL,
&systemVid_encDecIvaChMapTbl,
sizeof(SystemVideo_Ivahd2ChMap_Tbl),
TRUE
);

capturePrm.numVipInst = 1;
capturePrm.tilerEnable = FALSE;
capturePrm.numBufsPerCh = 16;//CAPTURE_LINK_NUM_BUFS_PER_CH_DEFAULT;
capturePrm.numExtraBufs = 0;
capturePrm.maxBlindAreasPerCh = 0;
capturePrm.isPalMode = FALSE;
capturePrm.enableSdCrop = FALSE;
capturePrm.doCropInCapture = FALSE;

for(vipInstId=0; vipInstId<capturePrm.numVipInst; vipInstId++)
{
pCaptureInstPrm = &capturePrm.vipInst[vipInstId];
pCaptureInstPrm->vipInstId = (SYSTEM_CAPTURE_INST_VIP0_PORTA+vipInstId*2)%SYSTEM_CAPTURE_INST_MAX;
pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_SII9233A_DRV;
pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;
pCaptureInstPrm->standard = chainsCfg->displayRes[vipInstId];
pCaptureInstPrm->numOutput = 1;
pCaptureInstPrm->numChPerOutput = 1;
pCaptureInstPrm->frameCaptureMode = FALSE;
pCaptureInstPrm->fieldsMerged = FALSE;
if (Chains_IsInterlaced(chainsCfg->displayRes[0])) {
pCaptureInstPrm->frameCaptureMode = TRUE;
pCaptureInstPrm->fieldsMerged = TRUE;
}

pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422I_YUYV;
pCaptureOutPrm->scEnable = FALSE;
pCaptureOutPrm->scOutWidth = chainsCfg->channelConf[vipInstId].width;
pCaptureOutPrm->scOutHeight = chainsCfg->channelConf[vipInstId].height;
pCaptureOutPrm->outQueId = 0;
}
capturePrm.outQueParams[0].nextLink = ipcFramesOutVpssId;

System_linkCreate(captureId, &capturePrm, sizeof(capturePrm));
chainsCfg->displayRes[0] = capturePrm.vipInst[0].standard;
Vsys_getResSize(chainsCfg->displayRes[0], &chainsCfg->channelConf[0].width, &chainsCfg->channelConf[0].height);
Vsys_getResRate(chainsCfg->displayRes[0], &chainsCfg->channelConf[0].frameRate);

ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkId = captureId;
ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesOutVpssPrm.baseCreateParams.notifyPrevLink = TRUE;
ipcFramesOutVpssPrm.baseCreateParams.numOutQue =1;
ipcFramesOutVpssPrm.baseCreateParams.outQueParams[0].nextLink= displayId;
ipcFramesOutVpssPrm.baseCreateParams.processLink = ipcFramesInDspId;
ipcFramesOutVpssPrm.baseCreateParams.notifyProcessLink = FALSE;
ipcFramesOutVpssPrm.baseCreateParams.notifyNextLink = TRUE;
ipcFramesOutVpssPrm.baseCreateParams.noNotifyMode = TRUE;

ipcFramesInDspPrm.baseCreateParams.inQueParams.prevLinkId =ipcFramesOutVpssId;
ipcFramesInDspPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesInDspPrm.baseCreateParams.numOutQue = 1;
ipcFramesInDspPrm.baseCreateParams.outQueParams[0].nextLink = osdId;
ipcFramesInDspPrm.baseCreateParams.notifyNextLink =TRUE;
ipcFramesInDspPrm.baseCreateParams.notifyPrevLink = FALSE;
ipcFramesInDspPrm.baseCreateParams.noNotifyMode = TRUE;

osdPrm.inQueParams.prevLinkId = ipcFramesInDspId;
osdPrm.inQueParams.prevLinkQueId = 0;
osdPrm.enableOSDAlg = TRUE;
osdPrm.enableSCDAlg = FALSE;
AlgLink_OsdChWinParams *chWinPrm=&osdPrm.osdChCreateParams[0].chDefaultParams;
osdPrm.osdChCreateParams[0].maxHeight =64;
osdPrm.osdChCreateParams[0].maxWidth =320
chWinPrm->chId =0 ;
chWinPrm->numWindows =0;


displayPrm.inQueParams[0].prevLinkId = ipcFramesOutVpssId;
displayPrm.inQueParams[0].prevLinkQueId = 0;
displayPrm.displayRes=chainsCfg->displayRes[0];


Chains_displayCtrlInit(chainsCfg->displayRes);


System_linkCreate(ipcFramesOutVpssId,&ipcFramesOutVpssPrm,sizeof(ipcFramesOutVpssPrm));

System_linkCreate(ipcFramesInDspId,&ipcFramesInDspPrm,sizeof(ipcFramesInDspPrm));
System_linkCreate(osdId,&osdPrm,sizeof(osdPrm));
System_linkCreate(displayId,&displayPrm,sizeof(displayPrm));

Chains_memPrintHeapStatus();

{
System_linkStart(displayId);
System_linkStart(osdId);
System_linkStart(ipcFramesInDspId);
System_linkStart(ipcFramesOutVpssId);



System_linkStart(captureId);
/*
while(1)
{
ch = Chains_menuRunTime();
if(ch=='0')
break;
if(ch=='v')
System_linkControl(captureId, CAPTURE_LINK_CMD_FORCE_RESET, NULL, 0, TRUE);
if(ch=='p')
System_linkControl(captureId, CAPTURE_LINK_CMD_PRINT_ADV_STATISTICS, NULL, 0, TRUE);
}
*/
//´Ë´ÎÌí¼Ó´úÂëÔÚÐèÒªµÄʱֹͣ³ÌÐò
/*
while(1)
{
;
}
*/
sleep(100);
System_linkStop(captureId);

System_linkStart(ipcFramesOutVpssId);
System_linkStop(ipcFramesInDspId);
System_linkStop(osdId);

System_linkStop(displayId);

Chains_ipcFramesStop();
}

System_linkDelete(captureId);

System_linkDelete(ipcFramesOutVpssId);
System_linkDelete(ipcFramesInDspId);
System_linkDelete(osdId);
System_linkDelete(displayId);

Chains_ipcFramesExit();
}

steps :   capture--->ipcframesoutvpss------(processlink)---->ipcframesinDsp----->osd

                                   ipcframesoutvpss------(nextlink)---------->display

but there is no video on TV, screen is black.

  • What SDK are you using ? This does not look like DVR RDK. Your usecase looks correct. One bug is below which you have to fix:

    CHAINS_INIT_STRUCT(IpcFramesInLinkHLOS_CreateParams, ipcFramesInDspPrm);

    this should be

    CHAINS_INIT_STRUCT(IpcFramesInLinkRTOS_CreateParams, ipcFramesInDspPrm);

    Pls print statistics for captureLink,ipcFramesOutLink,dspLink and display link and share the log.

    Also share full log from application start time.

  • Thank you for your advice. I use the DVRRKD_03.00.00.00. 

    This is the statistics :


    root@dm816x:~# Play this stream using the URL "rtsp://192.168.1.8:8562/testStrea
    m"
    Beginning streaming...
    Play this stream using the URL "rtsp://192.168.1.8:8560/testStream"
    Beginning streaming...
    Play this stream using the URL "rtsp://192.168.1.8:8558/testStream"
    Beginning streaming...
    Play this stream using the URL "rtsp://192.168.1.8:8564/testStream"
    Beginning streaming...

    *** Bootargs Validated for mem param ***
    *** Bootargs Validated for notifyk.vpssm3 params ***
    Kernel bootargs validated
    numid=1,iface=MIXER,name='PCM Playback Volume'
    ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
    : values=127,127
    | dBscale-min=-63.50dB,step=0.50dB,mute=0
    SysLink version : 2.10.02.17
    SysLink module created on Date:Nov 10 2012 Time:03:42:20
    Trace enabled
    Trace SetFailureReason enabled
    [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
    [m3video] Remote Debug Shared Memory @ 0xbf005020
    [m3vpss ] Remote Debug Shared Memory @ 0xbf00a040
    Setting DMM priority for [DUCATI ] to [0] ( 0x4e000624 = 0x08000000 )
    Setting DMM priority for [HDVICP0 ] to [2] ( 0x4e000634 = 0x0000000a )
    Setting DMM priority for [HDVICP1 ] to [2] ( 0x4e000634 = 0x000a0000 )
    Setting DMM priority for [HDVICP2 ] to [2] ( 0x4e000634 = 0x00a00000 )

    *** TVP5158 probe : START ***

    TI VS EVM : TVP5158 device address : 0x58, 0x5a, 0x5c, 0x5e
    TI DVR : TVP5158 device address : 0x5c, 0x5d, 0x5e, 0x5f

    Device found : I2C (0xXX): 0x08 = 0x51
    I2C (0xXX): 0x09 = 0x58

    Device NOT found : I2C (0xXX): Read ERROR !!! (reg[0x08], count = 2)

    I2C (0x58): Read ERROR !!! (reg[0x08], count = 2)
    I2C (0x5a): Read ERROR !!! (reg[0x08], count = 2)
    I2C (0x5c): Read ERROR !!! (reg[0x08], count = 2)
    I2C (0x5d): Read ERROR !!! (reg[0x08], count = 2)
    I2C (0x5e): Read ERROR !!! (reg[0x08], count = 2)
    I2C (0x5f): Read ERROR !!! (reg[0x08], count = 2)

    *** TVP5158 probe : END ***

    Attached to slave procId 2.
    Loaded file ../firmware/dvr_rdk_fw_m3vpss.xem3 on slave procId 2.
    Started slave procId 2.
    After Ipc_loadcallback status [0x00000000]
    [m3vpss ] ***** SYSTEM : Frequency <ORG> - 250000000, <NEW> - 280000000
    [m3vpss ] notify_attach rtnVal 0
    [m3vpss ] initProxyServer rtnVal 0
    [m3vpss ]
    [m3vpss ] *** UTILS: CPU KHz = 560000 Khz ***
    [m3vpss ]
    [m3vpss ] 44: SYSTEM : System Common Init in progress !!!
    [m3vpss ] 44: SYSTEM: IPC init in progress !!!
    [m3vpss ] 44: SYSTEM: Attaching to [HOST] ...
    [m3vpss ] 1043: SYSTEM: Attaching to [HOST] ...
    [m3vpss ] 1045: SYSTEM: Attaching to [HOST] ... SUCCESS !!!
    [m3vpss ] 1045: SYSTEM: Attaching to [DSP] ...
    After Ipc_startcallback status [0x097d2000]
    Attached to slave procId 1.
    Loaded file ../firmware/dvr_rdk_fw_m3video.xem3 on slave procId 1.
    Started slave procId 1.
    After Ipc_loadcallback status [0x00000000]
    [m3video] ***** SYSTEM : Frequency <ORG> - 250000000, <NEW> - 280000000
    [m3vpss ] 2045: SYSTEM: Attaching to [DSP] ...
    [m3video]
    [m3video] *** UTILS: CPU KHz = 560000 Khz ***
    [m3video]
    [m3video] 1284: SYSTEM : System Common Init in progress !!!
    [m3video] 1284: SYSTEM: IPC init in progress !!!
    [m3video] 1284: SYSTEM: Attaching to [HOST] ...
    [m3video] 2283: SYSTEM: Attaching to [HOST] ...
    [m3video] 2286: SYSTEM: Attaching to [HOST] ... SUCCESS !!!
    [m3video] 2286: SYSTEM: Attaching to [DSP] ...
    After Ipc_startcallback status [0x00000000]
    Attached to slave procId 0.
    Loaded file ../firmware/dvr_rdk_fw_c6xdsp.xe674 on slave procId 0.
    Started slave procId 0.
    After Ipc_loadcallback status [0x00000000]
    [c6xdsp ] ***** SYSTEM : Frequency <ORG> - 800000000, <NEW> - 800000000
    [m3video] 3285: SYSTEM: Attaching to [DSP] ...
    [m3vpss ] 3045: SYSTEM: Attaching to [DSP] ...
    [c6xdsp ]
    [c6xdsp ] *** UTILS: CPU KHz = 800000 Khz ***
    [c6xdsp ]
    [c6xdsp ] 5: SYSTEM : System Common Init in progress !!!
    [c6xdsp ] 5: SYSTEM: IPC init in progress !!!
    [c6xdsp ] 5: SYSTEM: Attaching to [HOST] ...
    [c6xdsp ] 1029: SYSTEM: Attaching to [HOST] ...
    [c6xdsp ] 1031: SYSTEM: AttacDMA: Module install successful, device major num
    = 250
    hing to [HOST] .DRV: Module install successful
    .. SUCCESS !!!
    DRV: Module built on Nov 15 2012 02:28:10
    [c6xdsp ] 1032: SYSTEM: Attaching to [VIDEO-M3] ...
    After Ipc_startcallback status [0x00000000]
    [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
    [m3video] Remote Debug Shared Memory @ 0xbf005020
    [m3vpss ] Remote Debug Shared Memory @ 0xbf00a040
    [m3vpss ] 4045: SYSTEM: Attaching to [DSP] ...
    [m3video] 4285: SYSTEM: Attaching to [DSP] ...
    [c6xdsp ] 2055: SYSTEM: Attaching to [VIDEO-M3] ...
    [m3vpss ] 5045: SYSTEM: Attaching to [DSP] ...
    [c6xdsp ] 2908: SYSTEM: Attaching to [VIDEO-M3] ... SUCCESS !!!
    [m3video] 5285: SYSTEM: Attaching to [DSP] ...
    [c6xdsp ] 2908: SYSTEM: Attaching to [VPSS-M3] ...
    [m3video] 5286: SYSTEM: Attaching to [DSP] ... SUCCESS !!!
    [m3video] 5286: SYSTEM: Attaching to [VPSS-M3] ...
    [m3vpss ] 6045: SYSTEM: Attaching to [DSP] ...
    [m3video] 6285: SYSTEM: Attaching to [VPSS-M3] ...
    [c6xdsp ] 3931: SYSTEM: Attaching to [VPSS-M3] ...
    [c6xdsp ] 4697: SYSTEM: Attaching to [VPSS-M3] ... SUCCESS !!!
    [m3vpss ] 7045: SYSTEM: Attaching to [DSP] ...
    [c6xdsp ] 4697: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
    [m3vpss ] 7046: SYSTEM: Attaching to [DSP] ... SUCCESS !!!
    [m3vpss ] 7046: SYSTEM: Attaching to [VIDEO-M3] ...
    [m3video] 7285: SYSTEM: Attaching to [VPSS-M3] ...
    [m3video] 8046: SYSTEM: Attaching to [VPSS-M3] ... SUCCESS !!!
    [m3vpss ] 8045: SYSTEM: Attaching to [VIDEO-M3] ...
    [m3video] 8046: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
    [m3vpss ] 8046: SYSTEM: Attaching to [VIDEO-M3] ... SUCCESS !!!
    [m3video] 8046: SYSTEM: Creating MsgQ [VIDEO-M3_MSGQ] ...
    [m3vpss ] 8046: SYSTEM: Creating MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
    [m3video] 8046: SYSTEM: Creating MsgQ [VIDEO-M3_ACK_MSGQ] ...
    [m3vpss ] 8046: SYSTEM: Creating MsgQ [VPSS-M3_MSGQ] ...
    [m3video] 8048: SYSTEM: Notify register to [HOST] line 0, event 15 ...
    [m3vpss ] 8046: SYSTEM: Creating MsgQ [VPSS-M3_ACK_MSGQ] ...
    [m3video] 8048: SYSTEM: Notify register to [DSP] line 0, event 15 ...
    [m3vpss ] 8048: SYSTEM: Notify register to [HOST] line 0, event 15 ...
    [m3video] 8048: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ...
    [m3vpss ] 8048: SYSTEM: Notify register to [DSP] line 0, event 15 ...
    [m3video] 8049: SYSTEM: IPC init DONE !!!
    [m3vpss ] 8048: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ...
    [m3vpss ] 8048: SYSTEM: IPC init DONE !!!
    [c6xdsp ] 5720: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
    [m3video] 8055: MEM: Shared Region 2: Base = 0xb0000000, Length = 0x0e9c0000 (
    233 MB)
    [m3vpss ] 8055: MEM: Shared Region 2: Base = 0xb0000000, Length = 0x0e9c0000 (
    233 MB)
    [c6xdsp ] 5721: SYSTEM: Creating MsgQ [DSP_MSGQ] ...
    [m3video] 8055: MEM: Shared Region 1: Base = 0x88000000, Length = 0x15080000 (
    336 MB)
    [m3vpss ] 8055: MEM: Shared Region 1: Base = 0x88000000, Length = 0x15080000 (
    336 MB)
    [c6xdsp ] 5721: SYSTEM: Creating MsgQ [DSP_ACK_MSGQ] ...
    [m3video] 8057: SYSTEM : System Common Init Done !!!
    [m3vpss ] 8057: SYSTEM : System Common Init Done !!!
    [c6xdsp ] 5721: SYSTEM: Notify register to [HOST] line 0, event 15 ...
    [m3video] 8057: SYSTEM : System Video Init in progress !!!
    [m3vpss ] 8057: SYSTEM : System VPSS Init in progress !!!
    [c6xdsp ] 5721: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ...
    [m3video] 8057: SYSTEM : System Video Init Done !!!
    [c6xdsp ] 5721: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ...
    [m3video] 8058: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_0] in region 0 ...
    [c6xdsp ] 5721: SYSTEM: IPC init DONE !!!
    [m3video] 8058: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_0] in region 0 ...
    [c6xdsp ] 5723: MEM: Shared Region 2: Base = 0xb0000000, Length = 0x0e9c0000 (
    233 MB)
    [m3video] 8058: SYSTEM: ListElem Shared Addr = 0xbf18b680
    [m3vpss ] === HDVPSS Clocks are enabled ===
    [c6xdsp ] 5723: MEM: Shared Region 1: Base = 0x88000000, Length = 0x15080000 (
    336 MB)
    [c6xdsp ] 5724: SYSTEM : System Common Init Done !!!
    [m3vpss ] === HDVPSS is fully functional ===
    [c6xdsp ] 5586: SYSTEM : System DSP Init in progress !!!
    [c6xdsp ] 5586: SYSTEM : RpeServer_init() done... Ret Val 0!!!
    [m3vpss ] === HDVPSS module is not in standby ===
    [c6xdsp ] 5728: SYSTEM: Creating ListMP [DSP_IPC_OUT_19] in region 0 ...
    [c6xdsp ] 5728: SYSTEM: Creating ListMP [DSP_IPC_IN_19] in region 0 ...
    [m3video] 8060: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_1] in region 0 ...
    [m3vpss ] === I2C1 Clk is active ===
    [c6xdsp ] 5728: SYSTEM: ListElem Shared Addr = 0xbf18eb80
    [m3video] 8060: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_1] in region 0 ...
    [m3vpss ] 8062: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_0] in region 0 ...
    [c6xdsp ] 5729: SYSTEM: Creating ListMP [DSP_IPC_OUT_20] in region 0 ...
    [m3video] 8060: SYSTEM: ListElem Shared Addr = 0xbf1ae580
    [m3vpss ] 8062: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_0] in region 0 ...
    [c6xdsp ] 5729: SYSTEM: Creating ListMP [DSP_IPC_IN_20] in region 0 ...
    [m3video] 8066: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_19] in region 0 ...
    [m3vpss ] 8062: SYSTEM: ListElem Shared Addr = 0xbf1f0e80
    [c6xdsp ] 5729: SYSTEM: ListElem Shared Addr = 0xbf1b1a80
    [m3video] 8066: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_19] in region 0 ...
    [m3vpss ] 8064: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_1] in region 0 ...
    [c6xdsp ] 5730: SYSTEM: Creating ListMP [DSP_IPC_OUT_21] in region 0 ...
    [m3video] 8066: SYSTEM: ListElem Shared Addr = 0xbf232e80
    [m3vpss ] 8064: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_1] in region 0 ...
    [c6xdsp ] 5730: SYSTEM: Creating ListMP [DSP_IPC_IN_21] in region 0 ...
    [m3video] 8068: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_20] in region 0 ...
    [m3vpss ] 8065: SYSTEM: ListElem Shared Addr = 0xbf22f980
    [c6xdsp ] 5730: SYSTEM: ListElem Shared Addr = 0xbf1d1700
    [m3video] 8068: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_20] in region 0 ...
    [m3vpss ] 8076: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_19] in region 0 ...
    [c6xdsp ] 5731: SYSTEM: Creating ListMP [DSP_IPC_OUT_24] in region 0 ...
    [m3video] 8068: SYSTEM: ListElem Shared Addr = 0xbf252880
    [m3vpss ] 8076: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_19] in region 0 ...
    [c6xdsp ] 5731: SYSTEM: Creating ListMP [DSP_IPC_IN_24] in region 0 ...
    [m3video] 8070: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_21] in region 0 ...
    [m3vpss ] 8076: SYSTEM: ListElem Shared Addr = 0xbf291c80
    [c6xdsp ] 5731: SYSTEM: ListElem Shared Addr = 0xbf1f4380
    [m3video] 8071: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_21] in region 0 ...
    [m3vpss ] 8078: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_20] in region 0 ...
    [c6xdsp ] 5732: SYSTEM: Creating ListMP [DSP_IPC_OUT_25] in region 0 ...
    [m3video] 8071: SYSTEM: ListElem Shared Addr = 0xbf272280
    [m3vpss ] 8079: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_20] in region 0 ...
    [c6xdsp ] 5732: SYSTEM: Creating ListMP [DSP_IPC_IN_25] in region 0 ...
    [m3video] 8082: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_24] in region 0 ...
    [m3vpss ] 8079: SYSTEM: ListElem Shared Addr = 0xbf2b1680
    [c6xdsp ] 5732: SYSTEM: ListElem Shared Addr = 0xbf211e80
    [m3video] 8082: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_24] in region 0 ...
    [m3vpss ] 8081: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_21] in region 0 ...
    [c6xdsp ] !!WARNING.Resource already registered:2
    [c6xdsp ] 5594: SYSTEM : Initializing Links !!!
    [m3video] 8082: SYSTEM: ListElem Shared Addr = 0xbf2f0a80
    [m3vpss ] 8081: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_21] in region 0 ...
    [m3video] 8084: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_25] in region 0 ...
    [m3vpss ] 8081: SYSTEM: ListElem Shared Addr = 0xbf2d1080
    [c6xdsp ] 5733: SYSTEM : FREE SPACE : System Heap = 10268448 B, Mbx = 10
    240 msgs)
    [m3video] 8084: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_25] in region 0 ...
    [m3vpss ] 8083: SYSTEM : HDVPSS Drivers Version: HDVPSS_01_00_01_37
    [m3video] 8084: SYSTEM: ListElem Shared Addr = 0xbf30e580
    [m3vpss ] 8083: SYSTEM : FVID2 Init in progress !!!
    [c6xdsp ] 5607: SYSTEM : Initializing Links ... DONE !!!
    [m3video] 8086: HDVICP: Doing PRCM for IVAHD[0] ...
    [m3vpss ] 8139: SYSTEM : FVID2 Init in progress DONE !!!
    [m3video] 8086: HDVICP: PRCM for IVAHD[0] ... DONE.
    [m3vpss ] 8139: SYSTEM : Device Init in progress !!!
    [c6xdsp ] 5607: SYSTEM : System DSP Init Done !!!
    [m3video] 8086: HDVICP: Doing PRCM for IVAHD[1] ...
    [m3video] 8086: HDVICP: PRCM for IVAHD[1] ... DONE.
    [m3vpss ] initPrms.isI2cInitReq = 1
    [m3video] 8086: HDVICP: Doing PRCM for IVAHD[2] ...
    [m3video] 8087: HDVICP: PRCM for IVAHD[2] ... DONE.
    [m3vpss ] initPrms.isI2cInitReq = 1
    [m3video] 8087: SYSTEM : Initializing Links !!!
    [m3video] 8087: SYSTEM : FREE SPACE : System Heap = 6280232 B, Mbx = 102
    40 msgs)
    [m3video] 8087: SYSTEM : FREE SPACE : SR0 Heap = 13452672 B (12 MB)
    [m3video] 8087: SYSTEM : FREE SPACE : Frame Buffer = 245104512 B (233 MB)

    [m3video] 8088: SYSTEM : FREE SPACE : Bitstream Buffer = 352845696 B (336 MB)

    [m3video] 8088: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
    [m3video] 8088: SYSTEM : FREE SPACE : Tiler 8-bit = 134217728 B (128 MB)
    - TILER ON
    [m3video] 8089: SYSTEM : FREE SPACE : Tiler 16-bit = 134217728 B (128 MB)
    - TILER ON
    [m3video] 8110: SYSTEM : Initializing Links ... DONE !!!
    [m3vpss ] I2C1: Passed for address 0x30 !!!
    [m3vpss ] I2C1: Passed for address 0x31 !!!
    [m3vpss ] I2C1: Passed for address 0x32 !!!
    [m3vpss ] I2C1: Passed for address 0x34 !!!
    [m3vpss ] I2C1: Passed for address 0x35 !!!
    [m3vpss ] I2C1: Passed for address 0x39 !!!
    [m3vpss ] I2C1: Passed for address 0x3d !!!
    [m3vpss ] I2C1: Passed for address 0x48 !!!
    [m3vpss ] I2C1: Passed for address 0x60 !!!
    [m3vpss ] I2C1: Passed for address 0x68 !!!
    [m3vpss ] I2C1: Passed for address 0x70 !!!
    [m3vpss ] I2C1: Passed for address 0x73 !!!
    [m3vpss ] 10602: SYSTEM : Device Init in progress DONE !!!
    [m3vpss ] 10723: SYSTEM : System VPSS Init Done !!!
    [m3vpss ] 10723: UTILS: DMA: HWI Create for INT63 !!!
    [m3vpss ] 10724: SYSTEM : Initializing Links !!!
    [m3vpss ] 10724: SYSTEM : FREE SPACE : System Heap = 12488 B, Mbx = 1024
    0 msgs)
    [m3vpss ] 10724: SYSTEM : FREE SPACE : SR0 Heap = 13452672 B (12 MB)

    [m3vpss ] 10724: SYSTEM : FREE SPACE : Frame Buffer = 240794496 B (229 MB
    )
    [m3vpss ] 10724: SYSTEM : FREE SPACE : Bitstream Buffer = 352845696 B (336 MB
    )
    [m3vpss ] 10724: SYSTEM : FREE SPACE : Tiler 8-bit = 134217728 B (128 MB
    ) - TILER ON
    [m3vpss ] 10724: SYSTEM : FREE SPACE : Tiler 16-bit = 134217728 B (128 MB
    ) - TILER ON
    [m3vpss ] Received character 's'
    [m3vpss ] 10808: SYSTEM : Initializing Links ... DONE !!!
    [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
    [m3video] Remote Debug Shared Memory @ 0xbf005020
    [m3vpss ] Remote Debug Shared Memory @ 0xbf00a040
    [m3video] Received character 's'
    [m3vpss ] 10808: SYSTEM : Set Static L3 pressure for HDVPSS as High
    [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
    [m3video] Remote Debug Shared Memory @ 0xbf005020
    [m3vpss ] Remote Debug Shared Memory @ 0xbf00a040
    [c6xdsp ] Received character 's'
    /opt/dvr_rdk/ti816x
    [module] vpss probe done.
    [module] ti81xxfb probe done.
    HDMI W1 rev 2.0
    [module] ti81xx_hdmi probe done.
    cd
    ORG 0x46c00524: 0
    NEW 0x46c00524: 2

    0: SYSTEM: System Common Init in progress !!!
    0: SYSTEM: IPC init in progress !!!
    22: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
    24: SYSTEM: Creating MsgQ [HOST_MSGQ] ...
    25: SYSTEM: Creating MsgQ [HOST_ACK_MSGQ] ...
    27: SYSTEM: Opening MsgQ [DSP_MSGQ] ...
    27: SYSTEM: Opening MsgQ [VIDEO-M3_MSGQ] ...
    28: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
    29: SYSTEM: Notify register to [DSP] line 0, event 15 ...
    29: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ...
    30: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ...
    30: SYSTEM: IPC init DONE !!!
    31: SYSTEM: Creating ListMP [HOST_IPC_OUT_24] in region 0 ...
    33: SYSTEM: Creating ListMP [HOST_IPC_IN_24] in region 0 ...
    35: SYSTEM: ListElem Shared Addr = 0x2b103080
    36: SYSTEM: Creating ListMP [HOST_IPC_OUT_25] in region 0 ...
    38: SYSTEM: Creating ListMP [HOST_IPC_IN_25] in region 0 ...
    40: SYSTEM: ListElem Shared Addr = 0x2b120b80
    41: SYSTEM: Creating ListMP [HOST_IPC_OUT_19] in region 0 ...
    44: SYSTEM: Creating ListMP [HOST_IPC_IN_19] in region 0 ...
    45: SYSTEM: ListElem Shared Addr = 0x2b13e680
    46: SYSTEM: Creating ListMP [HOST_IPC_OUT_20] in region 0 ...
    48: SYSTEM: Creating ListMP [HOST_IPC_IN_20] in region 0 ...
    50: SYSTEM: ListElem Shared Addr = 0x2b15e080
    51: SYSTEM: Creating ListMP [HOST_IPC_OUT_21] in region 0 ...
    54: SYSTEM: Creating ListMP [HOST_IPC_IN_21] in region 0 ...
    55: SYSTEM: ListElem Shared Addr = 0x2b17da80
    72: SYSTEM: System Common Init Done !!!
    92: CHAINS : CPU Revision [ES2.0] !!!
    92: CHAINS : Detected [2x SII9233A, 1x SII9022A ETV] Board !!!
    92: CHAINS : Base Board Revision [REV A] !!!
    92: CHAINS : Daughter Card Revision [REV A] !!!

    [host] CHAINS_IPCFRAMES:Chains_ipcFramesSendRecvFxn:Entered... [m3vpss ] 64434
    : CAPTURE: Create in progress !!!
    [m3vpss ] 64466: CAPTURE: VIP0 PortA capture mode is [16-bit, Non-mux Embedded
    Sync] !!!
    [m3vpss ] 64789: CAPTURE: VIP0 PortA VID DEC 1027 (0x30): 9233:0033:0001
    [m3vpss ] UTILS: DMA: Allocated CH (TCC) = 58 (58)
    [m3vpss ] CAPTURE::HEAPID:0 USED:448
    [m3vpss ] CAPTURE::HEAPID:4 USED:70963200
    [m3vpss ] 64790: CAPTURE: Create Done !!!
    [m3vpss ] 64947: HDMI: Starting HDMI Transmitter ... !!!
    [c6xdsp ] 63565: IPC_FRAMES_IN : Create in progress !!!
    [m3vpss ] 64957: HDMI: HDMI Config ... DONE !!!
    [c6xdsp ] 63565: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_19] ...
    [m3vpss ] 64957: HDMI: Starting HDMI Transmitter ... DONE !!!
    [c6xdsp ] 63565: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_19] ...
    [m3vpss ] 64957: IPC_FRAMES_OUT : Create in progress !!!
    [c6xdsp ] 63566: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
    [m3vpss ] 64959: IPC_FRAMES_OUT : Create Done !!!
    [c6xdsp ] IPC_FRAMES_IN:HEAPID:0 USED:304
    [m3vpss ] 64973: DISPLAY: Create in progress !!!
    [c6xdsp ] 63567: IPC_FRAMES_IN : Create Done !!!
    [m3vpss ] 64974: DISPLAY: Create Done !!!
    [c6xdsp ] 63569: ALG : Create in progress !!!
    [m3vpss ] 64975: DISPLAY: Start in progress !!!
    [c6xdsp ] ALGLINK:HEAPID:0 USED:2616
    [c6xdsp ] ALGLINK:HEAPID:1 USED:5904
    [c6xdsp ] 63576: ALG : Create Done !!!
    [m3vpss ] 65014: DISPLAY: Start Done !!!
    [m3vpss ] 65014: DISPLAY: HDDAC(BP0) : 51 fps, Latency (Min / Max) = ( 255 / 0
    ), Callback Interval (Min / Max) = ( 255 / 0 ) !!!
    [m3vpss ] 65014: DISPLAY: UNDERFLOW COUNT: HDMI(BP0) 0, HDDAC(BP0) 0, DVO2(BP1
    ) 0, SDDAC(SEC1) 1
    [m3vpss ] 65014: SYSTEM : FREE SPACE : System Heap = 6328 B, Mbx = 10239
    msgs)
    [m3vpss ] 65014: CAPTURE: Start in progress !!!
    [m3vpss ] 65014: SYSTEM : FREE SPACE : SR0 Heap = 11003648 B (10 MB)

    [m3vpss ] 65015: CAPTURE: Start Done !!!
    [m3vpss ] 65015: SYSTEM : FREE SPACE : Frame Buffer = 169831296 B (161 MB
    )
    [m3vpss ] 65015: SYSTEM : FREE SPACE : Bitstream Buffer = 352845696 B (336 MB
    )
    [m3vpss ] 65015: SYSTEM : FREE SPACE : Tiler 8-bit = 134217728 B (128 MB
    ) - TILER ON
    [m3vpss ] 65015: SYSTEM : FREE SPACE : Tiler 16-bit = 134217728 B (128 MB
    ) - TILER ON
    [m3vpss ] 65141: SYSTEM: Opening MsgQ [HOST_MSGQ] ...

    I find some problem in the /DVRRDK_03.00.00.00/target/rfs_816x/opt/dvr_rdk/ti816x/firmware . The size of  dvr_rdk_fw_c6xdsp.xe674 , dvr_rdk_fw_m3vpss.xem3 and dvr_rdk_fw_m3video.xem3  is smaller. 

     dvr_rdk_fw_c6xdsp.xe674 905kb

    dvr_rdk_fw_m3vpss.xem3 2.3 M

    dvr_rdk_fw_m3video.xem3 2.3M 

    They are used to be 5M.

  • I modify the code .   The steps:  capture---->ipcFramesOutVpss-----(nextLink)---->display.

    It can't play the video as before. The demo code:

    #include <demos/link_api_demos/common/chains.h>
    #include <mcfw/interfaces/ti_venc.h>
    #include <demos/link_api_demos/common/chains_ipcFrames.h>

    static SystemVideo_Ivahd2ChMap_Tbl systemVid_encDecIvaChMapTbl =
    {
    .isPopulated = 1,
    .ivaMap[0] =
    {
    .EncNumCh = 10,
    .EncChList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0 , 0, 0},
    .DecNumCh = 0,
    .DecChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    .ivaMap[1] =
    {
    .EncNumCh = 0,
    .EncChList = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
    .DecNumCh = 12,
    .DecChList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0 , 0, 0},
    },
    .ivaMap[2] =
    {
    .EncNumCh = 6,
    .EncChList = {10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    .DecNumCh = 4,
    .DecChList = {12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    };

    Void Chains_singleChCapEncSend(Chains_Ctrl *chainsCfg)
    {
    CaptureLink_CreateParams capturePrm;
    CaptureLink_VipInstParams *pCaptureInstPrm;
    CaptureLink_OutParams *pCaptureOutPrm;

    IpcFramesOutLinkRTOS_CreateParams ipcFramesOutVpssPrm;

    DisplayLink_CreateParams displayPrm;

    UInt32 captureId;
    UInt32 vipInstId;

    UInt32 ipcFramesOutVpssId;

    UInt32 displayId;

    UInt32 i = 0;
    // char ch;


    Chains_ipcFramesInit();

    CHAINS_INIT_STRUCT(CaptureLink_CreateParams, capturePrm);
    CHAINS_INIT_STRUCT(DisplayLink_CreateParams, displayPrm);
    CHAINS_INIT_STRUCT(IpcFramesOutLinkRTOS_CreateParams, ipcFramesOutVpssPrm);


    captureId = SYSTEM_LINK_ID_CAPTURE;

    ipcFramesOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0;


    displayId = SYSTEM_LINK_ID_DISPLAY_0;

    System_linkControl(
    SYSTEM_LINK_ID_M3VIDEO,
    SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL,
    &systemVid_encDecIvaChMapTbl,
    sizeof(SystemVideo_Ivahd2ChMap_Tbl),
    TRUE
    );

    capturePrm.numVipInst = 1;
    capturePrm.tilerEnable = FALSE;
    capturePrm.numBufsPerCh = 16;//CAPTURE_LINK_NUM_BUFS_PER_CH_DEFAULT;
    capturePrm.numExtraBufs = 0;
    capturePrm.maxBlindAreasPerCh = 0;
    capturePrm.isPalMode = FALSE;
    capturePrm.enableSdCrop = FALSE;
    capturePrm.doCropInCapture = FALSE;

    for(vipInstId=0; vipInstId<capturePrm.numVipInst; vipInstId++)
    {
    pCaptureInstPrm = &capturePrm.vipInst[vipInstId];
    pCaptureInstPrm->vipInstId = (SYSTEM_CAPTURE_INST_VIP0_PORTA+vipInstId*2)%SYSTEM_CAPTURE_INST_MAX;
    pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_SII9233A_DRV;
    pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;
    pCaptureInstPrm->standard = chainsCfg->displayRes[vipInstId];
    pCaptureInstPrm->numOutput = 1;
    pCaptureInstPrm->numChPerOutput = 1;
    pCaptureInstPrm->frameCaptureMode = FALSE;
    pCaptureInstPrm->fieldsMerged = FALSE;
    if (Chains_IsInterlaced(chainsCfg->displayRes[0])) {
    pCaptureInstPrm->frameCaptureMode = TRUE;
    pCaptureInstPrm->fieldsMerged = TRUE;
    }

    pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
    pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422I_YUYV;
    pCaptureOutPrm->scEnable = FALSE;
    pCaptureOutPrm->scOutWidth = chainsCfg->channelConf[vipInstId].width;
    pCaptureOutPrm->scOutHeight = chainsCfg->channelConf[vipInstId].height;
    pCaptureOutPrm->outQueId = 0;
    }
    capturePrm.outQueParams[0].nextLink = ipcFramesOutVpssId;

    System_linkCreate(captureId, &capturePrm, sizeof(capturePrm));
    chainsCfg->displayRes[0] = capturePrm.vipInst[0].standard;
    Vsys_getResSize(chainsCfg->displayRes[0], &chainsCfg->channelConf[0].width, &chainsCfg->channelConf[0].height);
    Vsys_getResRate(chainsCfg->displayRes[0], &chainsCfg->channelConf[0].frameRate);

    ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkId = captureId;
    ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesOutVpssPrm.baseCreateParams.notifyPrevLink = TRUE;
    ipcFramesOutVpssPrm.baseCreateParams.numOutQue =1;
    ipcFramesOutVpssPrm.baseCreateParams.outQueParams[0].nextLink= displayId;
    ipcFramesOutVpssPrm.baseCreateParams.notifyNextLink = TRUE;
    ipcFramesOutVpssPrm.baseCreateParams.noNotifyMode = TRUE;



    displayPrm.inQueParams[0].prevLinkId = ipcFramesOutVpssId;
    displayPrm.inQueParams[0].prevLinkQueId = 0;
    displayPrm.displayRes=chainsCfg->displayRes[0];


    Chains_displayCtrlInit(chainsCfg->displayRes);


    System_linkCreate(ipcFramesOutVpssId,&ipcFramesOutVpssPrm,sizeof(ipcFramesOutVpssPrm));

    System_linkCreate(displayId,&displayPrm,sizeof(displayPrm));

    Chains_memPrintHeapStatus();

    {
    System_linkStart(displayId);

    System_linkStart(ipcFramesOutVpssId);



    System_linkStart(captureId);
    /*
    while(1)
    {
    ch = Chains_menuRunTime();
    if(ch=='0')
    break;
    if(ch=='v')
    System_linkControl(captureId, CAPTURE_LINK_CMD_FORCE_RESET, NULL, 0, TRUE);
    if(ch=='p')
    System_linkControl(captureId, CAPTURE_LINK_CMD_PRINT_ADV_STATISTICS, NULL, 0, TRUE);
    }
    */

    /*
    while(1)
    {
    ;
    }
    */
    sleep(100);
    System_linkStop(captureId);

    System_linkStart(ipcFramesOutVpssId);

    System_linkStop(displayId);

    Chains_ipcFramesStop();
    }

    System_linkDelete(captureId);

    System_linkDelete(ipcFramesOutVpssId);

    System_linkDelete(displayId);

    Chains_ipcFramesExit();
    }

    is there any restriction in display link ?

  • Display looks to have started. Are you seeing NO SIGNAL on HDMI or do you see blank screen. Also this is surely not DVR RDK since DVR capture link doesn't have parameters like captureInstPrm.frameCaptureMode.Did you get this package from TI FAE ? Also are you doing the following in your app:

    System_init();

    Vsys_configureDisplay();

    before invoking your function Chains_singleChCapEncSend()

     

  • Hi Badri,

    thanks for your reply

    Now I am invoking another function Chains_singleChCaptureSii9233a() and it works well . 

    Then  I follow the steps in   DSP Algorithm Integration Guide in IPNC/DVR RDK.pdf   to add an helloworld algorithm in dsp.  

    I modify the demo to add helloworldlink and ipcframesInDsplink .  

    the helloworld can receive data from ipcframesInDsp , because when it receives new data ,it will print "HELLOWORLDALG: PROCESS FRAME".

    but screen is black  ,  the video can't  display like before , 

  • the code and log follow:

    #include <demos/link_api_demos/common/chains.h>
    #include <demos/link_api_demos/common/chains_ipcBuf.h>
    #include <demos/link_api_demos/common/chains_ipcFrames.h>


    Void Chains_singleChCaptureSii9233a(Chains_Ctrl *chainsCfg)
    {
    CaptureLink_CreateParams capturePrm;
    DisplayLink_CreateParams displayPrm;
    CaptureLink_VipInstParams *pCaptureInstPrm;
    CaptureLink_OutParams *pCaptureOutPrm;

    IpcFramesOutLinkRTOS_CreateParams ipcFramesOutVpssPrm;
    IpcFramesInLinkHLOS_CreateParams ipcFramesInDspPrm;


    HelloWorldLink_CreateParams helloworldPrm;

    UInt32 displayId, captureId;
    UInt32 vipInstId;

    UInt32 ipcFramesOutVpssId,ipcFramesInDspId;
    UInt32 helloId;

    char ch;
    Bool enableVidFrameExport = TRUE;
    Bool enableGrpx = FALSE;

    if (enableVidFrameExport) {
    Chains_ipcFramesInit();
    }

    CHAINS_INIT_STRUCT(CaptureLink_CreateParams,capturePrm);
    CHAINS_INIT_STRUCT(DisplayLink_CreateParams,displayPrm);
    CHAINS_INIT_STRUCT(IpcFramesOutLinkRTOS_CreateParams ,ipcFramesOutVpssPrm);
    CHAINS_INIT_STRUCT(IpcFramesInLinkHLOS_CreateParams ,ipcFramesInDspPrm);

    CHAINS_INIT_STRUCT(HelloWorldLink_CreateParams, helloworldPrm);
    captureId = SYSTEM_LINK_ID_CAPTURE;
    displayId = SYSTEM_LINK_ID_DISPLAY_1;

    ipcFramesOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0;
    ipcFramesInDspId = SYSTEM_DSP_LINK_ID_IPC_FRAMES_IN_0;
    helloId = SYSTEM_DSP_LINK_ID_HELLOWORLD_0;

    capturePrm.numVipInst = 1;
    capturePrm.tilerEnable = FALSE;
    capturePrm.numBufsPerCh = 16;
    capturePrm.numExtraBufs = 0;
    capturePrm.maxBlindAreasPerCh = 0;
    capturePrm.isPalMode = FALSE;
    capturePrm.enableSdCrop = FALSE;
    capturePrm.doCropInCapture = FALSE;

    for(vipInstId=0; vipInstId<capturePrm.numVipInst; vipInstId++)
    {
    pCaptureInstPrm = &capturePrm.vipInst[vipInstId];
    pCaptureInstPrm->vipInstId = (SYSTEM_CAPTURE_INST_VIP0_PORTA+vipInstId*2)%SYSTEM_CAPTURE_INST_MAX;
    pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_SII9233A_DRV;
    pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;
    pCaptureInstPrm->standard = chainsCfg->displayRes[vipInstId];
    pCaptureInstPrm->numOutput = 1;
    pCaptureInstPrm->numChPerOutput = 1;
    pCaptureInstPrm->frameCaptureMode = FALSE;
    pCaptureInstPrm->fieldsMerged = FALSE;

    pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
    pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422I_YUYV;
    pCaptureOutPrm->scEnable = FALSE;
    pCaptureOutPrm->scOutWidth = chainsCfg->channelConf[vipInstId].width;
    pCaptureOutPrm->scOutHeight = chainsCfg->channelConf[vipInstId].height;
    pCaptureOutPrm->outQueId = 0;
    }

    if (enableVidFrameExport) {
    capturePrm.outQueParams[0].nextLink = ipcFramesOutVpssId;
    }
    else {
    capturePrm.outQueParams[0].nextLink = displayId;
    }

    System_linkCreate(captureId, &capturePrm, sizeof(capturePrm));
    chainsCfg->displayRes[0] = capturePrm.vipInst[0].standard;
    Vsys_getResSize(chainsCfg->displayRes[0], &chainsCfg->channelConf[0].width, &chainsCfg->channelConf[0].height);
    Vsys_getResRate(chainsCfg->displayRes[0], &chainsCfg->channelConf[0].frameRate);

    if (enableVidFrameExport) {
    ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkId = captureId;

    ipcFramesOutVpssPrm.baseCreateParams.noNotifyMode = TRUE;
    ipcFramesOutVpssPrm.baseCreateParams.notifyNextLink = FALSE;
    ipcFramesOutVpssPrm.baseCreateParams.notifyPrevLink = FALSE;
    ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesOutVpssPrm.baseCreateParams.outQueParams[0].nextLink = displayId;
    ipcFramesOutVpssPrm.baseCreateParams.inputFrameRate = chainsCfg->channelConf[0].frameRate;
    ipcFramesOutVpssPrm.baseCreateParams.outputFrameRate = chainsCfg->channelConf[0].frameRate;
    ipcFramesOutVpssPrm.baseCreateParams.processLink = ipcFramesInDspId;
    ipcFramesOutVpssPrm.baseCreateParams.notifyProcessLink = TRUE;


    ipcFramesInDspPrm.baseCreateParams.noNotifyMode =TRUE;
    ipcFramesInDspPrm.baseCreateParams.notifyPrevLink= FALSE;
    ipcFramesInDspPrm.baseCreateParams.notifyNextLink= TRUE;
    ipcFramesInDspPrm.baseCreateParams.inQueParams.prevLinkId=ipcFramesOutVpssId;
    ipcFramesInDspPrm.baseCreateParams.inQueParams.prevLinkQueId=0;
    ipcFramesInDspPrm.baseCreateParams.outQueParams[0].nextLink = helloId;
    ipcFramesInDspPrm.exportOnlyPhyAddr = FALSE;
    ipcFramesInDspPrm.baseCreateParams.inputFrameRate = chainsCfg->channelConf[0].frameRate;
    ipcFramesInDspPrm.baseCreateParams.outputFrameRate=chainsCfg->channelConf[0].frameRate;
    ipcFramesInDspPrm.baseCreateParams.notifyProcessLink = FALSE;
    Chains_ipcFramesInSetCbInfo(&ipcFramesInDspPrm);

    helloworldPrm.inQueParams.prevLinkId = ipcFramesInDspId;
    helloworldPrm.inQueParams.prevLinkQueId = 0;
    helloworldPrm.outQueParams[0].nextLink = SYSTEM_LINK_ID_INVALID;

    }

    if (enableVidFrameExport) {
    displayPrm.inQueParams[0].prevLinkId = ipcFramesOutVpssId;
    }
    else {
    displayPrm.inQueParams[0].prevLinkId = captureId;
    }

    displayPrm.displayRes = chainsCfg->displayRes[0];
    displayPrm.numInputQueues = 1;
    displayPrm.activeQueue = 0;
    displayPrm.inQueParams[0].prevLinkQueId = 0;
    displayPrm.forceFieldSeparatedInputMode = FALSE;

    Chains_displayCtrlInit(chainsCfg->displayRes);

    if(enableVidFrameExport)
    {

    System_linkCreate(ipcFramesOutVpssId, &ipcFramesOutVpssPrm , sizeof(ipcFramesOutVpssPrm));
    System_linkCreate(ipcFramesInDspId , &ipcFramesInDspPrm , sizeof(ipcFramesInDspPrm));
    System_linkCreate(helloId,&helloworldPrm,sizeof(helloworldPrm));
    }

    System_linkCreate(displayId, &displayPrm, sizeof(displayPrm));

    Chains_memPrintHeapStatus();

    {
    if(enableGrpx) {
    grpx_init(GRPX_FORMAT_ARGB8888);
    }

    System_linkStart(displayId);
    if(enableVidFrameExport)
    {
    System_linkStart(helloId);
    System_linkStart(ipcFramesInDspId);
    System_linkStart(ipcFramesOutVpssId);
    }
    System_linkStart(captureId);

    if(enableGrpx)
    {
    grpx_fb_draw_demo();
    }

    while(1)
    {
    ch = Chains_menuRunTime();
    if(ch=='0')
    break;
    if(ch=='v')
    System_linkControl(captureId, CAPTURE_LINK_CMD_FORCE_RESET, NULL, 0, TRUE);
    if(ch=='p') {
    System_linkControl(captureId, CAPTURE_LINK_CMD_PRINT_ADV_STATISTICS, NULL, 0, TRUE);
    System_linkControl(displayId, DISPLAY_LINK_CMD_PRINT_STATISTICS, NULL, 0, TRUE);
    }
    }

    System_linkStop(captureId);
    if(enableVidFrameExport)
    {
    Chains_ipcFramesStop();
    System_linkStop(ipcFramesOutVpssId);
    System_linkStop(ipcFramesInDspId);
    System_linkStop(helloId);
    }
    System_linkStop(displayId);
    if(enableGrpx)
    {
    grpx_exit();
    }
    }

    System_linkDelete(captureId);
    if(enableVidFrameExport)
    {
    System_linkDelete(ipcFramesOutVpssId);
    System_linkDelete(ipcFramesInDspId);
    System_linkDelete(helloId);
    }
    System_linkDelete(displayId);

    Chains_displayCtrlDeInit();
    if (enableVidFrameExport) {
    Chains_ipcFramesExit();
    }
    }

  • 0: SYSTEM: System Common Init in progress !!!
    1: SYSTEM: IPC init in progress !!!
    17: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
    19: SYSTEM: Creating MsgQ [HOST_MSGQ] ...
    22: SYSTEM: Creating MsgQ [HOST_ACK_MSGQ] ...
    23: SYSTEM: Opening MsgQ [DSP_MSGQ] ...
    24: SYSTEM: Opening MsgQ [VIDEO-M3_MSGQ] ...
    24: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
    25: SYSTEM: Notify register to [DSP] line 0, event 15 ...
    26: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ...
    26: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ...
    27: SYSTEM: IPC init DONE !!!
    28: SYSTEM: Creating ListMP [HOST_IPC_OUT_24] in region 0 ...
    30: SYSTEM: Creating ListMP [HOST_IPC_IN_24] in region 0 ...
    32: SYSTEM: ListElem Shared Addr = 0x2b0a0080
    33: SYSTEM: Creating ListMP [HOST_IPC_OUT_25] in region 0 ...
    35: SYSTEM: Creating ListMP [HOST_IPC_IN_25] in region 0 ...
    37: SYSTEM: ListElem Shared Addr = 0x2b0bdb80
    38: SYSTEM: Creating ListMP [HOST_IPC_OUT_19] in region 0 ...
    40: SYSTEM: Creating ListMP [HOST_IPC_IN_19] in region 0 ...
    42: SYSTEM: ListElem Shared Addr = 0x2b0db680
    43: SYSTEM: Creating ListMP [HOST_IPC_OUT_20] in region 0 ...
    45: SYSTEM: Creating ListMP [HOST_IPC_IN_20] in region 0 ...
    47: SYSTEM: ListElem Shared Addr = 0x2b0fb080
    48: SYSTEM: Creating ListMP [HOST_IPC_OUT_21] in region 0 ...
    50: SYSTEM: Creating ListMP [HOST_IPC_IN_21] in region 0 ...
    52: SYSTEM: ListElem Shared Addr = 0x2b11aa80
    69: SYSTEM: System Common Init Done !!!
    89: CHAINS : CPU Revision [ES2.0] !!!
    90: CHAINS : Detected [2x SII9233A, 1x SII9022A ETV] Board !!!
    90: CHAINS : Base Board Revision [REV A] !!!
    90: CHAINS : Daughter Card Revision [REV A] !!!

    [host] CHAINS_IPCFRAMES:Chains_ipcFramesSendRecvFxn:Entered... [m3vpss ] 13292
    : CAPTURE: Create in progress !!!
    [m3vpss ] 13323: CAPTURE: VIP0 PortA capture mode is [16-bit, Non-mux Embedded
    Sync] !!!
    [m3vpss ] 13646: CAPTURE: VIP0 PortA VID DEC 1027 (0x30): 9233:0033:0001
    [m3vpss ] UTILS: DMA: Allocated CH (TCC) = 58 (58)
    [m3vpss ] CAPTURE::HEAPID:0 USED:448
    [m3vpss ] CAPTURE::HEAPID:4 USED:70963200
    [m3vpss ] 13646: CAPTURE: Create Done !!!
    [m3vpss ] ==== Vps_sii9233aReadAviInfo ==== devAddr = 0x34
    [m3vpss ] AviInfo = 0x82,regValue[1] = 0x2,regValue[2] = 0xd
    [m3vpss ] ===============================pAviInfo->colorSpace = 0, pAviInfo->c
    olorImetric = 1,pAviInfo->pixelRepeat= 0
    [m3vpss ] 13803: HDMI: Starting HDMI Transmitter ... !!!
    [c6xdsp ] 11583: IPC_FRAMES_IN : Create in progress !!!
    [m3vpss ] 13813: HDMI: HDMI Config ... DONE !!!
    [c6xdsp ] 11583: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_19] ...
    [m3vpss ] 13813: HDMI: Starting HDMI Transmitter ... DONE !!!
    [c6xdsp ] 11583: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_19] ...
    [m3vpss ] 13813: IPC_FRAMES_OUT : Create in progress !!!
    [c6xdsp ] 11584: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
    [m3vpss ] 13815: IPC_FRAMES_OUT : Create Done !!!
    [c6xdsp ] IPC_FRAMES_IN:HEAPID:0 USED:304
    [m3vpss ] 13819: DISPLAY: Create in progress !!!
    [c6xdsp ] 11585: IPC_FRAMES_IN : Create Done !!!
    [m3vpss ] 13819: DISPLAY: 1: Window size 1920x1080, 3840B
    [m3vpss ] 13820: DISPLAY: Create Done !!!
    [c6xdsp ] 11585: HELLOWORLD : Create in progress !!!
    [m3vpss ] 13821: DISPLAY: Start in progress !!!
    [c6xdsp ] 11585: HELLOWORLD : Algorithm Create in progress !!!
    [c6xdsp ] > HELLOWORLDALG: Algorithm memory requirements queried ::
    [c6xdsp ] > Number of buffers = 4
    [c6xdsp ] > Persistent Internal Memory = 16 bytes
    [c6xdsp ] > Persistent External Memory = 10800 bytes
    [c6xdsp ] > Scratch Internal Memory = 102400 bytes
    [c6xdsp ] > HELLOWORLDALG: Initializing Hello World Algorithm...
    [c6xdsp ] > HELLOWORLDALG: Application memory allocation ==> memTab #0
    [c6xdsp ] Bytes = 8
    [c6xdsp ] Address = 0x10800000
    [c6xdsp ] Location = INTERNAL L1/2 MEM
    [c6xdsp ] > HELLOWORLDALG: Application memory allocation ==> memTab #1
    [c6xdsp ] Bytes = 102400
    [c6xdsp ] Address = 0x10800008
    [c6xdsp ] Location = INTERNAL L1/2 MEM
    [c6xdsp ] > HELLOWORLDALG: Application memory allocation ==> memTab #2
    [c6xdsp ] Bytes = 10800
    [c6xdsp ] Address = 0x9ef86300
    [c6xdsp ] Location = EXTERNAL DDR MEM
    [c6xdsp ] > HELLOWORLDALG: Application memory allocation ==> memTab #3
    [c6xdsp ] Bytes = 8
    [c6xdsp ] Address = 0x10819008
    [c6xdsp ] Location = INTERNAL L1/2 MEM
    [c6xdsp ] 11586: HELLOWORLD : Algorithm Create Done !!!
    [c6xdsp ] 11586: HELLOWORLD : Create Done !!!
    [m3vpss ] 13870: DISPLAY: Start Done !!!
    [m3vpss ] 13870: DISPLAY: DVO2(BP1) : 40 fps, Latency (Min / Max) = ( 255 / 0
    ), Callback Interval (Min / Max) = ( 255 / 0 ) !!!
    [m3vpss ] 13870: CAPTURE: Start in progress !!!
    [m3vpss ] 13871: CAPTURE: Start Done !!!
    [m3vpss ] 13997: SYSTEM: Opening MsgQ [HOST_MSGQ] ...

  • I print the statics of capture and display. 

    [m3vpss ] *** Capture Driver Advanced Statistics ***
    [m3vpss ]
    [m3vpss ] VIP Parser Reset Count : 0
    [m3vpss ]
    [m3vpss ] | Total Even Odd Total Even Odd Min / Max Min /
    Max Dropped Fid Repeat Frame Error Y/C
    [m3vpss ] CH | Fields Fields Fields FPS FPS FPS Width He
    ight Fields Count (Desc Error Y/C)
    [m3vpss ] --------------------------------------------------------------------
    ----------------------------------------
    [m3vpss ] 000 | 1381 1381 0 60 60 0 1920 / 1920 1080 /
    1080 1365 0 0/0 (0/0)
    [m3vpss ]
    [m3vpss ] VIP Capture Port 0 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMi
    ssMatch3 = 0
    [m3vpss ]
    [m3vpss ] *** Capture List Manager Advanced Statistics ***
    [m3vpss ]
    [m3vpss ] List Post Count : 2881
    [m3vpss ] List Stall Count : 0
    [m3vpss ] List Post Time (ms) : Max = 0, Min = 0, Avg = 0, Total = 0
    [m3vpss ] INTC Timeout Count : (0, 0) (Min timeout value = 991, 1000)
    [m3vpss ] Descriptor miss found count : 0
    [m3vpss ]
    [m3vpss ]
    [m3vpss ] VIP and VPDMA registers,
    [m3vpss ] VIP0 : FIQ_STATUS : 0x4810551c = 0x00004400
    [m3vpss ] VIP1 : FIQ_STATUS : 0x48105a1c = 0x00000000
    [m3vpss ] VPDMA: LIST_BUSY : 0x4810d00c = 0x00020000
    [m3vpss ]
    [m3vpss ]
    [m3vpss ] 37020: CAPTURE: Fields = 16 (fps = 0, CPU Load = 0)
    [m3vpss ] 37020: CAPTURE: Num Resets = 0 (Avg 0 ms per reset)
    [m3vpss ] 37020: SYSTEM : FREE SPACE : System Heap = 6328 B, Mbx = 10237
    msgs)
    [m3vpss ] 37021: SYSTEM : FREE SPACE : SR0 Heap = 11003648 B (10 MB)

    [m3vpss ] 37021: SYSTEM : FREE SPACE : Frame Buffer = 169831296 B (161 MB
    )
    [m3vpss ] 37021: SYSTEM : FREE SPACE : Bitstream Buffer = 349699968 B (333 MB
    )
    [m3vpss ] 37021: DISPLAY: DVO2(BP1) : 59 fps, Latency (Min / Max) = ( 255 / 0
    ), Callback Interval (Min / Max) = ( 16 / 17 ) !!!
    [m3vpss ] 37021: SYSTEM : FREE SPACE : Tiler 8-bit = 134217728 B (128 MB
    ) - TILER ON
    [m3vpss ] 37022: SYSTEM : FREE SPACE : Tiler 16-bit = 134217728 B (128 MB
    ) - TILER ON
    0
    [m3vpss ] 43427: CAPTURE: Stop in progress !!!
    [m3vpss ] 43428: CAPTURE: Stop Done !!!
    [m3vpss ] 43429: DISPLAY: Stop in progress !!!
    [m3vpss ] 43470: DISPLAY: Stop Done !!!
    [m3vpss ]

    [host] Entered:Chains_ipcFramesExit...
    1.raw
    [host] Leaving:Chains_ipcFramesExit... 30279: SYSTEM: System Common De-Init in
    progress !!!

    [host] OSA_tskDelete:In progress...
    [host] OSA_tskDelete:In progress...
    [host] OSA_tskDelete:In progress...
    [host] OSA_tskDelete:In progress...
    [host] OSA_tskDelete:In progress...
    [host] OSA_tskDelete:In progress...
    [host] OSA_tskDelete:In progress...
    [host] OSA_tskDelete:In progress...
    [host] OSA_tskDelete:In progress...
    [host] OSA_tskDelete:In progress... 30284: SYSTEM: IPC de-init in progress !!!
    [m3vpss ] *** Capture Driver Advanced Statistics ***
    [c6xdsp ] 41730: IPCFRAMESIN:Link[16]:
    [c6xdsp ] RECV:16 FREE:0,DROPPED:0,AVGLATENCY:0
    [c6xdsp ] 41730: IPC_FRAMES_IN : Delete in progress !!!
    [c6xdsp ] 41730: IPC_FRAMES_IN : Delete Done !!!
    [m3vpss ]
    [c6xdsp ] 41731: HELLOWORLD : Delete in progress !!!
    [c6xdsp ] 41731: HELLOWORLD : Delete Done !!!
    [m3vpss ] VIP Parser Reset Count : 0
    [m3vpss ]
    [m3vpss ] | Total Even Odd Total Even Odd Min / Max Min /
    Max Dropped Fid Repeat Frame Error Y/C
    30314: SYSTEM: IPC de-init DONE !!!
    30315: SYSTEM: System Common De-Init Done !!!
    [m3vpss ] CH | Fields Fields Fields FPS FPS FPS Width He
    ight Fields Count (Desc Error Y/C)
    root@dm816x:/mnt# [m3vpss ] --------------------------------------------------
    ----------------------------------------------------------
    [m3vpss ] 000 | 1764 1764 0 60 60 0 1920 / 1920 1080 /
    1080 1748 0 0/0 (0/0)
    [m3vpss ]
    [m3vpss ] VIP Capture Port 0 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMi
    ssMatch3 = 0
    [m3vpss ]
    [m3vpss ] *** Capture List Manager Advanced Statistics ***
    [m3vpss ]
    [m3vpss ] List Post Count : 3680
    [m3vpss ] List Stall Count : 0
    [m3vpss ] List Post Time (ms) : Max = 0, Min = 0, Avg = 0, Total = 0
    [m3vpss ] INTC Timeout Count : (0, 0) (Min timeout value = 991, 1000)
    [m3vpss ] Descriptor miss found count : 0
    [m3vpss ]
    [m3vpss ]
    [m3vpss ] VIP and VPDMA registers,
    [m3vpss ] VIP0 : FIQ_STATUS : 0x4810551c = 0x00000000
    [m3vpss ] VIP1 : FIQ_STATUS : 0x48105a1c = 0x00000000
    [m3vpss ] VPDMA: LIST_BUSY : 0x4810d00c = 0x00000000
    [m3vpss ]
    [m3vpss ]
    [m3vpss ] 43472: CAPTURE: Fields = 16 (fps = 0, CPU Load = 0)
    [m3vpss ] 43472: CAPTURE: Num Resets = 0 (Avg 0 ms per reset)
    [m3vpss ] 43472: SYSTEM : FREE SPACE : System Heap = 6328 B, Mbx = 10239
    msgs)
    [m3vpss ] 43472: SYSTEM : FREE SPACE : SR0 Heap = 11003648 B (10 MB)

    [m3vpss ] 43472: SYSTEM : FREE SPACE : Frame Buffer = 169831296 B (161 MB
    )
    [m3vpss ] 43473: SYSTEM : FREE SPACE : Bitstream Buffer = 349699968 B (333 MB
    )
    [m3vpss ] 43473: SYSTEM : FREE SPACE : Tiler 8-bit = 134217728 B (128 MB
    ) - TILER ON
    [m3vpss ] 43473: SYSTEM : FREE SPACE : Tiler 16-bit = 134217728 B (128 MB
    ) - TILER ON
    [m3vpss ] 43473: CAPTURE: Delete in progress !!!
    [m3vpss ] UTILS: DMA: Free'ed CH (TCC) = 58 (58)
    [m3vpss ] 43473: CAPTURE: Delete Done !!!
    [m3vpss ] 43474: IPC_FRAMES_OUT : Delete in progress !!!
    [m3vpss ] 43474: IPCFRAMESOUT:Link[20000013]:
    [m3vpss ] RECV:16 FORWARD:0,DROPPED:0,AVGLATENCY:0
    [m3vpss ] 43474: PRF : IPC_FRAMES_OUT0 : t: 0 ms, c: 16, f: 16, fps: 0, fpc: 1

    [m3vpss ] 43474: IPC_FRAMES_OUT : Delete Done !!!
    [m3vpss ] 43475: DISPLAY: Frames = 1 (fps = 0) !!!
    [m3vpss ] 43475: DISPLAY: Delete in progress !!!
    [m3vpss ] 43475: DISPLAY: Delete Done !!!
    [m3vpss ] 43475: HDMI: Stopping HDMI Transmitter ... !!!
    [m3vpss ] 43476: HDMI: Stopping HDMI Transmitter ... DONE !!!
    [m3vpss ] 43476: DISPLAY: UNDERFLOW COUNT: HDMI(BP0) 1839, HDDAC(BP0) 1766, DV
    O2(BP1) 1766, SDDAC(SEC1) 1840

  • The helloWorldLink does not seem to be freeing buffers after processing.Can you share the code of the hello world link.Also check if the notifyPrevLink is set to TRUE for the helloWorldLink

  • right , you should  share the code of the hello world link. i think maybe there is some wrong settings

  • Hi, Badri 

    thank u for your support 

    as you say, I don't create the queue for output buffer and allocate the buffers  

    now i modify the code in Chains_singleChCaptureSii9233a.c

    helloworldPrm.inQueParams.prevLinkId = ipcFramesInDspId;
    helloworldPrm.inQueParams.prevLinkQueId = 0;
    helloworldPrm.outQueParams.nextLink = SYSTEM_LINK_ID_INVALID;
    helloworldPrm.createOutBuf1 = 1;          //don't set before
    helloworldPrm.numBufsPerCh = 4;       //don't set before

     it can display one frame now ,but then an error happen

     [c6xdsp]   10910: Assertion @ Line: 60 in links_common/system/system_linkApi.c:
     procId < SYSTEM_PROC_MAX : failed !!! 
     the error happens when the program runs the red codes
    the code is in
    if(pObj->createArgs.createOutBuf1)
        {
            if (outBitBufList.numBufs)
            {
            
                status = Utils_bitbufPutFull(bufOutQue,
                    &outBitBufList);
                UTILS_assert(status == FVID2_SOK);
                /*********************************************************************/
                /* Inform next link of output buffer availability                    */
                /*********************************************************************/
                System_sendLinkCmd(pObj->createArgs.outQueParams.nextLink,
                    SYSTEM_CMD_NEW_DATA);
                status = FVID2_SOK;        
            }
            else
            {
                status = FVID2_EFAIL; 
            } 
        }

     the helloworldlink is a process link in dsp, how to set the hellworld 's nextlink ?

  • Is is because helloworldPrm.outQueParams.nextLink = SYSTEM_LINK_ID_INVALID;

    THis should be changed to correct linkId.

     

    For example HelloWorldLink --> ipcFramesOutRTOS --> ipcFramesInHLOS (A8)

     

     

  • this is the step :

    capture----->ipcframesOutVpss----(nextlink)-----display

                                                            ----(process)----ipcFramsInDsp---->helloworldlink

    the helloworld nextlink should be displaylink ?

  • You can connect as below. Display link supports multiple input queues.

    capture----->ipcframesOutVpss----(nextlink)-----Q0 --- display

                                                            ----(process)----ipcFramsInDsp---->helloworldlink --> ipcFramesOutDsp -->ipcFramesInVPSS --> Q1 -- display

  • Hi Badri ,

    I delete the blue code . It displays the video  but another error happens.

    I set the helloworldPrm.createOutBuf1=1

                   helloworldPrm.numBufPerCh=8

    then helloworld link processes 8 frames (it print “helloworld : process frame" 8 times) and stop

    if I set helloworldPrm.numBufPerCh=4, it processes 4 frames.(printf helloworld: process frames 4 times)

    this is error log:

    [c6xdsp ]  17349: Assertion @ Line: 200 in utils/src/utils_bit_buf.c: status ==
     FVID2_SOK : failed !!!

    when the program runs the red code,  the error occurs

    /* ===================================================================
    * @func HelloWorldLink_algProcessData
    *
    * @desc Process upon the input frame received from previous link
    * At this place, make a call to algorithm process call
    *
    * @modif This function modifies the following structures
    *
    * @inputs This function takes the following inputs
    * <HelloWorldLink_Obj>
    * Object to hello world link
    *
    * @outputs <argument name>
    * Description of usage
    *
    * @return Status of process call
    * ==================================================================
    */

    Int32 HelloWorldLink_processData(HelloWorldLink_Obj * pObj)
    {
    UInt32 frameId;
    System_LinkInQueParams *pInQueParams;
    FVID2_Frame *pFrame;
    FVID2_FrameList frameList;
    Bitstream_Buf *pOutBuf;
    Utils_BitBufHndl *bufOutQue;
    Int32 status;
    System_FrameInfo *pInFrameInfo;
    Bitstream_BufList outBitBufList;
    HELLOWORLDALG_Result *pHelloWorldResult = NULL;

    status = FVID2_EFAIL;
    pInQueParams = &pObj->createArgs.inQueParams;

    bufOutQue = &pObj->outObj[0].bufOutQue;

    /*************************************************************************/
    /* Get input frames from previous link output queue */
    /*************************************************************************/
    System_getLinksFullFrames(pInQueParams->prevLinkId,
    pInQueParams->prevLinkQueId, &frameList);

    /*************************************************************************/
    /* If input frame received from queue, get the output buffer from out */
    /* queue and process the frame */
    /*************************************************************************/
    if (frameList.numFrames)
    {

    //pObj->totalFrameCount += frameList.numFrames;

    /*********************************************************************/
    /* Get the outout buffer for each input buffer and process the frame */
    /* */
    /*********************************************************************/
    for(frameId=0; frameId< frameList.numFrames; frameId++)
    {
    Bool doFrameDrop = FALSE;

    pFrame = frameList.frames[frameId];

    //pChObj = &pObj->chObj[chIdx];

    //pChObj->inFrameRecvCount++;


    /*********************************************************************/
    /* If current frame needs to be processed, get the output buffer */
    /* from output queue */
    /*********************************************************************/
    if(pObj->createArgs.createOutBuf1)
    {
    pOutBuf = NULL;
    status = Utils_bitbufGetEmptyBuf(bufOutQue,
    &pOutBuf,
    0, //pObj->outObj.ch2poolMap[chIdx], /*Need to change later.*/
    BIOS_NO_WAIT);

    if(!((status == FVID2_SOK) && (pOutBuf)))
    {
    doFrameDrop = TRUE;
    }

    /*********************************************************************/
    /* Captured YUV buffers time stamp is passed by all links to next */
    /* buffers bu copying the input buffer times stamp to it's output */
    /* buffer. This is used for benchmarking system latency. */
    /*********************************************************************/
    pInFrameInfo = (System_FrameInfo *) pFrame->appData;
    pOutBuf->lowerTimeStamp = (UInt32)(pInFrameInfo->ts64 & 0xFFFFFFFF);
    pOutBuf->upperTimeStamp = (UInt32)(pInFrameInfo->ts64 >> 32);
    pOutBuf->channelNum = pFrame->channelNum;
    //pOutBuf->fillLength = ;
    //pOutBuf->frameWidth = ;
    //pOutBuf->frameHeight = ;

    pHelloWorldResult = (HELLOWORLDALG_Result *) pOutBuf->addr;
    }

    /*********************************************************************/
    /* Now input and output buffers available and this frame need not be */
    /* skipped, make a call to the algorithm process call and process the*/
    /* frame. */
    /*********************************************************************/
    if(doFrameDrop == FALSE)
    {
    /*********************************************************************/
    /* Pointer to Luma buffer for processing. */
    /*********************************************************************/
    //pObj->chParams[chIdx].curFrame = pFrame->addr[0][0];

    pInFrameInfo = (System_FrameInfo *) pFrame->appData;

    //curTime = Utils_getCurTimeInMsec();

    /*********************************************************************/
    /* Make a call to algorithm process call here */
    /*********************************************************************/
    HELLOWORLDALG_TI_process(pObj->algHndl, 0, pHelloWorldResult);//HelloWorldLink_algProcess(); it will printf helloworld : process frame.

    /*********************************************************************/
    /* Benchmark frame process time */
    /*********************************************************************/
    //pChObj->inFrameProcessTime += (Utils_getCurTimeInMsec() - curTime);

    //pChObj->inFrameProcessCount++;
    outBitBufList.bufs[outBitBufList.numBufs] = pOutBuf;
    outBitBufList.numBufs++;

    }
    else
    {
    //pChObj->inFrameUserSkipCount++;
    }
    }
    }

    /*********************************************************************/
    /* Release the input buffer to previous link queue */
    /*********************************************************************/
    System_putLinksEmptyFrames(pInQueParams->prevLinkId,
    pInQueParams->prevLinkQueId, &frameList);

    /*********************************************************************/
    /* If output buffers available, push them to the output queue */
    /*********************************************************************/
    if(pObj->createArgs.createOutBuf1)
    {
    if (outBitBufList.numBufs)
    {

    status = Utils_bitbufPutFull(bufOutQue,
    &outBitBufList);
    UTILS_assert(status == FVID2_SOK);

    /*********************************************************************/
    /* Inform next link of output buffer availability */
    /*********************************************************************/
    // System_sendLinkCmd(pObj->createArgs.outQueParams.nextLink,
    // SYSTEM_CMD_NEW_DATA);
    status = FVID2_SOK;
    }
    else
    {
    status = FVID2_EFAIL;
    }
    }
    return status;
    }

    /* ===================================================================
    * @func HelloWorldLink_createOutObj
    *
    * @desc Function creates the queue for output buffer and allocate
    * the buffers. These buffers can be send as input to next
    * links (running on any core)
    *
    * @modif This function modifies the following structures
    *
    * @inputs This function takes the following inputs
    * HelloWorldLink_Obj
    * Object to hello world link
    *
    * @outputs
    *
    *
    * @return Status
    * FVID2_SOK: If outout object created successfuly
    * ==================================================================
    */

    static Int32 HelloWorldLink_createOutObj(HelloWorldLink_Obj * pObj)
    {
    HelloWorldLink_OutObj *pOutObj;
    System_LinkChInfo *pOutChInfo;
    Int32 status;
    UInt32 bufIdx;
    Int i,j,queueId,chId;
    UInt32 totalBufCnt;

    /*************************************************************************/
    /* One link can have multiple output queues with different/same output */
    /* data queued to it's output queue. Create here outobj for all output */
    /* queue */
    /*************************************************************************/
    for(queueId = 0; queueId < HELLOWORLD_LINK_MAX_OUT_QUE; queueId++)
    {

    pOutObj = &pObj->outObj[queueId];

    pObj->outObj[queueId].numAllocPools = 1;

    pOutObj->bufSize[0] = HELLOWORLD_LINK_OUT_BUF_SIZE;

    /*********************************************************************/
    /* Set the buffer alignment as per need. Typically 128 suggested for */
    /* better cache and DMA efficiency. */
    /*********************************************************************/
    pOutObj->bufSize[0] = VpsUtils_align(pOutObj->bufSize[0],
    HELLOWORLD_BUFFER_ALIGNMENT);

    /*********************************************************************/
    /* Create output queue */
    /*********************************************************************/
    status = Utils_bitbufCreate(&pOutObj->bufOutQue, TRUE, FALSE,
    pObj->outObj[queueId].numAllocPools);
    UTILS_assert(status == FVID2_SOK);

    totalBufCnt = 0;

    /*********************************************************************/
    /* Allocate output buffers */
    /*********************************************************************/
    for (i = 0; i < pOutObj->numAllocPools; i++)
    {
    /*****************************************************************/
    /* Number of output buffers per channel. In this example hello */
    /* world, outNumBufs set via user input. */
    /*****************************************************************/
    pOutObj->outNumBufs[i] = (pObj->createArgs.maxChannels *
    pObj->createArgs.numBufsPerCh);

    for (j = 0; j < pObj->createArgs.maxChannels; j++)
    {
    pOutObj->ch2poolMap[j] = i;
    }

    /*****************************************************************/
    /* Allocate the buffer from shared memory pool for bitstream */
    /* buffer. If you like to allocate memory for frame buffers, */
    /* you can either call Utils_tilerFrameAlloc() to allocate */
    /* memory from tiler memory or you can call Utils_memFrameAlloc */
    /* to allocate memory from shared buffer pool */
    /*****************************************************************/
    status = Utils_memBitBufAlloc(&(pOutObj->outBufs[totalBufCnt]),
    pOutObj->bufSize[i],
    pOutObj->outNumBufs[i]);

    UTILS_assert(status == FVID2_SOK);

    /*****************************************************************/
    /* Push the buffers to the output queue that's just been created */
    /*****************************************************************/
    for (bufIdx = 0; bufIdx < pOutObj->outNumBufs[i]; bufIdx++)
    {
    UTILS_assert((bufIdx + totalBufCnt) < HELLOWORLD_LINK_MAX_OUT_FRAMES);
    pOutObj->outBufs[bufIdx + totalBufCnt].allocPoolID = i;
    pOutObj->outBufs[bufIdx + totalBufCnt].doNotDisplay =
    FALSE;
    status =
    Utils_bitbufPutEmptyBuf(&pOutObj->bufOutQue,
    &pOutObj->outBufs[bufIdx +
    totalBufCnt]);
    UTILS_assert(status == FVID2_SOK);
    }
    totalBufCnt += pOutObj->outNumBufs[i];
    }
    }

    pObj->info.numQue = HELLOWORLD_LINK_MAX_OUT_QUE;

    /*************************************************************************/
    /* queInfo is used by next link to create it's instance. */
    /* Set numCh - number of channel information */
    /*************************************************************************/
    for (queueId = 0u; queueId < HELLOWORLD_LINK_MAX_OUT_QUE; queueId++)
    {
    pObj->info.queInfo[queueId].numCh = pObj->inQueInfo.numCh;
    }

    /*************************************************************************/
    /* Set the information for output buffer of each channel. Again, next */
    /* link connected to hello world link will use this information to */
    /* create it's own instance. */
    /*************************************************************************/
    for (chId = 0u; chId < pObj->inQueInfo.numCh; chId++)
    {
    for (queueId = 0u; queueId < HELLOWORLD_LINK_MAX_OUT_QUE; queueId++)
    {
    pOutChInfo = &pObj->info.queInfo[queueId].chInfo[chId];
    pOutChInfo->bufType = SYSTEM_BUF_TYPE_VIDBITSTREAM;
    pOutChInfo->codingformat = NULL;
    pOutChInfo->memType = NULL;
    pOutChInfo->scanFormat = pObj->inQueInfo.chInfo[chId].scanFormat;
    pOutChInfo->width = pObj->inQueInfo.chInfo[chId].width;
    pOutChInfo->height = pObj->inQueInfo.chInfo[chId].height;
    }
    }

    return (status);

    }