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.

OMAP-L138 C6748 DSP and TI's speech codecs

Other Parts Discussed in Thread: OMAP-L138, OMAP3530

Hi

I came across this site: http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C64XPlus_Speech/index_FDS.html while searching for g722 and g726 codecs to use with Codec Engine. Can these be run on my OMAP-L138 DSP?

I'm planning to write a Linux application that would encode/decode speech samples. Can those codecs be executed remotely through a Linux application?

Regards
Szymon

  • Szymon,

    The C674x DSP core on C6748 and OMAP-L138 is instruction set compatible with C67x and C64x cores so the codec should be compatible as well.  Plus, the download site has the following statement:

    SUPPORTED PLATFORMS:All these speech modules can be used on any of the C64x+ based platforms like DM644x, DM646x, OMAP3530, DM648, C6466 and C674x

    The following statement from the site indicates that you can execute the codec remotely from Linux using Codec Engine:

    All codecs are eXpressDSP compliant and implement one of the XDM 1.0 interfaces.
    Each codec is XDC packaged and validated on DM6446 EVM in a Codec Engine based test framework.

    -Tommy

  • Hi

     

    Thank you for your swift answer. Since I'm a CE newbie I just wanted to make sure I'm on the right track here before I commit to this solution

     

    Regards
    Szymon

  • Hi!

    I'm trying my best to make everything work, but I encountered a problem I cannot sort out on my own.

    Here is what I did so far:

    - I added the g726 encoder and decoder to my codec server configuration file like this:

    var G726ENC     = xdc.useModule('ti.sdo.codecs.g726enc.ce.G726ENC');
    var G726DEC     = xdc.useModule('ti.sdo.codecs.g726dec.ce.G726DEC');

    and to Server.algs struct:

    {name: "g726enc", mod: G726ENC, threadAttrs: {
            stackMemId: 0, priority: Server.MINPRI + 3}
        },
        {name: "g726dec", mod: G726DEC, threadAttrs: {
            stackMemId: 0, priority: Server.MINPRI + 3}

    I did everything per analogiam to what was done with g711 encoder and decoder in TI's examples. The only big difference is that the g711 is in source code form whereas g726 is only a library.For the server to compile and link correctly I added two lines in link.cmd:

    -l/home/szymonk/proj/OMAP-L138_arm_1_00_00_11/codec_engine_2_25_00_05/ti_codecs/packages/ti/sdo/codecs/g726enc/lib/g726enc_tii.l64P \
    -l/home/szymonk/proj/OMAP-L138_arm_1_00_00_11/codec_engine_2_25_00_05/ti_codecs/packages/ti/sdo/codecs/g726dec/lib/g726dec_tii.l64P

    The codec server builds without any problems.

    The problem arises when I try to instantiate the g726 codec in my Linux application. I had no problems with the g711a/u encoder/decoder given by TI as an example, what I'm doing is:

    - call Engine_open like that: ce_handle = Engine_open(ENGINE_NAME, NULL, NULL)) where ENGINE_NAME is:  #define ENGINE_NAME "speech_codecs" - this call passes without a problem

    - call SPHENC1_create(ce_handle, G726_ENC_NAME, &g726_enc_params);
    G726_ENC_NAME is 
    g726enc as stated in my codec server configuration

    My g726_enc_params struct is defined as follows:
    ISPHENC1_Params g726_enc_params = {
        sizeof(ISPHENC1_Params),
        sizeof(short),              /* frameSize */
        ISPEECH1_G726_COMPAND_LINEAR,  /* companding */
        ISPEECH1_G726_PACKTYPE_LINEAR,                          /* packingType */
        0,                          /* vadSelection*/
        0,                          /* codecSelection */
        ISPEECH1_G726_BITRATE_32,                          /* bitRate */
        0,                          /* reserved */
        NULL                        /* tablesPtr isn't supported */
    };

    When I run my application with CE_DEBUG=1 I get:

    @0,325,871us: [+6 T:0x4001cf40] CE - Engine_init> CE debugging on (CE_DEBUG=1; allowed CE_DEBUG levels: 1=min, 2=good, 3=max)
    [DSP] @0x0000012f:[T:0x00000000] ti.sdo.ce.examples.servers.speech_codecs - main> Welcome to DSP server's main().
    @7,450,035us: [+6 T:0x44160490] CE - Engine_createNode> Remote node creation FAILED (0x80008008).
    [DSP] @0,041,742tk: [+7 T:0xc2c2048c] ti.sdo.ce.alg.Algorithm -
    Algorithm_create> Algorithm creation FAILED; make sure that 1) alg params are correct/appropriate, 2)
    there is enough internal and external algorithm memory available -- check DSKT2 settings for heap assignments and scratch allocation

    My DSKT2 settings are default from the OMAP-L138_arm_1_00_00_11/codec_engine_2_25_00_05/examples/ti/sdo/ce/examples/servers/all_codecs/all.cfg file:

    var DSKT2 = xdc.useModule('ti.sdo.fc.dskt2.DSKT2');
    DSKT2.DARAM0     = "L1DHEAP";
    DSKT2.DARAM1     = "L1DHEAP";
    DSKT2.DARAM2     = "L1DHEAP";
    DSKT2.SARAM0     = "L1DHEAP";
    DSKT2.SARAM1     = "L1DHEAP";
    DSKT2.SARAM2     = "L1DHEAP";
    DSKT2.ESDATA     = "DDRALGHEAP";
    DSKT2.IPROG      = "L1DHEAP";
    DSKT2.EPROG      = "DDRALGHEAP";
    if (platform.match("evmOMAPL13[78]")) {
        DSKT2.DSKT2_HEAP = "SDRAM";
    }
    else {
        DSKT2.DSKT2_HEAP = "DDR2";
    }

    DSKT2.ALLOW_EXTERNAL_SCRATCH = false;
    DSKT2.SARAM_SCRATCH_SIZES[0] = 32*1024;

     

    When I run with CE_DEBUG=3 (only the relevant part I think):

    @9,401,304us: [+0 T:0x44160490 S:0x4415fcd4] ti.sdo.ce.speech1.SPHENC1 - SPHENC1_create> Enter (engine=0x3a940, name='g726enc', params=0x38510)
    @9,401,607us: [+0 T:0x44160490 S:0x4415fbd4] CV - VISA_create2(0x3a940, 'g726enc', 0x38510, 0x14, 0x248, 'ti.sdo.ce.speech1.ISPHENC1')
    @9,401,870us: [+0 T:0x44160490 S:0x4415fbbc] OM - Memory_alloc> Enter(0x34)
    @9,402,081us: [+0 T:0x44160490 S:0x4415fbbc] OM - Memory_alloc> return (0x3aba0)
    @9,402,279us: [+0 T:0x44160490 S:0x4415fb5c] CE - Engine_createNode(0x3a940, 'g726enc', 248, 0x38510, 0x14, 0x4415fccc)
    @9,402,528us: [+0 T:0x44160490 S:0x4415fb5c] CE - Engine> allocNode Enter(engine=0x3a940, impId='g726enc')
    @9,402,736us: [+0 T:0x44160490 S:0x4415fb44] OM - Memory_alloc> Enter(0x20)
    @9,402,933us: [+0 T:0x44160490 S:0x4415fb44] OM - Memory_alloc> return (0x3abd8)
    @9,403,157us: [+0 T:0x44160490 S:0x4415fb5c] CE - Engine> allocNode(). Calling (Comm_create(gppfromnode_358_1, 0x3abe0, NULL)
    @9,403,357us: [+0 T:0x44160490 S:0x4415fb34] OC - Comm_create> Enter(queueName='gppfromnode_358_1', queue=0x3abe0, attrs=0x0)
    @9,403,557us: [+0 T:0x44160490 S:0x4415fb1c] OM - Memory_alloc> Enter(0x4)
    @9,403,750us: [+0 T:0x44160490 S:0x4415fb1c] OM - Memory_alloc> return (0x3ac00)
    @9,404,911us: [+0 T:0x44160490 S:0x4415fb34] OC - Comm_create> return (0x3ac00)
    @9,405,256us: [+0 T:0x44160490 S:0x4415fb3c] OC - Comm_put> Enter(queue=0x0, msg=0x4496ac80)
    @9,405,573us: [+0 T:0x44160490 S:0x4415fb3c] OC - Comm_put> return (0)
    @9,405,793us: [+0 T:0x44160490 S:0x4415fb34] OC - Comm_get> Enter(queue=0x10000, msg=0x4415fbe4, timeout=-1)
    @9,407,722us: [+0 T:0x44160490 S:0x4415fb34] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    @9,408,038us: [+0 T:0x44160490 S:0x4415fb34] OC - Comm_delete> Enter (comm=0x3ac00)
    @9,408,906us: [+0 T:0x44160490 S:0x4415fb14] OM - Memory_free> Enter(0x3ac00, 0x4)
    @9,409,213us: [+0 T:0x44160490 S:0x4415fb14] OM - Memory_free> return (0x1)
    @9,409,460us: [+0 T:0x44160490 S:0x4415fb54] OC - Comm_delete> return
    @9,744,758us: [+0 T:0x44160490 S:0x4415fb3c] OM - Memory_free> Enter(0x3abd8, 0x20)
    @9,745,032us: [+0 T:0x44160490 S:0x4415fb3c] OM - Memory_free> return (0x1)
    @9,745,241us: [+6 T:0x44160490 S:0x4415fb5c] CE - Engine_createNode> Remote node creation FAILED (0x80008008).
    @9,745,463us: [+0 T:0x44160490 S:0x4415fac4] OC - Comm_put> Enter(queue=0x0, msg=0x4496ac80)
    @9,745,753us: [+0 T:0x44160490 S:0x4415fac4] OC - Comm_put> return (0)
    @9,746,282us: [+0 T:0x44160490 S:0x4415fabc] OC - Comm_get> Enter(queue=0x10000, msg=0x4415fb5c, timeout=-1)
    @9,746,565us: [+0 T:0x44160490 S:0x4415fabc] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    [DSP] @1,221,489tk: [+0 T:0xc2c2048c S:0xc2c2144c] CR - processRmsCmd(0xc2f06ca8, 4056): cmd = 0
    [DSP] @1,221,543tk: [+0 T:0xc2c2048c S:0xc2c2133c] OM - Memory_alloc> Enter(size=0x18)
    [DSP] @1,221,585tk: [+0 T:0xc2c2048c S:0xc2c2133c] OM - Memory_alloc> return (0xc2c21f48)
    [DSP] @1,221,628tk: [+0 T:0xc2c2048c S:0xc2c2133c] OM - Memory_alloc> Enter(size=0xa)
    [DSP] @1,221,667tk: [+0 T:0xc2c2048c S:0xc2c2133c] OM - Memory_alloc> return (0xc2c21f60)
    [DSP] @1,221,715tk: [+0 T:0xc2c2048c S:0xc2c21304] OM - Memory_alloc> Enter(size=0x20)
    [DSP] @1,221,755tk: [+0 T:0xc2c2048c S:0xc2c21304] OM - Memory_alloc> return (0xc2c21f70)
    [DSP] @1,221,797tk: [+0 T:0xc2c2048c S:0xc2c212d4] OM - Memory_alloc> Enter(size=0x24)
    [DSP] @1,221,837tk: [+0 T:0xc2c2048c S:0xc2c212d4] OM - Memory_alloc> return (0xc2c21f90)
    [DSP] @1,221,898tk: [+0 T:0xc2c2048c S:0xc2c212ec] ti.sdo.ce.speech1.SPHENC1 - SPHENC1_create> Enter (engine=0x0, name='g726enc', params=0xc2f06cc0)
    [DSP] @1,221,963tk: [+0 T:0xc2c2048c S:0xc2c211dc] CV - VISA_create2(0x0, 'g726enc', 0xc2f06cc0, 0x14, 0x248, 'ti.sdo.ce.speech1.ISPHENC1')
    [DSP] @1,222,030tk: [+0 T:0xc2c2048c S:0xc2c21184] CE - Engine_open> Enter('local', 0xc2c211d4, 0xc2c55e94)
    [DSP] @1,222,080tk: [+0 T:0xc2c2048c S:0xc2c21164] OM - Memory_alloc> Enter(size=0x2c)
    [DSP] @1,222,120tk: [+0 T:0xc2c2048c S:0xc2c21164] OM - Memory_alloc> return (0xc2c22000)
    [DSP] @1,222,167tk: [+0 T:0xc2c2048c S:0xc2c21184] CE - Engine_open> return(-1027465216)
    [DSP] @1,222,222tk: [+0 T:0xc2c2048c S:0xc2c211bc] OM - Memory_alloc> Enter(size=0x34)
    [DSP] @1,222,262tk: [+0 T:0xc2c2048c S:0xc2c211bc] OM - Memory_alloc> return (0xc2c22030)
    [DSP] @1,222,306tk: [+0 T:0xc2c2048c S:0xc2c21194] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter(fxns=0xc2c69684, idma3Fxns=0x0, iresFxns=0x0, params=0x)
    [DSP] @1,222,381tk: [+0 T:0xc2c2048c S:0xc2c21174] OM - Memory_alloc> Enter(size=0x10)
    [DSP] @1,222,421tk: [+0 T:0xc2c2048c S:0xc2c21174] OM - Memory_alloc> return (0xc2c22068)
    [DSP] @1,222,546tk: [+7 T:0xc2c2048c S:0xc2c21194] ti.sdo.ce.alg.Algorithm - Algorithm_create> Algorithm creation FAILED; make sure that 1) alg params are cn
    [DSP] @1,222,649tk: [+0 T:0xc2c2048c S:0xc2c21174] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Enter(alg=0xc2c22068)
    [DSP] @1,222,707tk: [+0 T:0xc2c2048c S:0xc2c21144] OM - Memory_free> Enter(addr=0xc2c22068, size=16)
    [DSP] @1,222,754tk: [+0 T:0xc2c2048c S:0xc2c21144] OM - Memory_free> return (0x1)
    [DSP] @1,222,792tk: [+0 T:0xc2c2048c S:0xc2c21174] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Exit
    [DSP] @1,222,836tk: [+0 T:0xc2c2048c S:0xc2c21194] ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0x0)
    [DSP] @1,222,880tk: [+2 T:0xc2c2048c S:0xc2c211dc] CV - VISA_create2> FAILED to create local codec.
    [DSP] @1,222,923tk: [+0 T:0xc2c2048c S:0xc2c211ac] CV - VISA_delete(0xc2c22030)
    [DSP] @1,222,964tk: [+5 T:0xc2c2048c S:0xc2c211ac] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff)
    [DSP] @1,223,017tk: [+0 T:0xc2c2048c S:0xc2c2117c] OM - Memory_free> Enter(addr=0xc2c22030, size=52)
    [DSP] @1,223,063tk: [+0 T:0xc2c2048c S:0xc2c2117c] OM - Memory_free> return (0x1)
    [DSP] @1,223,100tk: [+0 T:0xc2c2048c S:0xc2c212ec] ti.sdo.ce.speech1.SPHENC1 - SPHENC1_create> return (0x0)
    [DSP] @1,223,150tk: [+0 T:0xc2c2048c S:0xc2c212dc] ti.sdo.ce.speech1.SPHENC1 - SPHENC1_delete> Enter (handle=0x0)
    [DSP] @1,223,195tk: [+0 T:0xc2c2048c S:0xc2c212ac] CV - VISA_delete(0x0)
    [DSP] @1,223,231tk: [+0 T:0xc2c2048c S:0xc2c212dc] ti.sdo.ce.speech1.SPHENC1 - SPHENC_delete> return
    [DSP] @1,223,274tk: [+0 T:0xc2c2048c S:0xc2c212c4] OM - Memory_free> Enter(addr=0xc2c21f90, size=36)
    [DSP] @1,223,320tk: [+0 T:0xc2c2048c S:0xc2c212c4] OM - Memory_free> return (0x1)
    [DSP] @1,223,357tk: [+0 T:0xc2c2048c S:0xc2c212cc] OM - Memory_free> Enter(addr=0xc2c21f70, size=32)
    [DSP] @1,223,403tk: [+0 T:0xc2c2048c S:0xc2c212cc] OM - Memory_free> return (0x1)
    [DSP] @1,223,441tk: [+0 T:0xc2c2048c S:0xc2c21354] OM - Memory_free> Enter(addr=0xc2c21f60, size=10)
    [DSP] @1,223,488tk: [+0 T:0xc2c2048c S:0xc2c21354] OM - Memory_free> return (0x1)
    [DSP] @1,223,525tk: [+0 T:0@10,088,479us: [+0 T:0x44160490 S:0x4415fac4] OC - Comm_put> Enter(queue=0x0, msg=0x4496ac80)
    @10,088,810us: [+0 T:0x44160490 S:0x4415fac4] OC - Comm_put> return (0)
    @10,089,139us: [+0 T:0x44160490 S:0x4415fabc] OC - Comm_get> Enter(queue=0x10000, msg=0x4415fb5c, timeout=-1)
    @10,089,652us: [+0 T:0x44160490 S:0x4415fabc] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    xc2c2048c S:0xc2c21354] OM - Memory_free> Enter(addr=0xc2c21f48, size=24)
    [DSP] @1,223,571tk: [+0 T:0xc2c2048c S:0xc2c21354] OM - Memory_free> return (0x1)
    [DSP] @1,620,139tk: [+0 T:0xc2c2048c S:0xc2c2144c] CR - processRmsCmd(0xc2f06ca8, 4056): cmd = 5
    [DSP] @1,620,185tk: [+0 T:0xc2c2048c S:0xc2c2144c] CR - remote time = 0x0, trace buffer size = 4032
    [DSP] @2,022,158tk: [+0 T:0xc2c2048c S:0xc2c2144c] CR - processRmsCmd(0xc2f06ca8, 4056): cmd = 5
    [DSP] @2,022,204tk: [+0 T:0xc2c2048c S:0xc2c2144c] CR - remote time = 0x0, trace buffer size = 4032
    @10,090,881us: [+0 T:0x44160490 S:0x4415faf4] CE - Engine_fwriteTrace> returning count [4834]
    @10,091,107us: [+2 T:0x44160490 S:0x4415fb5c] CE - Engine_createNode> Returning 0x0
    @10,091,511us: [+2 T:0x44160490 S:0x4415fbd4] CV - VISA_create2> FAILED to create remote codec (0x8).
    @10,091,725us: [+0 T:0x44160490 S:0x4415fbac] CV - VISA_delete(0x3aba0)
    @10,091,910us: [+5 T:0x44160490 S:0x4415fbac] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff)
    @10,092,112us: [+0 T:0x44160490 S:0x4415fb8c] OM - Memory_free> Enter(0x3aba0, 0x34)
    @10,092,364us: [+0 T:0x44160490 S:0x4415fb8c] OM - Memory_free> return (0x1)
    @10,092,573us: [+0 T:0x44160490 S:0x4415fcd4] ti.sdo.ce.speech1.SPHENC1 - SPHENC1_create> return (0x0)

    Could you pleas guide me to a correct solution? If there is any more information needed on my problem please let me know.

    Kind regards
    Szymon

  • Szymon,

    That's beyond my reach here in the product forums.  You may want to try the Embedded Software area for Linux/Codec support: http://e2e.ti.com/support/embedded/default.aspx

    -Tommy