running codec-engine help

I am trying to run some of the sample programs which came with Codec
Engine 2.21. Specifically the one under
codec_engine_2_21/examples/apps/sanity_test/evm3530. I am running
angstrom console image built a week back with 2.6.27 kernel. I also
build codec-engine, dsplink etc with the bitbake.

I loaded cmemk, dsplinkk and lpm_omap3530.

root@beagleboard:~# modprobe cmemk phys_start=0x88000000
phys_end=0x8e000000 pools=20x4096,10x131072,2x1048576

ioremap_nocache(0x88000000, 100663296)=0xc9000000
allocated heap buffer 0xc9000000 of size 0x5cac000
cmem initialized 3 pools between 0x88000000 and 0x8e000000

root@beagleboard:~# modprobe dsplinkk
DSPLINK Module (1.60) created on Date: Feb 6 2009 Time: 01:40:30

root@beagleboard:~# cat /proc/devices | grep dsp
230 dsplink

root@beagleboard:~# mknod /dev/dsplink c 230 0

While loading lpm_omap3530 I get this error:

root@beagleboard:~# modprobe lpm_omap3530
lpm_omap3530: no symbol version for IPS_notify
lpm_omap3530: Unknown symbol IPS_notify
lpm_omap3530: no symbol version for IPS_register
lpm_omap3530: Unknown symbol IPS_register
lpm_omap3530: no symbol version for IPS_unregister
lpm_omap3530: Unknown symbol IPS_unregister
lpm_omap3530: no symbol version for LDRV_PROC_setState
lpm_omap3530: Unknown symbol LDRV_PROC_setState
lpm_omap3530: no symbol version for LDRV_PROC_getState
lpm_omap3530: Unknown symbol LDRV_PROC_getState
lpm_omap3530: no symbol version for PMGR_PROC_getSymbolAddress
lpm_omap3530: Unknown symbol PMGR_PROC_getSymbolAddress
FATAL: Error inserting lpm_omap3530 (/lib/modules/2.6.27-omap1/kernel/drivers/d)

Ok, ignoring this error, I proceeded to execute the app.out

# ./app.out in.dat out.dat

The output is:
App-> Application started.
@0x0008fe2b:[T:0x4095b490] ti.sdo.ce.ipc.Power - Power_on> Opening Local Power D
@0x0008ff1f:[T:0x4095b490] OP - Processor_create_d> Power_on failed.
@0x0008ff7b:[T:0x4001cf40] CE - rserverOpen: can't start 'video_copy.x64P'; Prod
CEapp-> ERROR: can't open engine video_copy
App-> Application FAILED.

I have the x64P file (DSP server executable in the Codec-Engine
parlance) in the same directory as app.out.

This is my first ever attempt to work with Codec-Engine on
Beagleboard. I would appreciate if someone can help point out what I
am doing wrong.

I found an earlier thread which describes exactly the same issue. My bad..

<http://groups.google.com/group/beagleboard/browse_thread/thread/b2b4734df82b81f9?pli=1>

ramakrishnan

I found an earlier thread which describes exactly the same issue. My bad..

ramakrishnan

Ramakrishnan,

Yes, that was my post. As mentioned in that post, I had to modify lpm_driver.c so
that it would work with 2.6.28-omap1 without crashing:

changed in lpm_init

        device_create(lpm->lpm_class, NULL,
            MKDEV(lpm->inst[i].major, lpm->inst[i].minor),
            "lpm%d", lpm->inst[i].minor);

to

        char temp_str[50];
        ...
        sprintf(temp_str, "lpm%d", lpm->inst[i].minor);
        device_create(lpm->lpm_class, NULL,
            MKDEV(lpm->inst[i].major, lpm->inst[i].minor),
            NULL, temp_str);

Not sure if that is the "correct" fix but it worked for me.

Also, I noticed you're loading cmemk.ko with the incorrect address values for the BeagleBoard (unless you have more than 128MB RAM). If you're using the BeagleBoard and CE 2.21, the OMAP3 MMU layout is described here at http://wiki.omap.com/index.php?title=OMAP3_DSP_MMU_Configuration. So this is what you need to do:

1) Modify u-boot environment to boot the kernel with RAM reserved to 80MB (the other 48MB is being used by CMEM, DDRALGHEAP, and DSPLINK), i.e. add "mem=80M" to the bootargs string.
2) modify your cmemk.ko loading script to:
insmod cmemk phys_start=0x85000000 phys_end=0x87e00000 pools=20x4096,10x131072,2x1048576

Hope this helps; this worked for me =)

Regards,
Andy

Andy,

Thanks for the post. I modified the boot parameter, modified the cmemk
addresses and also tried on a 2.6.26 kernel. Without the lpm
modifications you suggested, I could force load the module on 2.6.26.
I still get an error when I run the application, this time different.

root@beagleboard:~# ./app.out in.dat out.dat
App-> Application started.
Entry exists for address: [0x86000000] size: [0x1000000]
DSP_init status [0x80008050]
@0x0000bc59:[T:0x4095b490] OP - Processor_create_d> Loading and
starting DSP server 'video_copy.x64P' FAILED, status=[0x80008050]
(look for
@0x0000bd4d:[T:0x4095b490] OP - Processor_delete_d> Closing remote
transport FAILED, status=0x80008002.
@0x0000bd8a:[T:0x4095b490] OP - Processor_delete_d> Stopping DSP
FAILED, status=0x80008002
@0x0000bdc7:[T:0x4095b490] OP - Processor_delete_d> Closing pool
FAILED, status=0x80008000
@0x0000be05:[T:0x4095b490] OP - Processor_delete_d> Detaching from DSP
FAILED, status=0x80008000
@0x0000db95:[T:0x4001cf40] CE - rserverOpen: can't start
'video_copy.x64P'; Processor_create failed
CEapp-> ERROR: can't open engine video_copy
App-> Application FAILED.

I tried your modification on 2.6.27 but I still get a crash when I
force-load the lpm_omap3530 module.

Let me try 2.6.28 with your modifications and report back.

thanks.

Thanks for the post. I modified the boot parameter, modified the cmemk
addresses and also tried on a 2.6.26 kernel. Without the lpm
modifications you suggested, I could force load the module on 2.6.26.
I still get an error when I run the application, this time different.

root@beagleboard:~# ./app.out in.dat out.dat
App-> Application started.
Entry exists for address: [0x86000000] size: [0x1000000]
DSP_init status [0x80008050]
@0x0000bc59:[T:0x4095b490] OP - Processor_create_d> Loading and
starting DSP server 'video_copy.x64P' FAILED, status=[0x80008050]
(look for
@0x0000bd4d:[T:0x4095b490] OP - Processor_delete_d> Closing remote
transport FAILED, status=0x80008002.
@0x0000bd8a:[T:0x4095b490] OP - Processor_delete_d> Stopping DSP
FAILED, status=0x80008002
@0x0000bdc7:[T:0x4095b490] OP - Processor_delete_d> Closing pool
FAILED, status=0x80008000
@0x0000be05:[T:0x4095b490] OP - Processor_delete_d> Detaching from DSP
FAILED, status=0x80008000
@0x0000db95:[T:0x4001cf40] CE - rserverOpen: can't start
'video_copy.x64P'; Processor_create failed
CEapp-> ERROR: can't open engine video_copy
App-> Application FAILED.

I tried your modification on 2.6.27 but I still get a crash when I
force-load the lpm_omap3530 module.

Let me try 2.6.28 with your modifications and report back.

thanks.
--

Ramakrishnan,

I'm sorry but I gave you the wrong memory value when loading cmemk.ko. Please use this:

insmod cmemk.ko phys_start=0x85000000 phys_end=0x86000000 pools=20x4096,10x131072,2x1048576

I gave you the wrong "phys_end" value. This should work now.

You can use the loadmodules.sh script located in codec_engine_2_21/examples/apps/system_files/OMAP3530 for all the examples compiled in CE 2.21.

Regards,
Andy

Andy,

Thanks a lot. It worked. I hope google harvests this thread and makes
it easier for others also to get it working.

Many thanks!

Hi,

I'm using the codec-engine_2.21.bb-r8 recipe, the latest one I think.
I'm trying to get the codec engine sanity check running, but I still
can't load the lpm_omap3530 module, even with modprobe -f:

root@beagleboard:~# modprobe dsplinkk

DSPLINK Module (1.60) created on Date: Feb 17 2009 Time: 17:21:55

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

ioremap_nocache(0x85000000, 16777216)=0xc7000000

allocated heap buffer 0xc7000000 of size 0xcac000

cmem initialized 3 pools between 0x85000000 and 0x86000000

root@beagleboard:~# lsmod

Module Size Used by

cmemk 22532 0

dsplinkk 115352 0

root@beagleboard:~# modprobe lpm_omap3530

lpm_omap3530: no symbol version for IPS_notify

lpm_omap3530: Unknown symbol IPS_notify

lpm_omap3530: no symbol version for IPS_register

lpm_omap3530: Unknown symbol IPS_register

lpm_omap3530: no symbol version for IPS_unregister

lpm_omap3530: Unknown symbol IPS_unregister

lpm_omap3530: no symbol version for LDRV_PROC_setState

lpm_omap3530: Unknown symbol LDRV_PROC_setState

lpm_omap3530: no symbol version for LDRV_PROC_getState

lpm_omap3530: Unknown symbol LDRV_PROC_getState

lpm_omap3530: no symbol version for PMGR_PROC_getSymbolAddress

lpm_omap3530: Unknown symbol PMGR_PROC_getSymbolAddress

FATAL: Error inserting lpm_omap3530 (/lib/modules/2.6.28-omap1/kernel/
drivers/dsp/lpm_omap3530.ko): Unknown symbol in module, or unknown
parameter (see dmesg)

root@beagleboard:~# modprobe -f lpm_omap3530

FATAL: Error inserting lpm_omap3530 (/lib/modules/2.6.28-omap1/kernel/
drivers/dsp/lpm_omap3530.ko): Invalid module format

What am I missing?

Regards,
Matthieu.

I could load it only on 2.6.26, which is what I am using now.

Roger Monk kindly answers me:

modify the defconfig for the kernel to include
CONFIG_FORCE_MODULE_LOAD=y, then modprobe -f lpm_omap3530.

I submitted a patch for this earlier today which should go in soon, if
not already.

~roger