public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Bezerra <edubezval@gmail.com>
To: "Linux-omap-open-source@linux.omap.com"
	<linux-omap-open-source@linux.omap.com>
Subject: Speex encoder running on DSP through DSP Gateway
Date: Wed, 11 Jan 2006 11:18:39 -0400	[thread overview]
Message-ID: <a0580c510601110718v4d6f1a74r@mail.gmail.com> (raw)

Hi all,


  I know that the issue below is related more to the DSP-GW community as
opposed to Linux-OMAP and I do apologise for posting it here, but DSP-GW
list seems to be populated sparringly and responses are really slow or
long term. I would therefore appreciate if someone has already seen this
issue and could give me a hint or two.

  I'm trying to run a speex encoder on the OSK 5912 DSP using
DSP Gateway.  This enconder is based on the speex library
that can be found in www.speex.org.

  The whole code to produce a single encoder using this library
plus the tokliBIOS library code resulted in a binary with
200KB of size. A simple frame coding step also requires
a stack size of 4K words. It also does about 12K words
of allocation (using malloc). These memory requirements
were analysed using valgrind tools.

  Because of these memory requirements, the DSP task needed some shared
memory. So, I added one memory space to put some data. The .cmd
of the DSP Task is:

/*
 * Data sections
 * */

-l tokliBIOScfg.cmd
-l tokliBIOS.cmd

MEMORY {
        PAGE 0: SARAM_D:     origin = 0x30000, len = 0x5000
}
SECTIONS {
        shared_data:    {} > SARAM_D PAGE 0
}

  However, as the application also needs more memory to
stack and heap, I also modified the tokliBIOScfg.tcf:

.
.
.

var myHeap = bios.MEM.create("MYHEAP");
myHeap.comment = "Speex Heap";
myHeap.base = 0x1a800;
myHeap.len = 0x8000;
myHeap.createHeap = true;
myHeap.space = "data";
myHeap.heapSize = 0x4000;

bios.MEM.MALLOCSEG = prog.get("MYHEAP");
bios.MEM.BIOSOBJSEG = prog.get("DARAM");
bios.MEM.STACKSEG = prog.get("MYHEAP");
bios.MEM.SYSSTACKSEG = prog.get("MYHEAP");

.
.
.
/*
 * TSK
 */
bios.TSK.ENABLETSK = true;
bios.TSK.STACKSEG = prog.get("MYHEAP");

  I did a static compilation of this task and it was fine. Before the
loading of the resulted binary, I executed the following commands on the
OSK board:

# dspctl kmem_reserve 0x20000

As in the .cmd file, it needs a TLB entry pointing to 0x30000, size
0x5000
# dspctl exmap 0x30000 0x5000

As in the .tcf file, it needs a TLB entry pointing to 0x35000, size
0x10000
# dspctl exmap 0x35000 0x10000


  So, I did the loading:

# dspctl start speex.out


  The loading was fine also. But when I run a user space program to
communicate to the DSP task through the DSP gateway device file, it
gets an error. The user space program only sends a ipbuffer a requests
another one. It sends and receives the ipbuffer without any problem.
And the user space application ends. The data produced by the encoder is
correct. The problem is that the kernel prints out a message indicating
that there is a mailbox message from a non-existing DSP task. After
that, the DSP task hangs out. The message error code is: BADTID.

  Any suggestion?

BR,

Eduardo Bezerra Valentin

             reply	other threads:[~2006-01-11 15:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11 15:18 Eduardo Bezerra [this message]
2006-01-13 16:00 ` Speex encoder running on DSP through DSP Gateway toshihiro.kobayashi
2006-01-13 20:25   ` Eduardo Bezerra
2006-01-16 13:53     ` Toshihiro.Kobayashi
2006-01-18 12:52       ` Eduardo Bezerra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0580c510601110718v4d6f1a74r@mail.gmail.com \
    --to=edubezval@gmail.com \
    --cc=linux-omap-open-source@linux.omap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox