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.

DM814x CE package Engine_open() call fails

Hi,

I have created CE package for he-aac audio. The CE package works properly in DM816x EVM. When the same package is built on DM814x EZSDK, the sample application gets stuck in Engine_open(engineName, NULL, NULL) call and after 10-15 minutes it returns backs saying the codec engine has not found.

I have placed  xxxx_enc_server_DSP.xe674 file in the same folder and calling CERuntime_init() function as soon as the application starts.

Is there any settings particular to DM814x CE package?

Warm Regards,

Karthick

  • Hello,

    You could check this guide how to enable the CE debug :
    processors.wiki.ti.com/.../CE_DEBUG

    Did you follow this guide?

    http://processors.wiki.ti.com/index.php/OMX_AAC_LC_Encoder_Integration_in_EZSDK



    BR
    Margarita

  • Hi Margarita,

    Thank you for the response!

    I have tried CE_DEBUG=3 already. Unfortunately, it did not give any debug message.

    Coming to the second link: Our audio enocder CE package is different from the link you shared. We do not use OMX for IPC communication between A8 to DSP and vice versa.

    The same package if I run it on DM816x EVM, it works properly.

    Instead of ./firmware_loader 0 xxx_enc_server_DSP.xe674 start, Engine_Open call supposedly does the same function.

    Warm Regards,
    Karthick
  • Hello,

    Are you using same xx_enc_server_DSP.xe674 firmware for both boards?

    Or one is for dm816x and one for dm814x ?

    BR
    Margarita

  • Hi Margarita,

    I tried using same xx_enc_server_DSP.xe674 firmaware for both boards.

    And I built xx_enc_server_DSP.xe674 built on dm814x as well as dm816x. But the results seems to be same. If I run the firmware on dm816x EVM, it works. If I run it on dm814x, it get stuck in Engine_Open() call.

    Warm Regards,
    Karthick
  • Hello,

    It would be better if you build the firmware for DM814x as for Dm816x. Please verify that you apply the same steps but for Dm814x.
    One of the reason for engine_open fail is if you try to open two engines.
    Check this wiki:
    processors.wiki.ti.com/.../Codec_Engine_FAQ

    You could try to verify is the "engineName" match.
    Refer to this thread:
    e2e.ti.com/.../105180

    Let me know the result.

    BR
    Margarita
  • Hi Margarita,

    I don't get any CE_ DEBUG prints as well.

    I have verified it again and engine name of Engine_open() call matches with .cfg file.

    root@dm814x-evm:~#
    root@dm814x-evm:~# cd /mnt/aud_codec/
    root@dm814x-evm:/mnt/aud_codec#
    root@dm814x-evm:/mnt/aud_codec# ./loadmodules.sh
    root@dm814x-evm:/mnt/aud_codec# CE_DEBUG=3 ./heaacv2_enc_app.xv5T
    -ifile:27.wav -ofile:27_aac.aac -br:128000 -ps_enable:0 -aac_only:1 -adts:1
    Stream bit rate = 128 kbps

    If you see from above log that CE DEBUG does not give out any log value even though I run with CE_DEBUG=3.

    Warm Regards,

    Karthick

  • Hello,

    Could you check with the default codec engine demos in ezsdk are you seeing debug prints on your side(refer the user guide for how to run it)?
    Let me know the result. I will check for the possible reasons why you do not see debugging logs and I will get back to you when I have something.

    BR
    Margarita
  • Hi Margarita,

    I have a question. Is Codec Engine feature is available in DM814x? If it is available, do you have to enable or something?

    Warm Regards,

    Karthick

  • Hello,

    Which CE feature? Not sure that I understand what you mean.
    CE is the same version in EZSDK 5.05.02 for both devices DM8168 and DM8148.

    Regards,
    Margarita
  • Hi Margarita,

    I am sorry for being abstract.

    CE_DEBUG=3 suppose to give a debug message. But here I do not see any message.

    Is Codec Engine calls supported in DM8148? I am using Mistral EVM which supposedly using 1 GB memory map. Do I have to change anything in the syslink or cmem?

    Warm Regards,
    Karthick
  • Hi Margarita,

    This is log If I try to run sample CE example:

    [t=0x0000baa8] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x100670)
    [t=0x0000baf4] [tid=0x4006d000] ti.sdo.ce.Engine: [+1] Engine addEngineToList> Adding desc: name = local, remoteName = (null)
    [t=0x0000bb59] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x30)
    [t=0x0000bba3] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x1006a8)
    [t=0x0000bc12] [tid=0x4006d000] ti.sdo.ce.osal.Global: [+E] Global_atexit> Enter (fxn=0x569c8)
    [t=0x0000bc85] [tid=0x4006d000] ti.sdo.ce.Server: [+E] Server_init()
    [t=0x0000bcc9] [tid=0x4006d000] ti.sdo.ce.Server: [+E] Server_init> Global_useLinkArbiter = 0
    [t=0x0000bd17] [tid=0x4006d000] ti.sdo.ce.osal.Global: [+E] Global_atexit> Enter (fxn=0x4b894)
    [t=0x0000bd75] [tid=0x4006d000] xdc.runtime.Main: [+2] main> ti.sdo.ce.examples.apps.audio1_copy
    [t=0x0000bf2a] [tid=0x40080490] ti.sdo.ce.ipc.Processor: [+1] daemon> thread created.
    [t=0x0000c036] [tid=0x40080490] ti.sdo.ce.ipc.Processor: [+E] getCmd_d> Enter (proc=0x4007fdc4)
    [t=0x0000c26b] [tid=0x4006d000] xdc.runtime.Main: [+1] App-> Application started, procId DSP engineName remote_copy_DSP input-file ./in.dat output-file ./out.dat.
    [t=0x0000c2f6] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x400)
    [t=0x0000c342] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_contigAlloc> Enter(size=0x400, align=0x0, cached=FALSE, heap=FALSE)
    [t=0x0000c3e9] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_alloc(0x400) = 0x40001000.
    [t=0x0000c453] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_getPhys(0x40001000) = 0x947ff000.
    [t=0x0000c4b4] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> Enter(virtAddr=0x40001000, size=0x400, physAddr=0x947ff000)
    [t=0x0000c51f] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> creating new contigBuf object
    [t=0x0000c57a] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> returning: cb->phys=0x947ff000, cb->size=0x400, cb->virt=0x40001000
    [t=0x0000c5eb] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_contigAlloc> return (0x40001000)
    [t=0x0000c63a] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x40001000)
    [t=0x0000c687] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x400)
    [t=0x0000c6cf] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_contigAlloc> Enter(size=0x400, align=0x0, cached=FALSE, heap=FALSE)
    [t=0x0000c74d] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_alloc(0x400) = 0x400c8000.
    [t=0x0000c7b2] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_getPhys(0x400c8000) = 0x947fe000.
    [t=0x0000c811] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> Enter(virtAddr=0x400c8000, size=0x400, physAddr=0x947fe000)
    [t=0x0000c87d] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> creating new contigBuf object
    [t=0x0000c8d6] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> returning: cb->phys=0x947fe000, cb->size=0x400, cb->virt=0x400c8000
    [t=0x0000c946] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_contigAlloc> return (0x400c8000)
    [t=0x0000c996] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x400c8000)
    [t=0x0000c9e2] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x400)
    [t=0x0000ca2a] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_contigAlloc> Enter(size=0x400, align=0x0, cached=FALSE, heap=FALSE)
    [t=0x0000caa6] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_alloc(0x400) = 0x40a36000.
    [t=0x0000cb0b] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_getPhys(0x40a36000) = 0x947fd000.
    [t=0x0000d795] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> Enter(virtAddr=0x40a36000, size=0x400, physAddr=0x947fd000)
    [t=0x0000d80a] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> creating new contigBuf object
    [t=0x0000d924] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> returning: cb->phys=0x947fd000, cb->size=0x400, cb->virt=0x40a36000
    [t=0x0000d9f5] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_contigAlloc> return (0x40a36000)
    [t=0x0000da48] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x40a36000)
    [t=0x0000da94] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x80)
    [t=0x0000dadb] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_contigAlloc> Enter(size=0x80, align=0x0, cached=FALSE, heap=FALSE)
    [t=0x0000db5c] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_alloc(0x80) = 0x40b20000.
    [t=0x0000dbc2] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_getPhys(0x40b20000) = 0x947fc000.
    [t=0x0000dc20] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> Enter(virtAddr=0x40b20000, size=0x80, physAddr=0x947fc000)
    [t=0x0000dc8a] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> creating new contigBuf object
    [t=0x0000dce2] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> returning: cb->phys=0x947fc000, cb->size=0x80, cb->virt=0x40b20000
    [t=0x0000dd50] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_contigAlloc> return (0x40b20000)
    [t=0x0000dda1] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x40b20000)
    [t=0x0000dded] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x400)
    [t=0x0000de34] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_contigAlloc> Enter(size=0x400, align=0x0, cached=FALSE, heap=FALSE)
    [t=0x0000deb0] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_alloc(0x400) = 0x40bbc000.
    [t=0x0000df15] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+4] Memory_contigAlloc> CMEM_getPhys(0x40bbc000) = 0x947fb000.
    [t=0x0000df73] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> Enter(virtAddr=0x40bbc000, size=0x400, physAddr=0x947fb000)
    [t=0x0000dfde] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> creating new contigBuf object
    [t=0x0000e035] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+1] Memory__addContigBuf> returning: cb->phys=0x947fb000, cb->size=0x400, cb->virt=0x40bbc000
    [t=0x0000e0a5] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_contigAlloc> return (0x40bbc000)
    [t=0x0000e0f4] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x40bbc000)
    [t=0x0000ed3b] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] Engine_open> Enter('remote_copy_DSP', 0xbe869b6c, 0xbe869af4)
    [t=0x0000edab] [tid=0x4006d000] ti.sdo.ce.Engine: [+1] Engine_open> desc->memMap [0x0], desc->useExtLoader [0]
    [t=0x0000ee05] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x40)
    [t=0x0000ee50] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x100a58)
    [t=0x0000ee9c] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] rmsInit> Enter(engine=0x100a58, ec=0xbe869af4)
    [t=0x0000eeee] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] rmsInit> engine->desc = 0x100640
    [t=0x0000ef35] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] rmsInit> engine->desc->algTab = 0xd1214
    [t=0x0000ef81] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] rmsInit> found remote alg viddec_copy
    [t=0x0000efcd] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] rmsInit> engine has server!
    [t=0x0000f011] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] rmsInit> engine->procId = DSP
    [t=0x0000f05e] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] rmsInit> engine->coreId = 0
    [t=0x0000f0a7] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] rserverOpen('all_DSP.xe674'), count = 0
    [t=0x0000f0f4] [tid=0x4006d000] ti.sdo.ce.Engine: [+E] rserverOpen >, memMap = 0x0, useExtLoader = 0
    [t=0x0000f146] [tid=0x4006d000] ti.sdo.ce.ipc.Processor: [+E] Processor_create> Enter(imageName='all_DSP.xe674', memMap='(null)', attrs=0xbe869ae0)
    [t=0x0000f852] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+E] Memory_alloc> Enter(0x3c)
    [t=0x0000f8ad] [tid=0x4006d000] ti.sdo.ce.osal.Memory: [+X] Memory_alloc> return (0x100aa0)
    [t=0x0000f8fb] [tid=0x4006d000] ti.sdo.ce.ipc.Processor: [+E] doCmd> Enter (cmdId=1, proc=0x100aa0)
    [t=0x0000f978] [tid=0x40080490] ti.sdo.ce.ipc.Processor: [+X] getCmd_d> Exit (result=1)
    [t=0x0000f9c6] [tid=0x40080490] ti.sdo.ce.ipc.Processor: [+E] Processor_create_d> Enter(proc=0x100aa0)
    [t=0x0000fa18] [tid=0x40080490] ti.sdo.ce.ipc.Processor: [+2] Processor_create_d> Retrieving CPU ID for 'DSP'...
    [t=0x0000fa74] [tid=0x40080490] ti.sdo.ce.ipc.Processor: [+2] Processor_create_d> Opening DSP ProcMgr for cpuId 0...
    [t=0x0000ff6a] [tid=0x40080490] ti.sdo.ce.ipc.Processor: [+2] Processor_create_d> Attaching to DSP...
    [t=0x0001139f] [tid=0x40080490] ti.sdo.ce.ipc.Processor: [+2] Processor_create_d> Loading all_DSP.xe674 on DSP (0 args)...


    It hangs.

    Warm Regards,
    Karthick
  • Hi Margarita,

    Thanks a lot for your support!

    I am able to run the encoder CE package now. I have changed a lot of things in the package. I can give the exact root cause as soon as possible.

    Warm Regards,
    Karthick
  • Hello,

    I am glad that you are able to run it.
    I will  appreciate if you share what was the root cause.

    BR
    Margarita