How to get DSP working

Hi,

Has anyone been able to get the DSP to work with Ubuntu Mojo? I have tried to follow the instructions at http://elinux.org/BeagleBoard/DSP_Howto and http://groups.google.com/group/beagleboard/browse_thread/thread/73457a485bc7afe6 without success.

I would like my C program to call functions that run on the DSP. I am new to linux…
Can someone please give me step by step instructions for how to get the DSP setup and ready in Ubuntu Mojo. In the referenced instructions, It is not clear to me what needs to be ran on the beagleboard vs what needs to be ran on the host.

Thanks,
saladino

Those instructions are distribution agnostic.

What issue do you have?

Hi.

I'm a newbie on linux and beagle board.
I also have trouble on using DSP.
Ubuntu Mojo was installed on beagleboard according to
http://www.elinux.org/BeagleBoardHandheldsMojo.
I've tried to follow the instructions at http://elinux.org/BeagleBoard/DSP_Howto.
I made a bridge driver kernel module and tried to load driver using
insmod and modprobe, but failed.
I got error messages like "invalid module format" or "Module
bridgedriver.ko not found"
What did I make wrong?

Hi Brian,

JFYI, the latest omap git repository has the "tidspbridge"
branch. This branch is updated periodically. The old patchset may not
work with the latst l-o.

You can find the branch by "git branch -r".

    Hiroshi DOYU

I am having trouble loading the bridgedriver module. I get invalid
module format error message. Here is a log of my attempts:

$ sudo insmod ./bridgedriver.ko
insmod: error inserting './bridgedriver.ko': -1 Invalid module format

$ sudo modprobe bridgedriver base_img=/lib/dsp/baseimage.dof
FATAL: Error inserting bridgedriver (/lib/modules/2.6.28-rc6-
omap1-05302-g991b522/kernel/drivers/dsp/bridge/bridgedriver.ko):
Invalid module format

$ modinfo bridgedriver
filename: /lib/modules/2.6.28-rc6-omap1-05302-g991b522/kernel/
drivers/dsp/bridge/bridgedriver.ko
license: GPL
author: Texas Instruments
srcversion: 2825B8057A128DAA0D00C2C
depends:
vermagic: 2.6.28-rc6-omap1-05302-g991b522 mod_unload modversions
ARMv7
parm: driver_major:Major device number, default = 0 (auto)
(int)
parm: driver_minor:Minor device number, default = 0 (auto)
(int)
parm: dsp_test_sleepstate:DSP Sleep state = 0 (int)
parm: base_img:DSP base image, default = NULL (charp)
parm: shm_size:SHM size, default = 4 MB, minimum = 64 KB
(int)
parm: phys_mempool_base:Physical memory pool base passed to
driver (uint)
parm: phys_mempool_size:Physical memory pool size passed to
driver (uint)
parm: tc_wordswapon:TC Word Swap Option. default = 0 (int)

$ uname -a
Linux beagle-m01 2.6.27-oer1 #1 Tue Oct 28 04:36:30 UTC 2008 armv7l
GNU/Linux

$ dmesg | tail
fuse init (API version 7.9)
Adding 152576k swap on /dev/mmcblk0p6. Priority:-1 extents:1 across:
152576k
EXT3 FS on mmcblk0p5, internal journal
NET: Registered protocol family 10
eth0: no IPv6 routers present
bridgedriver: disagrees about version of symbol struct_module
bridgedriver: disagrees about version of symbol struct_module
bridgedriver: disagrees about version of symbol struct_module
bridgedriver: disagrees about version of symbol struct_module
bridgedriver: disagrees about version of symbol struct_module

$ file /lib/modules/2.6.28-rc6-omap1-05302-g991b522/kernel/drivers/dsp/
bridge/bridgedriver.ko
/lib/modules/2.6.28-rc6-omap1-05302-g991b522/kernel/drivers/dsp/bridge/
bridgedriver.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV),
not stripped

Any help will be appreciated.

Thanks,
Saladino.

I am having trouble loading the bridgedriver module. I get invalid
module format error message. Here is a log of my attempts:

$ sudo insmod ./bridgedriver.ko
insmod: error inserting './bridgedriver.ko': -1 Invalid module format

$ sudo modprobe bridgedriver base_img=/lib/dsp/baseimage.dof
FATAL: Error inserting bridgedriver (/lib/modules/2.6.28-rc6-
omap1-05302-g991b522/kernel/drivers/dsp/bridge/bridgedriver.ko):
Invalid module format

$ modinfo bridgedriver
filename: /lib/modules/2.6.28-rc6-omap1-05302-g991b522/kernel/

<snip/>

$ uname -a
Linux beagle-m01 2.6.27-oer1 #1 Tue Oct 28 04:36:30 UTC 2008 armv7l
GNU/Linux

You are trying a 2.6.28-rc6 module into a 2.6.27 kernel. That's going
to fail unless you have the option to load modules from different
kernel versions.

In general you should load the module in the same kernel it was built for.

I followed instructions at http://elinux.org/BeagleBoardHandheldsMojo
and then at http://elinux.org/BeagleBoard/DSP_Howto for the DSP. What
can i do to build a 2.6.27 bridgedriver module? Any othere ideas?

Thanks,
Saladino.

You'll need the exact same kernel that your distribution is using.
Probably 2.6.27-omap1 plus some patches.

Felipe,

I replaced my 2.6.27 kernel uImage with the new 2.6.28 uImage and now
I have been able to load the bridgedriver module successfully. I have
2 new problems now.
1. USB is broken in the new kernel. I cannot plug and play my USB
devices that worked with the old kernel image anymore. How do I get
usb working again?
2. I am not able to run the example dsp node (dummy test application)
so i fear that my setup may be incorrect. Here is what I am seeing...
What should I expect when I run dummy?

$ ../dspbridge_binaries/ping.out
$ ../dspbridge_binaries/dynreg.out -r dummy.dll64P
Failed to Open DSP manager
$ sudo ../dspbridge_binaries/dynreg.out -r dummy.dll64P
$ ./dummy
DspManager_Open failed: 0x80008008
$ sudo ./dummy
DSPNode_Allocate failed: 0x80008008
$ lsmod
Module Size Used by
bridgedriver 169696 0
$ ls -l /lib/libbr*
-rwxr-xr-x 1 root root 27K 2008-12-15 16:28 /lib/libbridge.so*
lrwxrwxrwx 1 root root 12 1999-12-31 19:04 /lib/libbridge.so.2 ->
libbridge.so*

Please pardon my n00b questions. Your help is much appreciated.

Thanks,
Saladino.