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.

Codec Engine Examples on BeagleBoard xM (DM3730)

Other Parts Discussed in Thread: DM3730

Hello

I use A BeagleBoard xM with a DM3730 SoC and try to get the audio1_copy example from the CodecEngine to work. To build it i used OpenEmbedded.

The standard loadmodules.sh were not able to load so i changed it from:

root@beagleboard: modprobe cmemk phys_start=0x85000000 phys_end=0x86000000 pools=20x4096,10x131072,2x1048576

to:

root@beagleboard: modprobe cmemk allowOverlap=1 phys_start=0x86300000 phys_end=0x87300000 pools=20x4096,10x131072,2x1048576

and my bootargs are:

dvimode=hd720 mpurate=1000 mem=99M@0x80000000 mem=384M@0x88000000

When i try to run the example i get an error:

root@beagleboard:/usr/share/ti/ti-codec-engine-examples/audio1_copy# CE_DEBUG=1
./app_remote.xv5T
@0,168,792us: [+6 T:0x4001df90] CE - Engine_init> CE debugging on (CE_DEBUG=1; allowed CE_DEBUG levels: 1=min, 2=good, 3=max)
@0,169,006us: [+2 T:0x4001df90] ti.sdo.ce.examples.apps.audio1_copy.sync - main> ti.sdo.ce.examples.apps.audio1_copy.sync
@0,169,250us: [+1 T:0x4001df90] ti.sdo.ce.examples.apps.audio1_copy.sync - App-> Application started.
@0,188,140us: [+7 T:0x4096b490] OP - Processor_create_d> Loading and starting DSP server 'all.x64P' FAILED, status=[0x80008050] (look for error code 'DSP_EBASE + 0x50' in dsplink*/packages/dsplink/gpp/inc/usr/errbase.h)
@0,188,232us: [+6 T:0x4096b490] OP - Processor_delete_d> Closing remote transport FAILED, status=0x80008002.
@0,188,293us: [+6 T:0x4096b490] OP - Processor_delete_d> Stopping DSP FAILED, status=0x80008002
@0,188,323us: [+6 T:0x4096b490] OP - Processor_delete_d> Closing pool FAILED, status=0x80008000
@0,188,354us: [+6 T:0x4096b490] OP - Processor_delete_d> Detaching from DSP FAILED, status=0x80008000
@0,188,751us: [+6 T:0x4001df90] CE - rserverOpen: can't start 'all.x64P'; Processor_create failed
app: error: can't open engine audio1_copy
@0,189,361us: [+1 T:0x4001df90] ti.sdo.ce.examples.apps.audio1_copy.sync - app done.
root@beagleboard:/usr/share/ti/ti-codec-engine-examples/audio1_copy#

I also tried to copy the all.x64P server directly to the folder (instead of the link to it) without success.

The audio1_copy.log file with CE_DEBUG=3 is attached.

Would be nice if one could help me to solve the proplem.

 

Thanks

Wendelin

 

4401.audio1_copy.log

  • In the CE_DEBUG=3 provided log, you'll find this:

    @0,522,613us: [+3 T:0x4096b490 S:0x4096ad04] OP - entry #7:
    @0,522,644us: [+3 T:0x4096b490 S:0x4096ad04] OP -   entry = 0x7
    @0,522,644us: [+3 T:0x4096b490 S:0x4096ad04] OP -   name = "DDRALGHEAP"
    @0,522,674us: [+3 T:0x4096b490 S:0x4096ad04] OP -   physAddr = 0x86000000
    @0,522,705us: [+3 T:0x4096b490 S:0x4096ad04] OP -   dspVirtAddr = 0x86000000
    @0,522,705us: [+3 T:0x4096b490 S:0x4096ad04] OP -   gppVirtAddr = 0xffffffff
    @0,522,735us: [+3 T:0x4096b490 S:0x4096ad04] OP -   size = 0x1800000
    @0,522,735us: [+3 T:0x4096b490 S:0x4096ad04] OP -   shared = FALSE
    @0,522,766us: [+3 T:0x4096b490 S:0x4096ad04] OP -   syncd = FALSE

    <snip>

    @0,522,949us: [+3 T:0x4096b490 S:0x4096ad04] OP - entry #9:
    @0,522,949us: [+3 T:0x4096b490 S:0x4096ad04] OP -   entry = 0x9
    @0,522,979us: [+3 T:0x4096b490 S:0x4096ad04] OP -   name = "CMEM"
    @0,523,010us: [+3 T:0x4096b490 S:0x4096ad04] OP -   physAddr = 0x86300000
    @0,523,010us: [+3 T:0x4096b490 S:0x4096ad04] OP -   dspVirtAddr = 0x86300000
    @0,523,040us: [+3 T:0x4096b490 S:0x4096ad04] OP -   gppVirtAddr = 0xffffffff
    @0,523,040us: [+3 T:0x4096b490 S:0x4096ad04] OP -   size = 0x1000000
    @0,523,071us: [+3 T:0x4096b490 S:0x4096ad04] OP -   shared = FALSE
    @0,523,101us: [+3 T:0x4096b490 S:0x4096ad04] OP -   syncd = FALSE

    Looks like the DDRALGHEAP and CMEM sections overlap, and that's probably why the load is failing.

    The CMEM section is discovered at runtime, so you can move that around with insmod params.  The DDRALGHEAP is built into the DSP executable, so if you want to change that, you'll have to modify the BIOS examples/ti/sdo/ce/examples/servers/all_codecs/all_evm3530.tci script and rebuild all.x64P.

    Chris

  • Thanks for the fast answer

     

    First i tried to change my bootargs to:

    dvimode=hd720 mpurate=1000 mem=90M@0x80000000 mem=384M@0x88000000

    and my cmem arguments to:

    root@beagleboard: modprobe cmemk allowOverlap=1 phys_start=0x85000000 phys_end=0x86000000 pools=20x4096,10x131072,2x1048576

    which results again in

    FATAL: Error inserting cmemk (/lib/modules/2.6.32/kernel/drivers/dsp/cmemk.ko): Bad address

     


    Because this did not work i tried to change the codec_engine_2_26_01_09/examples/ti/sdo/ce/examples/servers/all_codecs/all_evm3530.tci to:

    {
        comment:    "DDRALGHEAP: off-chip memory for dynamic algmem allocation",
        name:       "DDRALGHEAP",
        base:       0x87300000,
        len:        0x01800000,  // 24 MB
        space:      "code/data"
    },
    {
        comment:    "DDR2: off-chip memory for application code and data",
        name:       "DDR2",
        base:       0x88B00000,
        len:        0x00600000,  // 6 MB
        space:      "code/data"
    },
    {
        comment:    "DSPLINK: off-chip memory reserved for DSPLINK code and data",
        name:       "DSPLINKMEM",
        base:       0x89100000,
        len:        0x00100000,  // 1 MB
        space:      "code/data"
    },
    {
        comment:    "RESET_VECTOR: off-chip memory for the reset vector table",
        name:       "RESET_VECTOR",
        base:       0x89200000,
        len:        0x00001000,  // 4 KB
        space:      "code/data"
    },


    ,recompiled the server

    kli@kli-laptop:~/OE/setup-scripts$ MACHINE=beagleboard ./oebb.sh bitbake -c compile -f ti-codec-engine

    and checked the codec_engine_2_26_01_09/examples/ti/sdo/ce/examples/servers/all_codecs/package/info/bin/ti_platforms_evm3530/all.x64P.DataSheet.html whether the changes worked. Then i copied the new codec_engine_2_26_01_09/examples/ti/sdo/ce/examples/servers/all_codecs/bin/ti_platforms_evm3530/all.x64P server to the example folder and run the example again with the bootargs

    dvimode=1024x768MR-16@60 mpurate=1000 mem=90M@0x80000000 mem=250M@0x89300000

    root@beagleboard: modprobe cmemk allowOverlap=1 phys_start=0x86300000 phys_end=0x87300000 pools=20x4096,10x131072,2x1048576

    root@beagleboard:/usr/share/ti/ti-codec-engine-examples/audio1_copy# CE_DEBUG=3 ./app_remote.xv5T

    , which results in the same error and memory adress as before (0x860000000) - see audio1_copy.log file

     

    Thanks

    Wendelin

     

    3426.audio1_copy.log

     

    6765.all.x64P.DataSheet.html

     

     

  • Wendelin,

    I think your first attempt to insmod cmemk.ko at 0x85000000 failed, because this overlapped with the memory you gave to the Linux kernel at boot time:

        mem=90M@0x80000000

    Maybe you could try going back to the original all_evm3530.tci file, and specify a smaller amount of memory for the Kernel at 0x80000000. For example:

        mem=50M@0x80000000

    Then see if you can successfully insmod cmemk.ko.

    Best regards,

        Janet

     

  • Thanks a lot

     

    Now i can insmod cmemk.ko and run the example successfully.

     

    Regards

    Wendelin

  • Hello wendelin, I'm grade that you have run the example successfully, and I have the same problem as you did, so can you give us the sollution you dealed with the problem and not just said you had sucessed? Thanks you.

  • That solved my proplem:


    Wendelin,

    I think your first attempt to insmod cmemk.ko at 0x85000000 failed, because this overlapped with the memory you gave to the Linux kernel at boot time:

        mem=90M@0x80000000

    Maybe you could try going back to the original all_evm3530.tci file, and specify a smaller amount of memory for the Kernel at 0x80000000. For example:

        mem=50M@0x80000000

    Then see if you can successfully insmod cmemk.ko.

    Best regards,

        Janet

    If you still have problems don´t hesitate to ask. 


    regards 

    wendelin

  • Thank you very much for your quick answer! I checked again my uEnv.txt on the card,its first mem is 99M, and in the default codec engine the mem for linux is 80M, so I changed the mem section in the uEnv.txt to "mem=80M@0x80000000 mem=384M@0x88000000" , and it can now work well.

    This is because 80M equals 0x5000000, so the mem set in codec engine can start at 0x85000000.And this will not overlap with the linux mem.

     

    2642.uEnv.txt