Best way for using Gstreamer + Openmax with DSP on beagle board ?

I am using 3430 ldp. I extracted the tiopenmax 0.3.5 binaries and put them

into lib/dsp/ folder

and I was able to ping . I followed
BeagleBoard/gst-openmax - eLinux.org
to setup gstreamer . After building libomxil-ti and gst-openmax I tried to

play a video

gst-launch filesrc location=320x240_mpeg4_aac.mp4 ! qtdemux name=demux

demux.video_00 !

omx_mpeg4dec library-name="libOMX_Core.so"

component-name="OMX.TI.Video.Decoder" ! fakesink

But it stuck at prerolling .

I think I hit the same problem - Did you remember to load the kernel modules
using modprobe as discussed in the thread "[beagleboard] Re: New beagleboard
demo image, now with 100% more DSP"?

And secondly: Did you remember to set the right parameter of mem=88M in the
u-boot environment? This is discussed in the same thread...

Good luck
  Søren

Hello!

I am using 3430 ldp. I extracted the tiopenmax 0.3.5 binaries and put them

into lib/dsp/ folder

and I was able to ping . I followed
BeagleBoard/gst-openmax - eLinux.org
to setup gstreamer . After building libomxil-ti and gst-openmax I tried to

play a video

gst-launch filesrc location=320x240_mpeg4_aac.mp4 ! qtdemux name=demux

demux.video_00 !

omx_mpeg4dec library-name="libOMX_Core.so"

component-name="OMX.TI.Video.Decoder" ! fakesink

But it stuck at prerolling .

I think I hit the same problem - Did you remember to load the kernel modules
using modprobe as discussed in the thread "[beagleboard] Re: New beagleboard
demo image, now with 100% more DSP"?

And secondly: Did you remember to set the right parameter of mem=88M in the
u-boot environment? This is discussed in the same thread...

On the Beagle, I have successfully used these as my bootargs:
'console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait rootdelay=1
omapdss.def_disp=dvi omapfb.mode=dvi:1024x768MR-24@60
omapfb.vram=0:4M,1:2M'.

That's using this kernel:
  http://github.com/felipec/linux-omap/tree/v2.6.28-felipec1

These pipelines work perfectly:
* gst-launch filesrc
location=/patterns/hancock-tsr2_MPEG4_AAC_3_5Mbps.mp4 ! qtdemux name=d
d.video_00 ! goodec_mpeg4 ! fakesink -v
* gst-launch filesrc
location=/patterns/hancock-tsr2_MPEG4_AAC_3_5Mbps.mp4 ! qtdemux name=d
d.video_00 ! omx_mpeg4dec ! fakesink -v
* gst-launch filesrc
location=/patterns/hancock-tsr2_MPEG4_AAC_3_5Mbps.mp4 ! qtdemux name=d
d.video_00 ! omx_mpeg4dec ! omapfbsink -v

That was using Poky here:
  BeagleBoard/Poky - eLinux.org

For the SDP we use a different branch of that Poky overlay and use
"... ! goodec_mpeg4 ! goosink_pp".

Greetings!

Daniel Díaz
ddiaz@ti.com

I want to confirm one thing . Does the same bn\inaries work on 3430 LDP . I don’t have a beagleboard .I am usin omapzoom LDP . Ya I had build the DSP brif\dge as part of the kernel . It is working fine as I could ping the DSP .

Daniel,
For the SDP we use a different branch of that Poky overlay and use
“… ! goodec_mpeg4 ! goosink_pp”.

Is this the only way to use hardware codcs . doesn’t gst-openmax work the way it is in beagleboard ?

You can enable debugging at the gst-openmax level by doing:
export GST_DEBUG='omx*:5'

It seems I forgot one step in the gst-openmax guide[1], you need to
use the omap branch. If you use the omap branch then you don't need to
specify the component name or library name:

git clone git://github.com/felipec/gst-openmax.git
cd gst-openmax
git checkout -b omap origin/omap
./autogen.sh --noconfigure
./configure --prefix=/usr
make DESTDIR=rootfs install

I've updated the wiki as well.

[1] http://elinux.org/BeagleBoard/gst-openmax

I am using 3430 ldp. I extracted the tiopenmax 0.3.5 binaries and put them

into lib/dsp/ folder

and I was able to ping . I followed
BeagleBoard/gst-openmax - eLinux.org
to setup gstreamer . After building libomxil-ti and gst-openmax I tried to

play a video

gst-launch filesrc location=320x240_mpeg4_aac.mp4 ! qtdemux name=demux

demux.video_00 !

omx_mpeg4dec library-name="libOMX_Core.so"

component-name="OMX.TI.Video.Decoder" ! fakesink

But it stuck at prerolling .

I think I hit the same problem - Did you remember to load the kernel modules
using modprobe as discussed in the thread "[beagleboard] Re: New beagleboard
demo image, now with 100% more DSP"?

That thread was for dsp-link, this is dsp-bridge.

And secondly: Did you remember to set the right parameter of mem=88M in the
u-boot environment? This is discussed in the same thread...

mem=88M is only needed for dsp-link and perhaps old versions of
dsp-bridge. The latest linux-omap branches don't need that.

Hello, Vishal!

I want to confirm one thing . Does the same bn\inaries work on 3430 LDP .

[...]

My guess is they should. We have tested the same socket nodes both in
the LDP and SDP in the past, and they work just the same.

Daniel,
For the SDP we use a different branch of that Poky overlay and use
"... ! goodec_mpeg4 ! goosink_pp".

Is this the only way to use hardware codcs . doesn't gst-openmax work the
way it is in beagleboard ?

Both gst-goo and gst-openmax work just fine with those codecs. At
least just yesterday I was using the video decoders without any
issues. If you use an OE-based distro, you can use the recipes already
written for gst-goo, gst-openmax, gst-omapfb, tiopenmax,
tidspbridge-lib, and whatnot.

If you use gst-omapfb (and you want to) (it's here:
GitHub - felipec/gst-omapfb: GStreamer plug-in for omapfb rendering.), then you'd have to
use gst-openmax for now to properly see anything in the video output;
Goo requires a gst_pad_alloc_buffer() or the gst-omapfb could use a
memcpy for non-optimized elements.

Greetings!

Daniel Díaz
ddiaz@ti.com

That thread was for dsp-link, this is dsp-bridge.

> And secondly: Did you remember to set the right parameter of mem=88M
> in the u-boot environment? This is discussed in the same thread...

mem=88M is only needed for dsp-link and perhaps old versions of dsp-bridge.
The latest linux-omap branches don't need that.

Hmm - Thanks for correcting me - Seems like I need to do my homework better next time in order to get real up to speed with this dsp-link, dsp-bridge, g-streamer stuff - Does anybody have some great pointer(s) to some kind of overview of the big picture describing this?

I won't cause more confusion on this topic I promise...
  Søren :slight_smile:

Yeah, I think most people are confused with all the DSP stuff.

I just wrote a little summary in order to try to clarify the situation:
http://elinux.org/BeagleBoard/DSP_Clarification

I am getting this error on LDP ,

I am using the binaries from tiopenmax0.3.5 release . these are the steps which I followed.

I have built the bridge as part of the kernel .
I loaded the Baseimage.dof ,these are the logs .

[] [] (vfs_ioctl+0x0/0x78) (vfs_ioctl+0x0/0x78) from [] from [] (do_vfs_ioctl+0x270/0x280)

(do_vfs_ioctl+0x270/0x280)
r5:becc1ad8 r5:becc1ad8 r4:c2664f20 r4:c2664f20

[] [] (do_vfs_ioctl+0x0/0x280) (do_vfs_ioctl+0x0/0x280) from [] from [] (sys_ioctl+0x40/0x64)

(sys_ioctl+0x40/0x64)
r7:c2664f20 r7:c2664f20 r6:0000000e r6:0000000e r5:becc1ad8 r5:becc1ad8 r4:00000003 r4:00000003

[] [] (sys_ioctl+0x0/0x64) (sys_ioctl+0x0/0x64) from [] from [] (ret_fast_syscall+0x0/0x2c)

(ret_fast_syscall+0x0/0x2c)
r7:00000036 r7:00000036 r6:00000000 r6:00000000 r5:0000a108 r5:0000a108 r4:c2a2cae0 r4:c2a2cae0

Mem-info:

Mem-info:
DMA per-cpu:

DMA per-cpu:
CPU 0: hi: 42, btch: 7 usd: 0

CPU 0: hi: 42, btch: 7 usd: 0
Active:13168 inactive:772 dirty:6 writeback:0 unstable:0

free:5214 slab:786 mapped:5829 pagetables:786 bounce:0

Active:13168 inactive:772 dirty:6 writeback:0 unstable:0
free:5214 slab:786 mapped:5829 pagetables:786 bounce:0
DMA free:20856kB min:1348kB low:1684kB high:2020kB active:52672kB inactive:3088kB present:113792kB pages_scanned:0 all_unreclaimable? no

DMA free:20856kB min:1348kB low:1684kB high:2020kB active:52672kB inactive:3088kB present:113792kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]:lowmem_reserve[]: 0 0 0 0 0 0

DMA: DMA: 29324kB 29324kB 8338kB 8338kB 14016kB 14016kB 332kB 332kB 264kB 264kB 0128kB 0128kB 0256kB 0256kB 0512kB 0512kB 01024kB 01024kB 02048kB 02048kB 04096kB 04096kB = 20856kB

= 20856kB
6498 total pagecache pages

6498 total pagecache pages
0 pages in swap cache

0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0

Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB

Free swap = 0kB

Total swap = 0kB

Total swap = 0kB
28672 pages of RAM

28672 pages of RAM
5501 free pages

5501 free pages
3151 reserved pages

3151 reserved pages
786 slab pages

786 slab pages
31941 pages shared

31941 pages shared
0 pages swap cached

0 pages swap cached

When I ran

gst-launch filesrc location=320x240_mpeg4_aac.mp4 ! qtdemux name=demux demux.video_00 ! omx_mpeg4dec library-name=“libOMX_Core.so” component-name=“OMX.TI.Video.Decoder” ! fakesink

I got the following error.

gstomx_util.c:739:wait_for_state: timed out
0:00:02.048004151 1314 0x6a320 ERROR gstomx_util.c:749:wait_for_state: wrong state received: state=1, expected=2
0:00:02.048339844 1314 0x6a320 WARN gstomx_base_filter.c:716:pad_chain: error: OpenMAX component in wrong state

HI:
   i think you go futher than me on dsp of Beagle Board;

hi:
i think you go futher than me on enabling dsp of beagleBoard;Can you
help with how to reach it;

Have you success in dsp-bridge;
i you reach the top of dsp-bridge;
can you help me;
can you give some docment to guide me; thanks;

Lao,

Follow the instructions on
[1]http://elinux.org/BeagleBoard/DSP_Howto
[2]http://elinux.org/BeagleBoard/gst-openmax

2009/5/7 LaoHuo <qvbhsskg@gmail.com>

On loading the baseimage.dof I sometime get this output , I am unable to figure out wat error it is .

<6>request_suspend_state: wakeup (3->0) at 20548461914 (2000-01-14 05:20:06.447937012 UTC)
request_suspend_state: wakeup (3->0) at 20548461914 (2000-01-14 05:20:06.447937012 UTC)
<6>Loop count exceeded in check_power_domain_status for domain:1
Loop count exceeded in check_power_domain_status for domain:1
curr_state = 2, desired_state = 1
curr_state = 2, desired_state = 1
<3>FATAL ERROR: Unable to Change level for resource iva2 to 0
FATAL ERROR: Unable to Change level for resource iva2 to 0

Hi,
This might sound dumb, but can someone tell me where I can find the
baseimage.dof?
Basically, the bridge binaries to be loaded on the DSP side!

Regards
Kozak

Is it part of the DSP link available at TI website?
Regards
Kozak

hi. Daniel

Both gst-goo and gst-openmax work just fine with those codecs. At
least just yesterday I was using the video decoders without any
issues. If you use an OE-based distro, you can use the recipes already
written for gst-goo, gst-openmax, gst-omapfb, tiopenmax,
tidspbridge-lib, and whatnot.

  I want to know if all of these (gst-goo, gst-openmax, gst-omapfb,
tiopenmax) is needed, and what's the main function respectively?

as I understood at present, the gst-openmax is a plugin of gstreamer,
which can invoke tiopenmax IL layer, and the tiopenmax IL knows how to
use dsp.
and the gst-omapfb is for frame buffer which can display the video
output on the screen.

is it right about what I understand? and what about the gst-goo?

thanks

Hello!

Hi,
This might sound dumb, but can someone tell me where I can find the
baseimage.dof?
Basically, the bridge binaries to be loaded on the DSP side!

Is it part of the DSP link available at TI website?

You can find TI-OMX-Sample-Firmware-0.3.5-Linux-x86-Install within
tiopenmax-0.3.5.tar.gz here:
  https://omapzoom.org/gf/project/openmax/frs/

It has the socket nodes and the baseimage.dof.

Greetings!

Daniel Díaz
ddiaz@ti.com

Hey, Favor!

hi. Daniel

Both gst-goo and gst-openmax work just fine with those codecs. At
least just yesterday I was using the video decoders without any
issues. If you use an OE-based distro, you can use the recipes already
written for gst-goo, gst-openmax, gst-omapfb, tiopenmax,
tidspbridge-lib, and whatnot.

I want to know if all of these (gst-goo, gst-openmax, gst-omapfb,
tiopenmax) is needed, and what's the main function respectively?
as I understood at present, the gst-openmax is a plugin of gstreamer,
which can invoke tiopenmax IL layer, and the tiopenmax IL knows how to
use dsp.
and the gst-omapfb is for frame buffer which can display the video
output on the screen.
is it right about what I understand? and what about the gst-goo?

You are right! Both gst-openmax and gst-goo are sets of GStreamer
plug-ins that talk to OpenMAX IL.

gst-omapfb provides a plug-in that talks to the frame buffer, as you guessed.

tiopenmax 0.3.5 is an implementation of TI's OpenMAX IL, with some
sample codecs (socket nodes + baseimage) included, namely MPEG-4 Video
and Audio (AAC) Decoders.

The DSP Bridge has two parts: the kernel module and the ARM library
that talks to the module. The latter is tidspbridge-lib.

Greetings!

Daniel Díaz
ddiaz@ti.com

I updated with some facts for tidspbridge.

- omar ramirez