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.

Problem about LAD



Problem about LAD

I'm developing a video encode/decode system on evm6446.  Encoder and decoder are different processes.
Both process call the same x64P loopbackCombo.x64P which is from DVSDK.  The version Codec Engine is 2.10

I read the article about the LAD (http://wiki.davincidsp.com/index.php?title=Link_Arbiter_Daemon) and start lad.x470MV before any CE process.

If I run Encoder or decoder alonely, everything works OK. If I run Encoder/decode rat the same time, the later started process will fail
with calling of Engine_open with error code is 4. Could anyone help me?

I paste .cfg of my application and log.txt of lad.x470MV here.

/************************CFG ****************************/
/* Load support for the Codec Engine */
var osalGlobal = xdc.useModule( 'ti.sdo.ce.osal.Global' );


/* Configure CE to use it's DSP Link Linux version */
osalGlobal.runtimeEnv = osalGlobal.DSPLINK_LINUX;

/* Enable SoCrates tracing in the demo */
var TraceUtil = xdc.useModule('ti.sdo.ce.utils.trace.TraceUtil');
TraceUtil.attrs = TraceUtil.SOCRATES_TRACING;

/* Load support for H.264 encode and decode */
var H264DEC = xdc.useModule('ti.sdo.codecs.h264dec.ce.H264DEC');
var H264ENC = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC');

/*
 *  ======== Engine Configuration ========
 */
var Engine = xdc.useModule('ti.sdo.ce.Engine');
/*
var demoEngine = Engine.create("encodedecode", [
    {name: "videnc", mod: H264ENC, local: false, groupId: 0},
    {name: "viddec", mod: H264DEC, local: false, groupId: 0},

]);
*/
var demoEngine = Engine.createFromServer(
    "encodedecode",        // Engine name (as referred to in the C app)
    "./loopbackCombo.x64P", // path to server exe, relative to its package dir
    "ti.sdo.servers.loopback" // server package
    );

demoEngine.algs[0].name = "videnc";
demoEngine.algs[1].name = "viddec";

/* for LAD */
osalGlobal.useLinkArbiter = true;
//osalGlobal.useLinkArbiter = false;
if (Program.platformName == "ti.platforms.evmDM6446") {
    demoEngine.linkCfg = "CE_default";
}else if (Program.platformName == "ti.platforms.evmDM6467") {
    demoEngine.linkCfg = "CE_default6467";
}else {
    demoEngine.linkCfg = "";
}

/************************log.txt***************************/

 opening FIFO: /tmp/LAD/LADCMDS

LAD_CONNECT:
    client FIFO name = /tmp/LAD/1182
    client PID = 1182
    assigned client handle = 0
    FIFO /tmp/LAD/1182 created
    FIFO /tmp/LAD/1182 opened for writing
    sent response 0;0;
DONE

LAD_STARTUPDSP:
    cpuId = 0
    configName = CE_default
    imageName = loopbackCombo.x64P
    absolute server path = /root/21/loopbackCombo.x64P
    client handle = 0
    linkConfigId = 1
    PROC_setup - OK
    PROC_Attach - OK
    PROC_Load - OK
    POOL_Open - OK
    PROC_Start - OK
    MSGQ_TransportOpen - OK
    LAD_SUCCESS
    sent response string 0
DONE

LAD_CONNECT:
    client FIFO name = /tmp/LAD/1189
    client PID = 1189
    assigned client handle = 1
    FIFO /tmp/LAD/1189 created
    FIFO /tmp/LAD/1189 opened for writing
    sent response 0;1;
DONE

LAD_STARTUPDSP:
    cpuId = 0
    configName = CE_default
    imageName = loopbackCombo.x64P
    absolute server path = /root/21/loopbackCombo.x64P
    client handle = 1
    linkConfigId = 1
    LAD_ALREADYRUNNING
    sent response string 4

DONE

LAD_RELEASEDSP:
    client handle = 1
    sent response 5
DONE

LAD_DISCONNECT:
    client handle = 1
    closing FIFO /tmp/LAD/1189
DONE

LAD_RELEASEDSP:
    client handle = 0
    MSGQ_TransportClose - OK
    PROC_Stop - OK
    POOL_Close - OK
    PROC_Detach - OK
    PROC_Destroy - OK
    sent response 0
DONE

LAD_DISCONNECT:
    client handle = 0
    closing FIFO /tmp/LAD/1182
DONE