I've followed the "Changing_the_DVEVM_memory_map" on davincidsp wiki (http://wiki.davincidsp.com/index.php/Changing_the_DVEVM_memory_map), but it's quiet a big piece of document. I've tried several times by studying back and forth in the document, but still without success.
I'm trying to shrink the stock 256mb memory map configuration down to 128mb for our custom board, and get gst-ti-dmai up and running. I'm ONLY trying to get "audio decode" working, because audio should always be an easier thing (i guess?)... All experiments below are done on a EVM. Well I might be stupid on this memory map things, but I do know that if it doesn't work on EVM, it wouldn't work on my board anyway...... T___T
I'm with a dm6446 evm board and these software components:
- dvsdk_2_00_00_22
- codec_engine_2_24_01
- dsplink_linux_1_63
- linuxutils_2_25
- framework_components_2_24_01
- dm6446_dvsdk_combos_2_05
- dmai (svn branch BRANCH_BRIJESH_DMAI_DEV_2_xx)
- kernel (linux-davinci.git 2.6.32-rc2-davinci1 from arago git)
- u-boot bootargs: "mem=64M console=ttyS0,115200n8 root=/dev/nfs nfsroot=192.168.1.107:/home/sysroot/armv5tel-softfloat-linux-gnueabi,nolock ip=dhcp"
My idea is simple:
- 0x80000000 - Linux (64mb)
- 0x84000000 - CMEM (10mb)
- 0x84a00000 - DDRALGHEAP (48MB)
- 0x87a00000 - DDR2 (4MB)
- 0x87e00000 - DSPLINKMEM (1MB)
- 0x87f00000 - RESET_VECTOR (128B)
- 0x88000000 - Unused as our custom board don't have these memory (128MB)
I've modified these files:
- dsplink_linux_1_63/packages/dsplink/config/all/CFG_DM6446GEM_SHMEM.c
- RESETCTRLADDR => 0x87F00000
- CODEMEMORYADDR => 0x87A00000
- CODEMEMORYSIZE => 0x00400000
- SHAREDMEMORYADDR0 => 0x87E00000
- others remained unchanged.
- dsplink_linux_1_63/packages/dsplink/config/BUILD/CFG_DM6446GEM_SHMEM.c (I rm-ed this file, and it gets copied over from the above file)
- dsplink_linux_1_63/packages/dsplink/dsp/inc/DspBios/5.XX/DM6446GEM/dsplink-dm6446gem-base.tci
- RESET_VECTOR.base => 0x87F00000
- DDR2.base => 0x87A00000
- DDR2.len => 0x00400000
- DSPLINKMEM.base => DDR2.base + DDR2.len (which should be 0x87E00000)
- DSPLINKMEM.len => 0x00030000
- POOLMEM.base => DSPLINKMEM.base + DSPLINKMEM.len
- POOLMEM.len => 0x000d0000
- dm6446_dvsdk_combos_2_05/packages/ti/sdo/servers/decode/decode.tcf
- DDRALGHEAP
- base => 0x84a00000 (74MB)
- len => 0x03000000 (48MB)
- DDR2
- base => 0x87a00000 (122MB)
- len => 0x00400000 (4MB)
- DSPLINKMEM
- base => 0x87e00000 (126MB)
- len => 0x00100000 (1MB)
- RESET_VECTOR
- base => 0x87f00000 (127MB)
- DDRALGHEAP
- loadmodule.sh for gstreamer
- insmod cmemk.ko phys_start=0x84000000 phys_end=0x84a00000 pools=1x5250000,2x829440,3x1036800,1x8192,1x1
and then recompile with `make dsplink_clean dmai_clean codecs_clean && make dsplink && make codecs && make dmai && make install`, and rebuild + reinstall gst-ti-dmai.
then try loadmodule.sh and `CE_DEBUG=3 gst-launch-0.10 filesrc location=/opt/data/sounds/davincieffect.aac ! TIAuddec1 codecName=aachedec engineName=decode ! alsasink sync=false` complains about memory-map mismatch.
I used `diff -a` to compare two dsplinkk.ko, but the only difference is compile datetime... so they're basically identicle, so afaik dsplinkk.ko is not affected by memory-map modification. according to the "CE Config Update" from wiki (http://wiki.msp430.com/index.php/CE_Config_Updates), all memory-map settings are now done in codec servers (Engine.createFromServer()).
however, no matter how i modify decode.tcf, CE_DEBUG always tell me
- @0,704,070us: [+2 T:0x40f99470 S:0x40f98d24] OP - Processor_create_d> Adding DSP segment #0 to Link configuration: name='DDR2', startAddress=0x8fa00000, sizeInBytes=0x400000, shared=1, syncd=0
- @0,704,283us: [+2 T:0x40f99470 S:0x40f98d24] OP - Processor_create_d> Adding DSP segment #1 to Link configuration: name='DSPLINKMEM', startAddress=0x8fe00000, sizeInBytes=0x100000, shared=1, syncd=0
- @0,706,770us: [+2 T:0x40f99470 S:0x40f98d24] OP - Processor_create_d> Adding DSP segment #2 to Link configuration: name='RESET_VECTOR', startAddress=0x8ff00000, sizeInBytes=0x80, shared=1, syncd=0
- @0,707,205us: [+2 T:0x40f99470 S:0x40f98d24] OP - Processor_create_d> Adding DSP segment #3 to Link configuration: name='DDRALGHEAP', startAddress=0x88000000, sizeInBytes=0x7a00000, shared=0, syncd=0
and the memory settings in linkCfg->dspConfigs[0]->memTables[0][i] NEVER ARE the value I configured in decode.tcf, either.
What am I missing? how do I do this in a CE2.0 approach? Is there a newer "Changing the DVEVM memory map" that targets a more recent version of dvsdk / codec engine / codec combos / dsplink somewhere?
============
btw, is there a way to modify codec engine ti.sdo.ce.osal.Global so i can change DEFAULT_ARMDSPLINKCONFIG to my memory map anyway? if I `make -f package.mak clean` under codec_engine_2_24_01/packages/ti/sdo/ce/osal/, is there a way of regenerating "package/ti.sdo.ce.osal.sch" again?