My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
DSP  
This page contains information about enabling hardware acceleration for multimedia features of Android on OMAP3530 and DM3730.
Updated Aug 6, 2011 by binml...@gmail.com

Latest Update

  • 05/31/2011 - rowboat-gingerbread-dsp.xml is available (for DM37x EVM and Beagleboard-xM only).
    • similar to the features in rowboat-froyo-dsp.xml, but uses Stagefright multimedia framework instead of OpenCORE;
    • Support up-to 720P MPEG4 ASP decoding @30fps @10Mbps;
    • Support up-to 720P H.264 HP Lvl3.1 decoding @24fps @4Mbps;
    • requires 1GHz DM37xx device to support 720P video decoding;
    • OMAP3530 is not supported at the moment;
  • 01/23/2011 - rowboat-froyo-dsp.xml updated TI DVSDK package to v4.01.00.09.

Benefits

The OMAP3530 or DM3730 has a powerful C64x+ DSP core embedded in the SoC. This DSP core can be used for various purposes, including multimedia decoding/encoding. This offloads the host ARM processor for other general processing tasks and enables decoding of higher bitrate and/or higher resolution video and audio than would otherwise be achievable with Android running on ARM only.

Rowboat DSP support is based on the TI Linux Digital Video Software Development Kit (DVSDK) for the OMAP3530/DM3730.

Software Stack Components

The following components form a complete software stack needed to work efficiently with DSP. They are provided together as the TI DVSDK or they can be downoaded as individual packages directly from TI.

  1. DSP/BIOS (and tools)
  2. Codec Engine (and tools)
  3. DSP/BIOS Link
  4. DMAI
  5. OpenCore DMAI Codecs
    • Integration of TI DSP accelerated codecs into the PacketVideo OpenCore framework that is provided here on the rowboat Android development site.
    • Technical Details available here
  6. additional DSP codecs (optional), for example, mp3 DSP codec

Building and Testing DSP stack

This section explains how to build and run Gingerbread+DSP on DM37x devices. The next section provides the difference for Froyo+DSP on DM37x and OMAP35x devices.

Preparation

  1. Rowboat is patched to be built on 32-bit Linux host only.
  2. Check if you have git, java6-jdk, dos2unix, and expect utilities installed on your build host. Use the which command from the Linux prompt to see if they commands are present (i.e. which git)
  3. Download repo. You can find detailed repo installing instructions here. Make sure ~/bin is in $PATH
  4. # mkdir -p ~/bin
    # curl http://android.git.kernel.org/repo >~/bin/repo
    # chmod a+x ~/bin/repo
  5. Download Rowboat Android (Gingerbread version) with integrated TI DSP stack from gitorious.org/rowboat. Please ensure you have atleast 17GB free space on your hard drive for the source and build temporary files.
  6. # mkdir ~/rowboat-android
    # cd ~/rowboat-android
    # repo init -u git://gitorious.org/rowboat/manifest.git -m rowboat-gingerbread-dsp.xml
    # repo sync
  7. Manually download the TI DVSDK package to the external/ti-dsp folder from the table in webpage http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_4_00/4_01_00_09/index_FDS.html. Registration might be needed.
    • For DM37xx platform, download dvsdk_dm3730-evm_4_01_00_09_setuplinux package;
    • For OMAP35xx platform, download dvsdk_omap3530-evm_4_01_00_09_setuplinux package.

Build

If English is not the locale in your host machine, some package install scripts will fail due to unexpected non-English output. Set env LANG as following to fix it:

# export LANG=C 

To build Android with TI DSP stack use following command. It builds Android and Linux kernel for the selected platform, TI kernel modules for DSP communication and codec server, and SGX drivers as while.

# cd ~/rowboat-android
# make TARGET_PRODUCT=[omap3evm | beagleboard] [OMAPES=5.x]

Your must specify your board with TARGET_PRODUCT variable. OMAPES variable is set to 5.x by default to build for DM37xx only.

Create the rootfs image, assuming TARGET_PRODUCT=omap3evm in the command above:

# cd out/target/product/omap3evm
# mkdir android_rootfs
# cp -r root/* system android_rootfs
# ../../../../build/tools/mktarball.sh ../../../host/linux-x86/bin/fs_get_stats android_rootfs . rootfs rootfs.tar.bz2

For DM37x EVM, download the TI Gingerbread Devkit 1.0 DM37x Prebuilt Image Package and untar it to get MLO and u-boot images, which are DM37X/Boot_Images/MLO and DM37X/Boot_Images/u-boot.bin respectively.

# wget http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android_DevKit/TI_Android_GingerBread_2_3_DevKit_1_0/exports/DM37X.tar.gz
# tar zxf DM37X.tar.gz

To get MLO and u-boot.bin for Beagleboard-xM, download the Beagleboard-xM Gingerbread prebuilt image package.

Follow the instructions in ConfigureAndBuild#Prepare_SD_card to populate the rootfs to a SD card. Before copying uImage to the SD card, first copy MLO to the SD card first partition; also copy u-boot.bin into the same partition. MLO has to be copied first, otherwise the board will not boot.

How to Make 3 Partition SD Card wiki is an alternative reference to populate rowboat to a SD card.

Boot

DVSDK DSP stack by default uses physical memory window within the first 128MB. In order not to change DSP stack mappings we recommend to use memory hole settings as in the examples below for boards with more than 128MB DDR. (Don't forget to adjust these parameters for your board)

Boards with 128MB of memory are not tested and not recommended.

You'll probably have kernel crash issue due to v4l2 buffer allocation failure with the omap_vout driver in some cases. To avoid this, try following bootargs additions: omap_vout.vid1_static_vrfb_alloc=y.

The following is an example of u-boot env setup for DM3730 EVM with 256MB DDR to boot from SD card. (It includes artificial line breaks to maintain a print-friendly document.) 'mpurate=1000' is necessary to decode 720P video clips. Please use 1GHz verified DM37x devices, otherwise DSP will crash while running at 1GHz.

OMAP3_EVM# setenv bootcmd 'mmc init; fatload mmc 0 80800000 uImage; bootm 80800000'
OMAP3_EVM# setenv bootargs 'mem=76M@0x80000000 mem=128M@0x88000000 console=tty0
console=ttyS0,115200n8 androidboot.console=ttyS0 root=/dev/mmcblk0p2 rw rootfstype=ext3
init=/init rootwait ip=off omap_vout.vid1_static_vrfb_alloc=y
omapdss.def_disp=dvi omapfb.mode=dvi:1280x720MR-16 mpurate=1000'
OMAP3_EVM# saveenv

The configuration in the example above sets the display to the DVI port. For more details of display mode see modedb Documentation.

Test

To test media playback copy media files to the third partition of the SD card and use 'Music player' or 'Gallery' UI applications in rowboat. Supported formats are available on OMX DSP-accelerated audio/video codecs wiki page. Check for 'omx-dsp' tag in logcat to see that accelerated codecs are enabled.

If you have any video clip which should be supported but cannot play on rowboat, please try to extract the video elementary stream and play it with the DVSDK decode demo.

The top command shows the ARM load on DM3730@1GHz is about 4~8% when playing H.264@HP video clips in 720P resolution with AAC codec running on ARM side.

Instruction Difference for Build and Run Froyo+DSP

Preparation

java5-jdk is required for compiling Froyo. (Since Gingerbread java6-jdk is required.)

Use manifest rowboat-froyo-dsp.xml to download Froyo source from Rowboat.

Build

To build Rowboat Froyo+DSP use the following command:

# make TARGET_PRODUCT=[omap3evm | beagleboard | igepv2] [OMAPES=(2.x|3.x|5.x)]

Your must specify your board with TARGET_PRODUCT variable. Set OMAPES variable to install proper version of SGX drivers (Default is 3.x):

OMAPES=2.x, for OMAP3530 ES1 or ES2;
OMAPES=3.x, for OMAP3530 ES3.0;
OMAPES=5.x, for DM37x

To get MLO and u-boot.bin for OMAP35x/DM37x EVM, download the TI Froyo Devkit 2.2 DM37x prebuilt image package. To get the same for Beagleboard-xM, download the Beagleboard-xM Froyo prebuilt image package.

Boot

For DM37x EVM and Beagleboard-xM, use the following memory hole setup in bootargs.

 'mem=68M@0x80000000 mem=128M@0x88000000'

For OMAP35x EVM and Beagleboard, use the following memory hole setup in bootargs.

 'mem=104M@0x80000000 mem=128M@0x88000000'

Known Issues

  • dragging the playback progress bar causes a/v out of sync with some video clips (in Froyo only);

Some Observations

  • Sometimes Jave VM complains about SIGSEGV during compiling rowboat. Please re-run the make command if it happens.
  • If there is any failure while compiling dvsdk packages, and you want to redo a clean dvsdk build, please delete external/ti-dsp/already_clean and external/ti-dsp/ti-dvsdk_<version>/ and re-run the build command. If external/ti-dsp/already_clean exists, the build script will not install and patch dvsdk packages again. Please refer to the top level Makefile for details.
Comment by matthieu...@gmail.com, Jul 20, 2010

Codec Engine is updated to 2_25_05_16, it can be found there : http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ce/2_25_05_16/index_FDS.html (also needs a TI account)

Comment by alois.be...@gmail.com, Jul 30, 2010

Codec Engine can be also downloaded from here http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ce/index.html and without TI account.

Comment by liuyuanj...@gmail.com, Aug 1, 2010

I can't find 'prepare' command or shell file for './prepare'. when i skip './prepare' command to directly run '# make TARGET_PRODUCT=beagleboard BUILD_WITH_GST=true dvsdk'command, the error 'make: No rule to create dvsdk. stop'. Could you help me? Thanks.

Comment by vincepas...@gmail.com, Aug 17, 2010

liuyuanjunjosen:

If you haven't already figured it out, you run "./prepare" from your Android root directory. That is, where you downloaded the rowboat-eclair-dsp.xml repo.

You should have the required files in "external/ti-dsp" as noted above, and the "./prepare" script will download whatever else is required.

Cheers,

sws-vinpa.

Comment by liuyuanj...@gmail.com, Aug 23, 2010

sws-vinpa:

Thanks for your reply. I have made the rootfs system with 'make TARGET_PRODUCT=beagleboard BUILD_WITH_GST=true'. I have not tested the rootfs due to kernel issues. the kernel is hanged up at '...Done. Booting the kernel'. After check the machine ID, the issue still here. Is the 6.2.33 kernel parameter same as 2.6.29 version except the MEM assignment? thanks!

Comment by cyu...@163.com, Aug 24, 2010

According the compile method given above, i get errors listed as: GT_config_posix.c: In function 'GTConfig_posixInit': GT_config_posix.c:132: error: 'PTHREAD_MUTEX_ADAPTIVE_NP' undeclared (first use in this function) GT_config_posix.c:132: error: (Each undeclared identifier is reported only once GT_config_posix.c:132: error: for each function it appears in.)

Anybody could tell me the reason? Thanks.

Comment by huseyin....@ardictech.com, Sep 18, 2010

After your instruction, I built the stack POWER SGX and DSP supoort with GST.

After running gst lunch ( "gst-launch-0.10 -v filesrc location=1.mp4 ! TIViddec2 codecName=h264dec engineName=codecServer ! TIDmaiVideoSink videoStd=VGA videoOutput=DVI sync=false ) I have taken a error and the Gallery Player plays a movie ( the simpson movie trailer 720p ) very slowly.

the simpson movie trailer http://www.h264info.com/clips.html

Error log : # gst-launch-0.10 -v filesrc location=1.mp4 ! TIViddec2 codecName=h264dec engineName=codecServer ! TIDmaiVideoSink videoOutput=DVI sync=false Setting pipeline to PAUSED ... Pipeline is PREROLLING ...

(gst-launch-0.10:1008): GStreamer-CRITICAL : gst_caps_get_structure: assertion `GST_IS_CAPS (caps)' failed

(gst-launch-0.10:1008): GStreamer-CRITICAL : gst_structure_get_value: assertion `structure != NULL' failed

(gst-launch-0.10:1008): GStreamer-CRITICAL : gst_value_get_mini_object: assertion `GST_VALUE_HOLDS_MINI_OBJECT (value)' failed /GstPipeline?:pipeline0/GstTIViddec2:tividdec20.GstPad?:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)720, height=(int)0 ERROR: from element /GstPipeline?:pipeline0/GstTIViddec2:tividdec20: Failed to queue input buffer into circular buffer

Additional debug info: gsttividdec2.c(840): gst_tividdec2_chain (): /GstPipeline?:pipeline0/GstTIViddec2:tividdec20 ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... /GstPipeline?:pipeline0/GstTIViddec2:tividdec20.GstPad?:src: caps = NULL FREEING pipeline ... #

Comment by thinkt...@gmail.com, Sep 21, 2010

I use the command and it has a warning, no element "alsasink". gst-launch audiotestsrc freq=1000 num-buffers=100 ! alsasink

The following command works, but I can not play all the file source. gst-launch -v videotestsrc ! TIDmaiVideoSink videoStd=VGA videoOutput=LCD accelFrameCopy=FALSE sync=false

Comment by rocky.on...@gmail.com, Oct 6, 2010

@huseyin: how did you find the workaround for that problem? Does including PowerSGX matter? I have the exact same error when trying to play the Simpson movie trailer.

Comment by try...@gmail.com, Oct 7, 2010

Problems while installing ti_cgt_c6000_6.1.12_setup_linux_x86.bin ...

It seems to have partial internationalization, has it prompted me in french "Ceci installera C6000 Code Generation Tools sur votre ordinateur. Continuer?" which wasn't expected by the install script and then froze expecting "This will install C6000 Code" ...

Comment by huseyin....@ardictech.com, Nov 29, 2010

I found the problem reason that OMAP 3530 does not support over SD 480 / h264 / mp4 . that is 720 / h264 /mp4 . I think we should commit codes about preventing unsupported video codec playing with errors.

"the OMAP3530 was limited to D1 video for the most part, and offered 720p only on MPEG4 and in an unstable state"

Comment by pulin...@gmail.com, Jan 18, 2011

Hi everybody! How can I download the Latest Update(•12/20/2010 - rowboat-froyo-dsp.xml removed DVSDK4 installation dependency on CodeSourcery? toolchain)?

Thanks!

Comment by karenpor...@gmail.com, Mar 17, 2011

where can i find more information on enabling codecs?

Comment by jaiber...@gmail.com, Mar 22, 2011

I need execute the dsp-link-examples, someone could i help me please??

Android is running ok, and modules dsplink ok too.

Thanks

Comment by sandia.a...@gmail.com, May 10, 2011

Can someone help me, I'follow the steps and I get an error:

$ make TARGET_PRODUCT=omap3evm OMAPES=3.x

PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=2.2 TARGET_PRODUCT=omap3evm TARGET_BUILD_VARIANT=eng TARGET_SIMULATOR=false TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=MASTER

... ... ...

target Non-prelinked: libsimplejni (out/target/product/omap3evm/symbols/system/lib/libsimplejni.so) target Non-prelinked: libtestplugin (out/target/product/omap3evm/symbols/system/lib/libtestplugin.so) target Non-prelinked: libwnndict (out/target/product/omap3evm/symbols/system/lib/libwnndict.so) Install system fs image: out/target/product/omap3evm/system.img make -C kernel ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- uImage make1?: Entering directory `/home/sandra/rowboat-android-dsp/kernel' scripts/kconfig/conf -s arch/arm/Kconfig make1?: Leaving directory `/home/sandra/rowboat-android-dsp/kernel' make1?: Entering directory `/home/sandra/rowboat-android-dsp/kernel'

CHK include/linux/version.h
make2?: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-arm CALL scripts/checksyscalls.sh
<stdin>:1523:2: warning: #warning syscall recvmmsg not implemented
CHK include/linux/compile.h CC arch/arm/mm/alignment.o LD arch/arm/mm/built-in.o CC kernel/cpuset.o
kernel/cpuset.c: In function 'cpuset_can_attach': kernel/cpuset.c:1332: error: 'task' undeclared (first use in this function) kernel/cpuset.c:1332: error: (Each undeclared identifier is reported only once kernel/cpuset.c:1332: error: for each function it appears in.) make2?: [kernel/cpuset.o] Error 1 make1?: kernel? Error 2 make1?: Leaving directory `/home/sandra/rowboat-android-dsp/kernel' make: kernel? Error 2

Comment by esteb0...@hotmail.com, Jun 21, 2011

I have problems to install dvsdk_omap3530-evm_4_01_00_09_setuplinux. when I confirm this question "This will install TI OMAP35x/AM37x Android Graphics SDK on your computer. Continue? [n/Y] Y" the shell stop and it don't work. Could you help me? thank.

Comment by scsic...@gmail.com, Jan 9, 2012

I'm so sorry for my poor english.

I download rowboat-gingerbread-dsp.xml sourcecode, compiled and run image. it worked with some issues.

----------> PC: mv Sitara ARM Microprocessors Whats New from Texas Instruments.3gp arm.3pg ffmpeg -i arm.3gp -acodec copy -vcodec libx264 -s 720x480 -b 377k -vpre max arm.ts

BBxM: am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Videos/arm.ts -t video/ <---------- the sound is ok, but video play a little time and can not continue to play, it was pending.

what wrong is it, the file(hardware/ti/omx/video/omx-dsp-video.cpp) is so complex, who can explain to me the state machine in this file


Sign in to add a comment
Powered by Google Project Hosting