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.

App_ipcBitsInCbFxn() callback mechanism

Hi

RDK : IPNC RDK Ver 3.8

I am integrating  a new codec  with IPNC RDK V3.8. Working well  for  few minutes  and  the encoder stops after  that..

I observed  IPCBITSOUT (M3)   is  able to receive bitbuffers  from ENC LINK normally, but the callback used by the application to get the bitbuffers (App_ipcBitsInCbFxn()) is not being made properly. Actually , it is being called  after  receiving 8 bit buffers, instead of 1. This causes IPCBITSIN LINK  (A8) to receive  and  release 8 bitbuffers  at one go, causing encoder to stop encoding.

Can someone  tell me  how to debug this issue? Who is making this callback?

Best Regards

JK

  • Hello,

    I will notify the IPNC team for help.

    Best Regards,
    Margarita
  • Hi,

     

    In the IPC Bits In link there is a periodic thread running which sends SYSTEM_CMD_NEW_DATA cmd at an interval of IPC_BITS_IN_PROCESS_PERIOD_MS (8) to the IPC Bits In message handler. The message handler checks the ListMP for the bitstream buffer and if bitstream buffers are avialable then the user registered call back function is called. The user call back will consume the bit streams.

    Can you print the time stamp in the call back function (App_ipcBitsInCbFxn)?

    fprintf(stderr,"#### %d: IPC Bits in CB\n",OSA_getCurTimeInMsec());

     

    regards,

    Anand

  • Hi  Anand

    Thanks  for  the  reply. I checked  the callback  and  found  that  that is being  made from IpcBitsInLink_processBitBufs()  in ipcBitsInLink_tsk.c.

    I can  see  bitbuffers  reaching IPCBITSOUT LINK (M3)  normally (from the  time stamp) , but it is reaching late as a cluster of 8 bitbufs in IPCBITSIN LINK (A8) after sometime   the streaming  started. (This time  varies  from 2  mins  to 12 mins). The streaming  is  successful  for that period, during which IPCBITSIN Link can receive one bitbuffer at a time.

    I have attached the complete log.  I am unable to understand  why the M3 side is not able to push bitbuffers  to A8  side , all of a sudden.

    Would greatly appreciate your help

    Thanks

    JK

  • Cannot attach the log
  • Below is the last part of the log. "setting bitsInNotifySem.. " is inside the callback function App_ipcBitsInCbFxn



    [host] 49278: IPC_BITS_IN : Recevived 1 bitbufs !!!
    setting bitsInNotifySem..


    [host] Calling Svc_venc_getBitstreamBuffer..
    JK:3009: ipcBufList.numBufs= 1


    [host] Calling OSA_semWait..
    [m3video] 50717: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 49310: IPC_BITS_IN : Recevived 1 bitbufs !!!
    setting bitsInNotifySem..


    [host] Calling Svc_venc_getBitstreamBuffer..
    JK:3009: ipcBufList.numBufs= 1


    [host] Calling OSA_semWait..


    [host] 49342: IPC_BITS_IN : Recevived 1 bitbufs !!!
    setting bitsInNotifySem..


    [host] Calling Svc_venc_getBitstreamBuffer..
    JK:3009: ipcBufList.numBufs= 1


    [host] Calling OSA_semWait..
    [m3video] 50750: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 49375: IPC_BITS_IN : Recevived 1 bitbufs !!!
    setting bitsInNotifySem..


    [host] Calling Svc_venc_getBitstreamBuffer..
    JK:3009: ipcBufList.numBufs= 1


    [host] Calling OSA_semWait..
    [m3video] 50785: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 50817: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 50849: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 50885: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 50917: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 50949: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 50985: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 51017: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 51049: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 50933: IPC_BITS_IN : Recevived 8 bitbufs !!!
    setting bitsInNotifySem..


    [host] Calling Svc_venc_getBitstreamBuffer..
    JK:3009: ipcBufList.numBufs= 8
  • Hi,

    Have you added any other code on A8?

    It looks like the IPC Bits In threads are getting thrashed due to some other high priority activity on A8.

    Can you pl. test with the Notify mode for switching the buffers between IPC Bits Out and IPC Bits In by making the below changes in the ..\ipnc_rdk\ipnc_mcfw\mcfw\src_linux\mcfw_api\usecases\multich_ipcbits.c file?

    Void MultiCh_ipcBitsInitCreateParams_BitsOutRTOS(IpcBitsOutLinkRTOS_CreateParams *cp,
    Bool notifyPrevLink)
    {
    /* Next link of bitsOutRTOS is bitsInHLOS. So, notifyPrevLink
    * should be set to false if bitsInHLOS is to operate in
    * NO_NOTIFY_MODE
    */
    cp->baseCreateParams.noNotifyMode = FALSE;    //MULTICH_IPCBITS_NO_NOTIFY_BITSINHLOS;
    cp->baseCreateParams.notifyNextLink = TRUE;   //!(MULTICH_IPCBITS_NO_NOTIFY_BITSOUTHLOS);
    cp->baseCreateParams.notifyPrevLink = TRUE;   //notifyPrevLink;
    }

    Void MultiCh_ipcBitsInitCreateParams_BitsInHLOS(IpcBitsInLinkHLOS_CreateParams *cp)
    {
    VENC_CALLBACK_S *callback;
    Ptr cbCtx;

    cp->baseCreateParams.noNotifyMode = FALSE;  //MULTICH_IPCBITS_NO_NOTIFY_BITSINHLOS;
    Venc_getCallbackInfo(&callback, &cbCtx);
    cp->cbFxn = callback->newDataAvailableCb;
    cp->cbCtx = cbCtx;
    cp->baseCreateParams.notifyNextLink = TRUE; //FALSE;
    /* Previous link of bitsInHLOS is bitsOutRTOS. So, notifyPrevLink
    * should be set to false if bitsInHLOS is to operate in
    * NO_NOTIFY_MODE
    */
    cp->baseCreateParams.notifyPrevLink = TRUE; //!(MULTICH_IPCBITS_NO_NOTIFY_BITSINHLOS);
    }

     

    regards,

    Anand

  • Hi  Anand

    Yes, I have modified  the   stream write app (stream.c, and GetAVData() ). APIs  to support  SVC.

    I will  make your  changes  in multich_ipcbits.c file  and  let you know  the results tomorrow.

    Thanks and Regards

    JK

  • Hi Anand

    Made the changes suggested by you. The log is shown below.

    It is crashing after streaming for less than a minute.

    Best Regards

    JK

     Log

    -------

    host]  19583: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20668: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19619: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20704: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19651: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20736: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19684: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20768: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19720: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20804: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19751: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20836: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19783: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20868: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19819: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20904: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19851: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20936: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19883: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  20968: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19916: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  21000: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  19951: IPC_BITS_IN   : Recevived 1 bitbufs !!!
     [m3video]  21036: IPC_BITS_OUT   : Received 1 bitbufs !!!
     [m3video]  21068: IPC_BITS_OUT   : Received 1 bitbufs !!!
     [m3video]  21104: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  20092: IPC_BITS_IN   : Recevived 2 bitbufs !!!
     [m3video]  21196: IPC_BITS_OUT   : Received 1 bitbufs !!!
     [m3video]  21216: IPC_BITS_OUT   : Received 1 bitbufs !!!


     [host]  20157: IPC_BITS_IN   : Recevived 2 bitbufs !!!
     [m3video] Unhandled Exception:
     [m3video] Exception occurred in ThreadType_Task
     [m3video] handle: 0x8d0b9ff0.
     [m3video] stack base: 0x8d505f20.
     [m3video] stack size: 0x8000.
     [m3video] R0 = 0x004d1900  R8  = 0xffffffff
     [m3video] R1 = 0x8d50dc70  R9  = 0xffffffff
     [m3video] R2 = 0x8d50dc70  R10 = 0xffffffff
     [m3video] R3 = 0x8cb8b1ed  R11 = 0xffffffff
     [m3video] R4 = 0x00000124  R12 = 0x235c0200
     [m3video] R5 = 0xffffffff  SP(R13) = 0x8d50dc28
     [m3video] R6 = 0xffffffff  LR(R14) = 0x8cb99999
     [m3video] R7 = 0xffffffff  PC(R15) = 0x8cb8b24e
     [m3video] PSR = 0x21000000
     [m3video] ICSR = 0x0440f803
     [m3video] MMFSR = 0x00
     [m3video] BFSR = 0x82
     [m3video] UFSR = 0x0000
     [m3video] HFSR = 0x40000000
     [m3video] DFSR = 0x00000000
     [m3video] MMAR = 0x004d192c
     [m3video] BFAR = 0x004d192c
     [m3video] AFSR = 0x00000000
     [m3video] Terminating Execution...
    TimeOut occure in boot_proc.
    Program exit.


     [host]
    Usecase is Active !!!
    TimeOut occure in boot_proc.
    Program exit.

  • Hi,

     

    In the IPC Bits In callback function (App_ipcBitsRecvStreamFxn()) can you pass back the received bit stream buffers without consuming them and check?

    Venc_getBitstreamBuffer(&fullBufList, 0);

    Venc_releaseBitstreamBuffer(&fullBufList);

     

    regards,

    Anand

  • Hi Anand
    Tested with your change. It seems no problem until now. Running fine for the past 30 minutes. What does this indicate?
    Our streaming sever is a separate process. Earlier, I checked without starting the streaming server also. Problem remained the same.

    Best Regards
    JK
  • Hi,

     

    It indicates that there is some issue with the code running between Venc_getBitstreamBuffer(&fullBufList, 0); and Venc_releaseBitstreamBuffer(&fullBufList);.

    Now introduce delay (usleep(33 * 1000)) between these 2 functions and check if this is fine then you have to bebug your code for the crash.

     

    regards,

    Anand 

  • Hi Anand,

    After introducing the delay, it crashes, immediately.

    Pls find the log below.

    Best Regards
    JK

    Trace SetFailureReason enabled
    /dev/mem opened.
    Phy Addr : 0x48181560 Data : 0x00000002
    Unhandled fault: external abort on non-linefetch (0x1018) at 0x402220e4
    Phy Addr : 0x48180f10 Data : 0x00000000
    Phy Addr : 0x48180508 Data : 0x00000302
    Phy Addr : 0x48180520 Data : 0x00000002
    Phy Addr : 0x48180524 Data : 0x00000002
    Phy Addr : 0x48180528 Data : 0x00000002
    Phy Addr : 0x4c0000e4 Data : 0x00170209
    Bus error
    Creat queue id:0
    queue id:0
    FileMngThread created
    Creat queue id:32769
    queue id:32769
    AlramThread created
    Share memory init success
    IPNC_3.80.00 (jayakrishnan@jk-desktop) (gcc version 4.5.3 20110311 (prer
    Creat queue id:65538
    queue id:65538
    Creat queue id:98307
    queue id:98307
    queue id:32769


    [host] Setting L3 bandwidth regulator for [HDVICP0 ] to [press=[0,0] BW=900, WM Cycles=2500]


    [host] Setting DMM priority for [ISS ] to [0] ( 0x4e000634 = 0x00080000 )


    [host] Setting DMM priority for [HDVICP0 ] to [1] ( 0x4e000634 = 0x00000009 )


    [host] Attached to slave procId 1.


    [host] Setting L3 bandwidth regulator for [ISS ] to [press=[3,3] BW=400, WM Cycles=2500]


    [host] Loaded file ./firmware/ipnc_rdk_fw_m3vpss.xem3 on slave procId 1.


    [host] Started slave procId 1.


    [host] After Ipc_loadcallback status [0x00000000]


    [host] Attached to slave procId 0.
    [c6xdsp ] Remote Debug Shared Memory @ 0xbff00000
    [m3video] Remote Debug Shared Memory @ 0xbff05020
    [m3vpss ] Remote Debug Shared Memory @ 0xbff0a040


    [host] After Ipc_startcallback status [0x00000000]


    [host] Loaded file ./firmware/ipnc_rdk_fw_m3video.xem3 on slave procId 0.


    [host] Started slave procId 0.


    [host] After Ipc_loadcallback status [0x00000000]
    [m3video] ***** SYSTEM : Frequency <ORG> - 200000000, <NEW> - 200000000
    [m3video]
    [m3video] *** UTILS: CPU KHz = 400000 Khz ***
    [m3video]
    [m3video] 199: SYSTEM : System Common Init in progress !!!
    [m3video] 200: SYSTEM: IPC init in progress !!!
    [m3video] 200: SYSTEM: Attaching to [HOST] ...
    [m3vpss ] 239: SYSTEM: Attaching to [VIDEO-M3] ...
    [m3video] 249: SYSTEM: Attaching to [HOST] ...
    [m3vpss ] 289: SYSTEM: Attaching to [VIDEO-M3] ...
    [m3video] 283: SYSTEM: Attaching to [HOST] ... SUCCESS !!!
    [m3video] 283: SYSTEM: Attaching to [VPSS-M3] ...


    [host] After Ipc_startcallback status [0x00000000]
    [m3video] 333: SYSTEM: Attaching to [VPSS-M3] ...
    [m3video] 340: SYSTEM: Attaching to [VPSS-M3] ... SUCCESS !!!
    [m3vpss ] 339: SYSTEM: Attaching to [VIDEO-M3] ...
    [m3video] 340: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
    [m3vpss ] 340: SYSTEM: Attaching to [VIDEO-M3] ... SUCCESS !!!
    [m3vpss ] 340: SYSTEM: Creating MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
    [m3vpss ] 340: SYSTEM: Creating MsgQ [VPSS-M3_MSGQ] ...
    [m3vpss ] 341: SYSTEM: Creating MsgQ [VPSS-M3_ACK_MSGQ] ...
    [m3vpss ] 343: SYSTEM: Notify register to [HOST] line 0, event 12 ...
    [m3vpss ] 343: SYSTEM: Notify register to [VIDEO-M3] line 0, event 12 ...
    [m3vpss ] 343: SYSTEM: IPC init DONE !!!
    [m3vpss ] Received character 's'
    [m3vpss ] 359: MEM: Shared Region 2: Base = 0xb8000000, Length = 0x06900000 (105 MB)
    [m3vpss ] 359: MEM: Shared Region 1: Base = 0x89000000, Length = 0x03b00000 (59 MB)
    [m3vpss ] 362: SYSTEM : System Common Init Done !!!
    [c6xdsp ] Remote Debug Shared Memory @ 0xbff00000
    [m3video] Remote Debug Shared Memory @ 0xbff05020
    [m3vpss ] Remote Debug Shared Memory @ 0xbff0a040
    [m3video] 440: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
    [m3video] 441: SYSTEM: Creating MsgQ [VIDEO-M3_MSGQ] ...
    [m3video] 441: SYSTEM: Creating MsgQ [VIDEO-M3_ACK_MSGQ] ...
    [m3video] 443: SYSTEM: Notify register to [HOST] line 0, event 12 ...
    [m3video] 444: SYSTEM: Notify register to [VPSS-M3] line 0, event 12 ...
    [m3video] 444: SYSTEM: IPC init DONE !!!
    [m3video] 459: MEM: Shared Region 2: Base = 0xb8000000, Length = 0x06900000 (105 MB)
    [m3video] 460: MEM: Shared Region 1: Base = 0x89000000, Length = 0x03b00000 (59 MB)
    [m3video] 462: SYSTEM : System Common Init Done !!!
    [m3video] Received character 's'
    queue id:65538
    Creat queue id:131076
    queue id:131076

    CPU is TI812x

    *****************************************************************

    IPNC BUILD VERSION: IPNC RDK VERSION 03.80.00.05 (LOW POWER)

    *****************************************************************

    DEMOCFG Value : 0
    Videocodecmode : 8
    Videocodecres : 0
    streamtype : 2

    vsenable : 0
    ./bin/ipnc_rdk_mcfw.out TRISTREAM TRIPLE_H264 APPRO2A AEWB 1080P_D1 H264 HIGH_SPEED1 H264 HIGH_SPEED2 &
    Creat queue id:163845
    queue id:163845
    queue id:65538
    [c6xdsp ] Remote Debug Shared Memory @ 0xbff00000
    [m3video] Remote Debug Shared Memory @ 0xbff05020
    [m3vpss ] Remote Debug Shared Memory @ 0xbff0a040
    [m3vpss ] 662: SYSTEM : System VPSS Init in progress !!!
    [m3vpss ] PLATFORM: UNKNOWN CPU detected, defaulting to ISS_PLATFORM_CPU_REV_2_1
    [m3vpss ] 663: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_0] in region 0 ...
    [m3vpss ] 663: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_0] in region 0 ...
    [m3vpss ] 664: SYSTEM: ListElem Shared Addr = 0xbe984180
    [m3vpss ] 666: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_1] in region 0 ...
    [m3vpss ] 667: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_1] in region 0 ...
    [m3vpss ] 667: SYSTEM: ListElem Shared Addr = 0xbe987680
    ApproDrvInit: 7
    queue id:163845
    [m3vpss ] 681: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_24] in region 0 ...
    [m3vpss ] 681: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_24] in region 0 ...
    [m3vpss ] 682: SYSTEM: ListElem Shared Addr = 0xbe98ab80
    [m3vpss ] 684: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_25] in region 0 ...
    [m3vpss ] 685: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_25] in region 0 ...
    [m3vpss ] 685: SYSTEM: ListElem Shared Addr = 0xbe9aa580
    [m3vpss ] 688: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_26] in region 0 ...
    [m3vpss ] 689: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_26] in region 0 ...
    [m3vpss ] 689: SYSTEM: ListElem Shared Addr = 0xbe9c9f80
    [m3vpss ] 695: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_29] in region 0 ...
    [m3vpss ] 696: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_29] in region 0 ...
    [m3vpss ] 696: SYSTEM: ListElem Shared Addr = 0xbe9e9980
    [m3vpss ] 699: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_30] in region 0 ...
    [c6xdsp ] Remote Debug Shared Memory @ 0xbff00000
    [m3video] Remote Debug Shared Memory @ 0xbff05020
    [m3vpss ] Remote Debug Shared Memory @ 0xbff0a040
    [m3vpss ] 699: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_30] in region 0 ...
    [m3vpss ] 700: SYSTEM: ListElem Shared Addr = 0xbea03600
    [m3vpss ] 702: SYSTEM : Device Init in progress !!!
    [m3vpss ] Iss_init called !!!!!!
    [m3vpss ] CPIS_init DONE !!!!!!
    [m3vpss ] 708: SYSTEM : Device Init in progress DONE !!!
    [c6xdsp ] Remote Debug Shared Memory @ 0xbff00000
    [m3video] Remote Debug Shared Memory @ 0xbff05020
    [m3vpss ] Remote Debug Shared Memory @ 0xbff0a040
    [m3video] 761: SYSTEM : System Video Init in progress !!!
    [m3vpss ] Sensor in 1080p Mode...
    [m3video] 762: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_0] in region 0 ...
    [m3video] 763: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_0] in region 0 ...
    [m3video] 763: SYSTEM: ListElem Shared Addr = 0xbea1d280
    [m3video] 765: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_1] in region 0 ...
    [m3video] 766: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_1] in region 0 ...
    [m3video] 766: SYSTEM: ListElem Shared Addr = 0xbea20780
    [m3video] 776: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_29] in region 0 ...
    [m3video] 777: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_29] in region 0 ...
    [m3video] 777: SYSTEM: ListElem Shared Addr = 0xbea23c80
    [m3video] 779: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_30] in region 0 ...
    [m3video] 780: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_30] in region 0 ...
    [m3video] 780: SYSTEM: ListElem Shared Addr = 0xbea3d900
    [m3video] 782: HDVICP: Doing PRCM for IVAHD[0] ...
    [m3video] 783: HDVICP: PRCM for IVAHD[0] ... DONE.
    [m3video] 784: SYSTEM : Initializing Links !!!
    [m3video] 784: SYSTEM : FREE SPACE : System Heap = 2088976 B, Mbx = 10240 msgs)
    [m3video] 784: SYSTEM : FREE SPACE : SR0 Heap = 15372416 B (14 MB)
    [m3video] 785: SYSTEM : FREE SPACE : Frame Buffer = 110100352 B (104 MB)
    [m3video] 785: SYSTEM : FREE SPACE : Bitstream Buffer = 61865856 B (58 MB)
    [m3video] 786: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
    [m3video] 787: SYSTEM : FREE SPACE : Tiler Buffer = 128 B (0 MB) - TILER OFF
    [m3video] Entered the MctnfLink_init()
    [m3video] JKMM:svcEncLink_init.. linkId = 10000028
    [m3video]
    [m3video] 841: SYSTEM : Initializing Links ... DONE !!!
    [m3video] 841: SYSTEM : System Video Init Done !!!
    [m3vpss ] XXXXX DRV_imgsSetAgain() Error(1000)
    [m3vpss ] XXXXX DRV_imgsSetAgain() Error(1000)
    [m3vpss ] With IMX136 SETTING_-_-,DRV_imgsSetRegs,598 0
    [m3vpss ] 894: SYSTEM : System VPSS Init Done !!!
    [m3vpss ] 894: UTILS: DMA: HWI Create for INT62 !!!
    [m3vpss ] 894: SYSTEM : Initializing Links !!!
    [m3vpss ] 895: SYSTEM : FREE SPACE : System Heap = 1684624 B, Mbx = 10240 msgs)
    [m3vpss ] 895: SYSTEM : FREE SPACE : SR0 Heap = 15372416 B (14 MB)
    [m3vpss ] 895: SYSTEM : FREE SPACE : Frame Buffer = 105790336 B (100 MB)
    [m3vpss ] 8DMA: Module install successful, device major num = 248
    96: SYSTEM : FRDRV: Module install successful
    EE SPACE : BitstDRV: Module built on Jan 21 2015 13:17:29
    ream Buffer = 61865856 B (58 MB)
    [m3vpss ] 896: SYSTEM : FREE SPACE : Tiler Buffer = 128 B (0 MB) - TILER OFF
    [m3vpss ] 979: SYSTEM : Initializing Links ... DONE !!!
    [m3vpss ] Received character 't'
    [c6xdsp ] Remote Debug Shared Memory @ 0xbff00000
    [m3video] Remote Debug Shared Memory @ 0xbff05020
    [m3vpss ] Remote Debug Shared Memory @ 0xbff0a040
    [m3video] Received character 't'
    /dev/mem opened.
    Phy Addr : 0x48180e00 Data : 0x00030000
    Phy Addr : 0x48180e10 Data : 0x00000007
    Phy Addr : 0x48180e04 Data : 0x00000000
    Phy Addr : 0x48180e14 Data : 0x00000000
    Phy Addr : 0x48180800 Data : 0x00000001
    Phy Addr : 0x48180820 Data : 0x00070000
    Phy Addr : 0x48180824 Data : 0x00030002
    Phy Addr : 0x48180e04 Data : 0x00000000
    Phy Addr : 0x48180e00 Data : 0x00030000
    Phy Addr : 0x48180e10 Data : 0x00000007
    Phy Addr : 0x48180e04 Data : 0x00000000
    Phy Addr : 0x48180e14 Data : 0x00000000
    Phy Addr : 0x48180800 Data : 0x00000001
    Phy Addr : 0x48180820 Data : 0x00070000
    Phy Addr : 0x4818082DMA: ChannelID allocated:4
    4 Data : 0x00030DMA: ChannelID allocated:5
    002


    [host] Application Start Completed


    [host] 0: SYSTEM: System Common Init in progress !!!


    [host] 0: SYSTEM: IPC init in progress !!!


    [host] 11: SYSTEM: CPU [DSP] is NOT available on this platform !!!


    [host] 11: SYSTEM: CPU [VIDEO-M3] syslink proc ID is [0] !!!


    [host] 11: SYSTEM: CPU [VPSS-M3] syslink proc ID is [1] !!!


    [host] 11: SYSTEM: CPU [HOST] syslink proc ID is [2] !!!


    [host] 11: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...


    [host] 13: SYSTEM: Creating MsgQ [HOST_MSGQ] ...


    [host] 14: SYSTEM: Creating MsgQ [HOST_ACK_MSGQ] ...


    [host] 16: SYSTEM: Opening MsgQ [VIDEO-M3_MSGQ] ...


    [host] 16: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...


    [host] 17: SYSTEM: Notify register to [VIDEO-M3] line 0, event 12 ...


    [host] 18: SYSTEM: Notify register to [VPSS-M3] line 0, event 12 ...


    [host] 18: SYSTEM: IPC init DONE !!!


    [host] 20: SYSTEM: Creating ListMP [HOST_IPC_OUT_29] in region 0 ...


    [host] 22: SYSTEM: Creating ListMP [HOST_IPC_IN_29] in region 0 ...


    [host] 23: SYSTEM: ListElem Shared Addr = 0x40d64580


    [host] 24: SYSTEM: Creating ListMP [HOST_IPC_OUT_30] in region 0 ...


    [host] 26: SYSTEM: Creating ListMP [HOST_IPC_IN_30] in region 0 ...


    [host] 28: SYSTEM: ListElem Shared Addr = 0x40d7e200


    [host] 29: SYSTEM: Creating ListMP [HOST_IPC_OUT_24] in region 0 ...


    [host] 31: SYSTEM: Creating ListMP [HOST_IPC_IN_24] in region 0 ...


    [host] 33: SYSTEM: ListElem Shared Addr = 0x40d97e80


    [host] 34: SYSTEM: Creating ListMP [HOST_IPC_OUT_25] in region 0 ...


    [host] 36: SYSTEM: Creating ListMP [HOST_IPC_IN_25] in region 0 ...


    [host] 37: SYSTEM: ListElem Shared Addr = 0x40db7880


    [host] 38: SYSTEM: Creating ListMP [HOST_IPC_OUT_26] in region 0 ...


    [host] 40: SYSTEM: Creating ListMP [HOST_IPC_IN_26] in region 0 ...


    [host] 42: SYSTEM: ListElem Shared Addr = 0x40dd7280


    [host] 42: SYSTEM: System Common Init Done !!!


    [host] Vsys_allocBuf - addr = 0x4c722000,size = 65011712
    mem_layout = 0
    ##########pInfo->totalsize 63897600


    [host] MemMng_memcpy_open:OSA_dmaOpen passed with ch id = 4


    [host] CacheMng_MemCpy_open:OSA_dmaOpen passed with ch id = 5


    [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:Entered...

    [host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:Entered...

    [host] Vsys_allocBuf - addr = 0x51779000,size = 29127


    [host] DCC buffer allocated for size 29127


    [host] DCC Default File Intialization Done


    [host]
    ********** LOW POWER USECASE ********


    [host] ********* Entered Tri Streaming usecase - H264 1080p @60fps + H264 D1 @30fps + MJPEG 1080p @5fps ********



    [host] 61: MCFW : CPU Revision [ES1.0] !!!



    [host] 61: MCFW : Detected [UNKNOWN] Board !!!



    [host] 61: MCFW : Base Board Revision [UNKNOWN] !!!



    [host] cameraId = 2000003d


    [host] encId = 10000028


    [host] ipcOutVpssId = 20000000


    [host] ipcInVideoId = 10000002


    [host] ipcBitsOutRTOSId = 1000001d


    [host] ipcBitsInHLOSId = 3000001f


    [host] JK:gUI_mcfw_config.glbceEnable = 0


    [host] JK:gUI_mcfw_config.glbceEnable = 0


    [host] JK:gUI_mcfw_config.demoCfg.resolution_combo = 0
    JK:gUI_mcfw_config.demoCfg.resolution_combo = 0


    [host] JK:gUI_mcfw_config.glbceEnable = 0


    [host] JK:encPrm.vsEnable = 0


    [host] JK:encPrm.isVaUseCase = 0
    [m3vpss ] 1148: CAMERA: Create in progress !!!
    [m3vpss ] Channel Num Stream 0 Ch 0 ChannelNum 0
    [m3vpss ] Channel Num Stream 1 Ch 0 ChannelNum 1
    [m3vpss ] 1149: CAMERA: VIP0 PortA camera mode is [ 8-bit, Non-mux Embedded Sync] !!!
    [m3vpss ] 1150: CAMERA: VIP 0: VID DEC 268436750 (0x2d): 8edffda0:ffff0000:8ee0225c, AUD_STATUS -1897906968
    [m3vpss ] Iss_captCreate:1661
    [m3vpss ] 1372: CAMERA: Create Done !!!
    [m3vpss ] 1396: CAMERA: Detect video in progress !!!
    [m3vpss ] 1397: CAMERA: Detect video Done !!!
    [m3video] 1476: JKMM:1:SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_0] ...
    [m3vpss ] 1472: DUP : Create Done !!!
    [m3video] 1477:JKMM:2: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_0] ...
    [m3vpss ] 1474: MERGE : Create Done !!!
    [m3video] JKMM:svcEncLink_tskMain..
    [m3video]
    [m3video] 1480: SVCENCODE: Create in progress ... !!!
    [m3vpss ] DCC server task running
    [m3video] 1701: SVCENCODE: Receiving input frames from CH0 of 960 x 544, pitch = (1024, 1024) [PROGRESSIVE] [NON-TILED ], bitrate = 8000 Kbps ...
    [m3video] 1702: SVCENCODE: Receiving input frames from CH1 of 1920 x 1080, pitch = (1920, 1920) [PROGRESSIVE] [NON-TILED ], bitrate = 8000 Kbps ...
    [m3video] JKMM:DSKT2_createAlgExt..
    [m3video] JKMM:DSKT2 111 scratchId=-1, fxns=0x8cb5b69c, parentAlg=0x0, params=0x8d426604
    [m3video]
    [m3video] JKMM:DSKT2_createAlg3..
    [m3video] JKMM:DSKT2 3333 scratchId=-1, fxns=0x8cb5b69c, parentAlg=0x0, params=0x8d426604,extHeap=0x0, singleHeap=1
    [m3video] JKMM:DSKT2 5555 Num memory recs requested 20
    [m3video]
    [m3video] JKMM:DSKT2 8888 memTab allocated at 0x8d0bb178 size=0x140
    [m3video] JKMM:DSKT2 9999 Num memory recs requested 6
    [m3video] JKMM:DSKT2 10101010 Requested memTab[0]: size=0x2900, align=0x80,space=IALG_EXTERNAL, attrs=IALG_PERSIST
    [m3video] JKMM:DSKT2 10101010 Requested memTab[1]: size=0xc00, align=0x80,space=IALG_DARAM0, attrs=IALG_PERSIST
    [m3video] JKMM:DSKT2 10101010 Requested memTab[2]: size=0x1000, align=0x80,space=IALG_EXTERNAL, attrs=IALG_PERSIST
    [m3video] JKMM:DSKT2 10101010 Requested memTab[3]: size=0x380, align=0x80,space=IALG_DARAM0, attrs=IALG_PERSIST
    [m3video] JKMM:DSKT2 10101010 Requested memTab[4]: size=0x1000, align=0x80,space=IALG_EXTERNAL, attrs=IALG_PERSIST
    [m3video] JKMM:DSKT2 10101010 Requested memTab[5]: size=0x380, align=0x80,space=IALG_DARAM0, attrs=IALG_PERSIST
    [m3video] JKMM:DSKT2 12 12 12 12 Requested all memory in external memory space 16
    [m3video] JKMM:DSKT2 14 14 14 14 Allocated memTab[0]: base=0x8d0bb300, size=0x2900,align=0x80, space=IALG_ESDATA, attrs=IALG_PERSIST
    [m3video]
    [m3video] JKMM:DSKT2 14 14 14 14 Allocated memTab[1]: base=0x8d0bdc00, size=0xc00,align=0x80, space=IALG_ESDATA, attrs=IALG_PERSIST
    [m3video]
    [m3video] JKMM:DSKT2 14 14 14 14 Allocated memTab[2]: base=0x8d0be800, size=0x1000,align=0x80, space=IALG_ESDATA, attrs=IALG_PERSIST
    [m3video]
    [m3video] JKMM:DSKT2 14 14 14 14 Allocated memTab[3]: base=0x8d0bf800, size=0x380,align=0x80, space=IALG_ESDATA, attrs=IALG_PERSIST
    [m3video]
    [m3video] JKMM:DSKT2 14 14 14 14 Allocated memTab[4]: base=0x8d0bfb80, size=0x1000,align=0x80, space=IALG_ESDATA, attrs=IALG_PERSIST
    [m3video]
    [m3video] JKMM:DSKT2 14 14 14 14 Allocated memTab[5]: base=0x8d0c0b80, size=0x380,align=0x80, space=IALG_ESDATA, attrs=IALG_PERSIST
    [m3video]
    [m3video] JKMM:DSKT2 20 20 20 20 Algorithm init successful
    [m3video]
    [m3video] JKMM:DSKT2 21 21 21 21 (algHandle=0x8d0bb300)
    [m3video] JK:1809:H264SVCEncCreated: H264SVCENC_TI DEV.500.V.H264SVC.E.IVAHD.01.02.00.05
    [m3video] JK:2209:H264Enc version: H264ENC_TI DEV.500.V.H264AVC.E.IVAHD.01.00.06.00


    [host] IpcBitsInLink_tskMain:Entered

    [host] 725: IPC_BITS_IN : ListMPOpen start !!!


    [host] 725: SYSTEM: Opening ListMP [VIDEO-M3_IPC_OUT_29] ...


    [host] 727: SYSTEM: Opening ListMP [VIDEO-M3_IPC_IN_29] ...


    [host] 729: IPC_BITS_IN : ListMPOpen done !!!


    [host] 730: IPC_BITS_IN : System_linkGetInfo done !!!


    [host] USECASE SETUP DONE
    [m3video] ENCLINK_SVC:HEAPID:0 USED:26232
    [m3vpss ] 1819: CAMERA: Start in progress !!!
    [m3video] 1874: SVCENCODE: All CH Create ... DONE !!! Total no of Channels = 2
    [m3vpss ] 1819: CAMERA: Start Done !!!
    [m3video] SVCENCLINK:HEAPID:0 USED:26352
    [m3video] 1875: SVCENCODE: Create ... DONE !!!
    [m3video] 1678: VSTAB : Alg Create Done !!!
    [m3video] 1678: VSTAB : Create Done !!!


    [host]
    Application Run Completed
    [m3vpss ] 1976: CAMERA: Fields = 2 (fps = 0), Total Resets = 0 (Avg 0 ms per reset)
    [m3video] 2067: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 915: IPC_BITS_IN : Recevived 1 bitbufs !!!


    [host] ITT server task running !!!


    [host]
    ITT ittServer_run


    [host] ITT Server Message initialization successful


    [host]
    ITT capture task created


    [host] DCC server Message ques is open succefully


    [host] Setting cmd <1> in message <40c10c00>


    [host] Posting message <40c10c00> in QId <10002>
    [m3vpss ] Command 1 recived from HOST A8


    [host] 947: IPC_BITS_IN : Recevived 1 bitbufs !!!


    [host] Response from M3 is : 1


    [host] Response from M3 is : 1


    [host] Default parameters were sent sucessfully


    [host] Server Socket created with ID <22>
    [m3video] 2099: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3vpss ] Command 2 recived from HOST A8
    [m3vpss ] New DCC data of size <29127>
    [m3vpss ] Call to VNF_LINK_CMD_UPDATE_DCC -1
    [m3video] 2135: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 987: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2167: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1020: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2199: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1052: IPC_BITS_IN : Recevived 1 bitbufs !!!


    [host] 1084: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2235: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1116: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2267: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 2299: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1148: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2335: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1188: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2367: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1220: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2399: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1252: IPC_BITS_IN : Recevived 1 bitbufs !!!


    [host] 1287: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2435: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1319: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2467: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 2499: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1351: IPC_BITS_IN : Recevived 1 bitbufs !!!


    [host] 1383: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2535: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1415: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2567: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1447: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2599: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 2635: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1487: IPC_BITS_IN : Recevived 1 bitbufs !!!


    [host] 1520: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2667: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 2699: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1552: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2735: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1584: IPC_BITS_IN : Recevived 1 bitbufs !!!


    [host] 1616: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2767: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1648: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2799: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 2835: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1688: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] Unhandled Exception:
    [m3video] Exception occurred in ThreadType_Task
    [m3video] handle: 0x8d0b9ff0.
    [m3video] stack base: 0x8d505f20.
    [m3video] stack size: 0x8000.
    [m3video] R0 = 0x00c80600 R8 = 0xffffffff
    [m3video] R1 = 0x8d50dc70 R9 = 0xffffffff
    [m3video] R2 = 0x8d50dc70 R10 = 0xffffffff
    [m3video] R3 = 0x8cb8b1ed R11 = 0xffffffff
    [m3video] R4 = 0x00000124 R12 = 0x235c0200
    [m3video] R5 = 0xffffffff SP(R13) = 0x8d50dc28
    [m3video] R6 = 0xffffffff LR(R14) = 0x8cb99999
    [m3video] R7 = 0xffffffff PC(R15) = 0x8cb8b24e
    [m3video] PSR = 0x21000000
    [m3video] ICSR = 0x0440f803
    [m3video] MMFSR = 0x00
    [m3video] BFSR = 0x82
    [m3video] UFSR = 0x0000
    [m3video] HFSR = 0x40000000
    [m3video] DFSR = 0x00000000
    [m3video] MMAR = 0x00c8062c
    [m3video] BFAR = 0x00c8062c
    [m3video] AFSR = 0x00000000
    [m3video] Terminating Execution...
    JK: inside autorun
    sbulla: unknown partition table

    INIT: Entering runlevel: 5

    sbulla: unknown partition table
    Starting telnet daemon.
    Starting syslogd/klogd: done
  • Hi Anand

    With delay, it is crashing, after receiving few frames.

    Best Regards
    JK

    [host] 1584: IPC_BITS_IN : Recevived 1 bitbufs !!!


    [host] 1616: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2767: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1648: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] 2799: IPC_BITS_OUT : Received 1 bitbufs !!!
    [m3video] 2835: IPC_BITS_OUT : Received 1 bitbufs !!!


    [host] 1688: IPC_BITS_IN : Recevived 1 bitbufs !!!
    [m3video] Unhandled Exception:
    [m3video] Exception occurred in ThreadType_Task
    [m3video] handle: 0x8d0b9ff0.
    [m3video] stack base: 0x8d505f20.
    [m3video] stack size: 0x8000.
    [m3video] R0 = 0x00c80600 R8 = 0xffffffff
    [m3video] R1 = 0x8d50dc70 R9 = 0xffffffff
    [m3video] R2 = 0x8d50dc70 R10 = 0xffffffff
    [m3video] R3 = 0x8cb8b1ed R11 = 0xffffffff
    [m3video] R4 = 0x00000124 R12 = 0x235c0200
    [m3video] R5 = 0xffffffff SP(R13) = 0x8d50dc28
    [m3video] R6 = 0xffffffff LR(R14) = 0x8cb99999
    [m3video] R7 = 0xffffffff PC(R15) = 0x8cb8b24e
    [m3video] PSR = 0x21000000
    [m3video] ICSR = 0x0440f803
    [m3video] MMFSR = 0x00
    [m3video] BFSR = 0x82
    [m3video] UFSR = 0x0000
    [m3video] HFSR = 0x40000000
    [m3video] DFSR = 0x00000000
    [m3video] MMAR = 0x00c8062c
    [m3video] BFAR = 0x00c8062c
    [m3video] AFSR = 0x00000000
    [m3video] Terminating Execution...
    JK: inside autorun
    sbulla: unknown partition table

    INIT: Entering runlevel: 5

    sbulla: unknown partition table
    Starting telnet daemon.
    Starting syslogd/klogd: done
    c
  • Hi,

    I checked the same changes on my side on IPNC.

    I put a delay of 66 msec and the code is working fine.

    Which use case you are running?Full feature or low power?

    Can you take the clean IPNC code and put my changes (Notify an d delay) and make sure it is working?

    Then add your changes one by one and find out the problem point.

    regards,

    Anand 

  • Hi Anand

    Thanks for your reply.

    I am using low power usecase. I checked the raw ipnc code and added notify and delay changes. It has no issues for 66 msec.

    In the modified RDK, it could go upto 23 msec, not more than that. Could this be a real constraint?

    Going further, I see a sudden spurt in the cpu time (> 50% )for the process ipnc_rdk_mcfw.out during the problem time.

    What  does  your notify changes  really mean? What is the difference between both the cases (with and without your changes)?

    Best Regards

    JK

  • Hi,

     

    The default bitstream buffer switching mechanism was in polling mode. The IPC Bits In thread would periodically poll for the full bitstream buffers.

    I changed it to the interrupt mode. The IPC Bits In link is notified when there is a full buffer available.

     

    regards,

    Anand

  • HI,anand.
    You said that "I changed it to the interrupt mode".You mean that change the notify mode in the post?
    If so,which mode is better?Interrupt mode or poling mode?

    Expecting for your reply.