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.

Switching DSP Server from Remote to Local

Our system is a DM6446 running Linux with dvsdk_2_00_00_22 that contains codec_engine_2_23_01 and dsplink-1_61_03-prebuilt.  I currently have built a DSP server with the Codec Engine Wizard. I believe the DSP server builds a remote (dsp side) server.  I now want to make a local (arm side) DSP server instead.

What steps do I need to take to accomplish this?

Thanks,

Danny

  • A quick clarification of terms - a 'Server' is only used when your codecs/algs are 'remote'.  If you want to configure your codecs to be on the same processor as the app (i.e., local), you don't need a Server.  This is kind of like using a 'Web Server' if your files are "somewhere else" (e.g. 'remote').  If you move those files locally, you no longer need a Server to access those files.

    To change the location of your codecs, you need to modify the configuration of the app's "Engine" (an Engine is a collection of codecs that can be used concurrently).  This is done in the app's cfg script.  When codecs are remote, you typically create/configure your Engine with Engine.createFromServer() function - a utility fxn which creates and initializes an Engine with all the codecs in a given Server.  When you don't have a Server, you create your Engine with Engine.create() rather than Engine.createFromServer().

    Concretely, you probably need to switch from Engine.createFromServer() to Engine.create()... something like this:

    var myAlg = xdc.useModule(
        'ti.sdo.ce.examples.codecs.universal_copy.UNIVERSAL_COPY');

    var Engine = xdc.useModule('ti.sdo.ce.Engine');
    var myEngine = Engine.create("universal_copy" /* engine name */, [
        {
            name : "universal_copy",  /* alg name */
            mod  : myAlg,             /* alg module handle */
            local: true               /* alg is local */
        }
    ]);

    If you look at the CE examples (examples/ti/sdo/ce/examples/apps/*) you'll typically see 2 config scripts - remote.cfg and local.cfg.  These 'move' the codecs from being remote to being local - note that by design, the application doesn't have to change at all(!).

    Finally, if you will still have some remote codecs in a Server, and just want to add a few local algs to that Engine.createFromServer()-created Engine, this section article describes how to do that:

    http://processors.wiki.ti.com/index.php/Configuring_Codec_Engine_in_Arm_apps_with_createFromServer#Adding_local_codecs_to_engine_configured_with_createFromServer.28.29

    Chris

  • Chris,

    This helped a lot.  I have added a local .cfg file and now I am getting an undefined reference to my iuniversal algorithm.  I wasn't receiving this error when building it as a server so what else might I be missing.

    /home/dmarsh/sdk/myapps/telexApps/audioApp/app_cfg_local/package/cfg/app_cfg_local_x470MV.o470MV:(.data.rel+0x58): undefined reference to `ADPCM_ENC_VEGA_IADPCM_ENC'

    The path to my algorithm is:

    /home/dmarsh/sdk/myapps/dspAlgorithms/vega/codecs/adpcm_enc

    Thanks,

    Danny

  • Is that symbol something your algorithm library should be supplying?  If so, are you returning your algorithm library in your algorithm package's package.xs::getLibs() function?  (getLibs() is how each package contributes its library(s) to the generated linker command file.)

    Maybe posting your package.xs::getLibs() function would help see what's going on?

    Chris

  • I think I figured it out.  I had created an algorithm with the Code Composer Studio GenCodecPkg Wizard.  The problem is it doesn't create the algorithm so it can be built as a local algorithm on the Arm side.  When I ran the GenCodecPkg Wizard from linux it allowed me to select an Arm v5T GCC Linux target and then everything built correctly.

    Thanks.

    Danny

  • Great, thanks for the update.  In older versions of CE, GenCodecPkg only supported creating an alg built for one target - which is what you're seeing.

    FWIW, in CE 2.26+, we added multiple target support to GenCodecPkg's "create an alg from scratch" mode.  This lets alg producers provide, from a single package, support for multiple targets... allowing users of this alg to easily move it from one side to the other.

    Here's a screen shot, notice the multiple checkboxes now available for the Targets field:

    Finally, note that this screenshot is actually from CE 3.x, where we've moved to SYS/BIOS 6.  While not available on all heterogeneous devices, this allows CE to include ELF support, as well as support for other targets like ARM M3's.  Only worth mentioning to help convey that GenCodecPkg's list of targets will vary depending on the release of CE you're using.

    Chris