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.

How to create 2 or more OMX components on the DSP?

Hi TI experts,

Suppose that i want to create two or more different in functionality OMX component that will run on the DSP. Since only one firmware is loaded for the DSP, the two or more different  in functionality OMX components should be compiled on the same firmware. I know that it is possible since this is the situation for the HDVPSS firmware.
My question is how is that goal should be achieved consistent to what has been done in the HDVPSS?  

Thanks,
Gabi 

  • Gabi,

    OMX code has OMX Base and derived component. So base remains common for all different components. You can write 2 different derived component and use the same base. It is pretty much same as HDVPSS components. 

    Regards

    Vimal

  • Hi Vimal,

    Thank you very much for your answer, if i understand correctly i need to see how the DSP module VLPB is derived from OMX Base, then create a new component that will be derived from OMX base in a similar way. Is that correct?

    Thanks,
    Gabi  

  • Gabi,

    That's right. It needs to be written in similar lines as VLPB. actual data processing function and configuration will be different.

    Regards

    Vimal

  • Hi Vimal,

    I have followed what you have suggested and created another DSP component by writing in similar lines to the VLPB, when i try to get handle for this component in ilclient i receive the following error message

    OmxRpc.c:582: OmxRpc_Instance_init: Assertion `(OmxRpc_errorNone == retVal)' failed.

    Can you please advice?

    Gabi

  • Gabi,

    Have you added this component in DOMX as well ? For debugging you can try naming and corresponding componentInit  it same as VLPB component. 

    Regards

    Vimal

  • Vimal,

    I beleive i have followed all the places VLPB appear in including the files domx_cfg.c domx_cfg.h domx_compfn_defs..h domxProxyWrappers.c also in omxcore_cfg.h

    in dm81xx/src/app_cfg.h and in makefile component.mk

    My component functions are compiled and linked in DSP firmware and can be seen in the DSP firmware map file
    Maybe EZSDK users which are not TI workers don't have access to all source files and makefiles and in some places there are object files received from TI that can not be changed?

    Gabi

  • Hi Vimal,

    Now i am sure that EZSDK user which is not TI user can not create new component on the DSP.
    In that post http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/144078.aspx#520139

    Archith John Bency says "I think the problem is that the file where we set the variable value OMXBASE_DIOFQCFG_MODSTAT_CURSRREGIONBUF in the struct  DioFQCFG is present in an object file omxbase_cfg.oe674 which is not and cannot be built in the EZSDK as available on the web. I guess thats why changing the macro value didnt work for you." 

    This file discussed above is called omx_05_02_00_15/packages/ti/omx/demos/dm81xx/src/app_cfg.h and in this file beside the OMXBASE_DIOFQCFG_MODSTAT_CURSRREGIONBUF there is also the definition of DOMX_CORE_vlpb_c6xdsp for the vlpb component and i have added the definition of my component which is called vasm DOMX_CORE_vasm_c6xdsp as seen below, and if this definition is not compiled my component can not return an handle.
    Can you please help me compile omxbase_cfg.oe674 with my new component?

    ///////  app_cfg.h  //////////////////////////////////////////

    /* Details of each of the CoreInfoTbl entries are below... */
    /* Component 0 */
    #define DOMX_CORE_vlpb_c6xdsp /* Signifies that vlpb runs on DSP core */

    #define DOMX_CORE_vasm_c6xdsp /* Signifies that vasm runs on DSP core */

    /* OMX Base DioFQ */
    #ifdef _LOCAL_CORE_c6xdsp_
    #define MEMCFG_NUMFQSHAREDREGIONS (3) /* was changed according to Archith answer was (1)*/
    #endif
    #define OMXBASE_DIOFQCFG_NUMFQSHAREDREGIONS (MEMCFG_NUMFQSHAREDREGIONS)

    #define OMXBASE_DIOFQCFG_MODSTAT_CURSRREGIONBUF (2) /* was changed according to Archith answer was (0)*/
    #define OMXBASE_DIOFQCFG_MODSTAT_CURSRREGIONCTRLCACHEON (0)
    #define OMXBASE_DIOFQCFG_MODSTAT_CURSRREGIONCTRLCACHEOFF (1)

    /* Nothing beyond this point */
  • Gabi,

    There is nothing in omx_base for component specific part. All things are in DOMX and omx_core. Please check omx_core.h, omx_core_cfg.h / domc_cfg.h file, where VLPB init function is defined. app_cg.h has 

    #define DOMX_CORE_vlpb_c6xdsp
    just to signify that it is DSP component, as It could be made for A8 as well. This definition is used only in domx/omx_core. And you have omx_core and domx source code.
    Regards
    Vimal
  • Vimal,

    In the file omx_core.h there is no reference to vlpb
    Beside the files you wrote change was also done in files domxProxyWrappers.c and domx_cfg.c
    In omxcore_cfg.h i have added my component vasm similar to vlpb
    In the file domx_cfg.h i have added my component vasm similar to vlpb the only thing is that needed attention is that there was a numeration that need to be changed as follows:

    #ifdef DOMX_OMXPROXY_VLPB
    {
    OMX_VLPB_HOSTCOMP_NAME,
    customConfigInfo_16,
    },
    #endif
    #ifdef DOMX_OMXPROXY_VLPB
    {
    OMX_VLPB_DSPCOMP_NAME,
    customConfigInfo_17,
    },
    #endif

    #ifdef DOMX_OMXPROXY_VASM
    {
    OMX_VASM_HOSTCOMP_NAME,
    customConfigInfo_18,
    },
    #endif
    #ifdef DOMX_OMXPROXY_VASM
    {
    OMX_VASM_DSPCOMP_NAME,
    customConfigInfo_19,
    },
    #endif
    and
    OmxProxy_configParamStructInfo customConfigInfo_16[] =
    {
    /* Table terminator */
    {(OmxIndex_OMX_INDEXTYPE) OMX_IndexMax, 0}
    };

    OmxProxy_configParamStructInfo customConfigInfo_17[] =
    {
    /* Table terminator */
    {(OmxIndex_OMX_INDEXTYPE) OMX_IndexMax, 0}
    };

    OmxProxy_configParamStructInfo customConfigInfo_18[] =
    {
    /* Table terminator */
    {(OmxIndex_OMX_INDEXTYPE) OMX_IndexMax, 0}
    };

    OmxProxy_configParamStructInfo customConfigInfo_19[] =
    {
    /* Table terminator */
    {(OmxIndex_OMX_INDEXTYPE) OMX_IndexMax, 0}
    };
    
    

     

  • Vimal,

    Can you please refer?

    Thanks,
    Gabi 

  • Gabi,

    Did you mean you are not able to get it up still ?? I had checked reference for VLPB, only domx / omx_core has references. app_cfg.h was only to have dsp side component, which you can define locally for vasm.

    Regards

    Vimal

  • Hi Vimal,

    Thank you very much for you answer.
    I didn't succeed in geting my VASM component up yet.
    I see refernce for vlpb in the following files:
    domxProxyWrappers.c
    domx_compfn_defs.h
    domx_cfg.c
    domx_cfg.h
    omxcore_cfg.h
    omxcore_cfg.c

    Are there any other files need to be changed?

    i have wonders about what i need to do in the file domx_cfg.c should i add my module as follows?
    (i have added the numbers customConfigInfo_18 and customConfigInfo_19)  :

    OmxProxy_configParamStructInfo customConfigInfo_16[] =
    {
    /* Table terminator */
    {(OmxIndex_OMX_INDEXTYPE) OMX_IndexMax, 0}
    };

    OmxProxy_configParamStructInfo customConfigInfo_17[] =
    {
    /* Table terminator */
    {(OmxIndex_OMX_INDEXTYPE) OMX_IndexMax, 0}
    };

    OmxProxy_configParamStructInfo customConfigInfo_18[] =
    {
    /* Table terminator */
    {(OmxIndex_OMX_INDEXTYPE) OMX_IndexMax, 0}
    };

    OmxProxy_configParamStructInfo customConfigInfo_19[] =
    {
    /* Table terminator */
    {(OmxIndex_OMX_INDEXTYPE) OMX_IndexMax, 0}
    };
    
    
    #ifdef DOMX_OMXPROXY_VLPB
    {
    OMX_VLPB_HOSTCOMP_NAME,
    customConfigInfo_16,
    },
    #endif
    #ifdef DOMX_OMXPROXY_VLPB
    {
    OMX_VLPB_DSPCOMP_NAME,
    customConfigInfo_17,
    },
    #endif

    #ifdef DOMX_OMXPROXY_VASM
    {
    OMX_VASM_HOSTCOMP_NAME,
    customConfigInfo_18,
    },
    #endif
    #ifdef DOMX_OMXPROXY_VASM
    {
    OMX_VASM_DSPCOMP_NAME,
    customConfigInfo_19,
    },
    #endif

     

     Thanks,
    Gabi 

  • Gabi,

    That is right..have you modified DomxCore_componentCoreInfoTblEntries also ? Also do not use #ifedef  _build_xxxx , as these comes from makefile, so untill you add components in make file, it will not get defined. Also I assume you are defining this DOMX_OMXPROXY_VASM locally ? 

    Regards

    Vimal

  • Vimal,

    I have modified DomxCore_componentCoreInfoTblEntries as well. I didn't define DOMX_OMXPROXY_VASM localy but i add it in a similar way to where DOMX_OMXPROXY_VLPB has been, I have use #ifedef  _build_xxxx because i have added VASM to omx_xx_xx_xx_xx/packages/component.mk as follows:

    omx_COMP_LIST_c6xdsp = adec vlpb vasm

    and in omx_xx_xx_xx_xx/packages/ti/omx/demos/dm81xx/makefile as follows:

    COMP_LIST_c6xdsp = memcfg domx omxcore vlpb vasm adec

    and in omx_xx_xx_xx_xx/packages/ti/omx/demos/omxobjs/makefile as follows:

    COMP_LIST_c6xdsp = memcfg omxbase domx omxcore vlpb vasm adec

    Am i doing OK?

    Thanks,
    Gabi 

  • It seems to be alright..Are you able to see, where it gets stuck ? Is it not finding the component name ? 

    Regards

    Vimal

  • Hi Vimal,

    The DSP firmware is created, in the DSP map file i can see the VASM functions as well as the VLPB functions. DSP firmware is loaded successfully. The ILclient code that uses VASM component (based on capture-encode example) is compiled and an executable is created, when i run the ILclient executable, first it is trying to get handle for all the components as well as the VASM component, when it tries to get an handle for the VASM component it receive the following error message

    OmxRpc.c:582: OmxRpc_Instance_init: Assertion `(OmxRpc_errorNone == retVal)' failed.

    Thanks,
    Gabi 

  • Hi Vimal,

    Can you please refer?

    Gabi

  • Gabi,

    As I had suggested, did you try renaming VLPB to something else and see if it works. It would have given us good pointer if we are missing something. 

    Regards

    Vimal

  • Hi Gabi,

    Were you able to make two different OMX components that run on the DSP by creating another component similar to the VLPB component? I have followed this thread and done all of the steps you and TI have discussed but when I try to create my component (OMX_GetHandle) I get the OMX error: OMX_ErrorComponentNotFound.

    Please let me know if you were able to accomplish this, and if you have any other pointers to get it running.

    Thanks,

    Justin 

  • Hi Justin,

    I didn't succeed in that although i did put a lot of effort into it, i am sure it is possible because there are the audio coders created by TI beside the VLPB, but i gave it up because i could manage with out it. 
    Anyway good luck and please update me if you have succeeded in that.

    Gabi 

  • I recently grep'd a large part of my filesystem in search for vlpb symbols and I found the pre-built library libtiomx.so.5.2 with the symbol DomxProxy_OMX_TI_VLPB_ComponentInit. Although this may not be individually responsible for my OMX_ErrorComponentNotFound error, this may suggest that there are compiled dependencies for the VLPB component. 

    I also looked at some OMX_GetHandle source code in src/ti/omx/omxcore/src/omx_core.c. OMX_ErrorComponentNotFound is thrown when a simple strcmp comparison between members of OMXComponentList[] and the OMX_STRING parameter of OMX_GetHandle yields no matches. I have tried explicitly adding my custom component to OMXComponentList[] and it cannot find a match. When I try removing OMX.TI.C67X.VLPB component from the list, I get a segmentation fault. All of my leads are turning into smoke. It would be great if someone from TI can look into this problem.

    Justin 

  • Hi Justin,

    I am sorry to hear that you can't get it done, i suggest that you open a new thread in the forumת maybe this way you will get response from TI employee.

    Gabi

  • Hello Justin,

    If you are seeing this error:

    Error in Get Handle function : OMX_ErrorComponentNotFound

    This means that probably you are not cp the newest binaries which are created when you build the overlay package. But first you should add the new component there.

    BR
    Margarita