|
DSP
This page contains information about enabling hardware acceleration for multimedia features of Android on OMAP3530 and DM3730.
Latest Update
BenefitsThe 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 ComponentsThe 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.
Building and Testing DSP stackThis 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
# mkdir -p ~/bin # curl http://android.git.kernel.org/repo >~/bin/repo # chmod a+x ~/bin/repo # mkdir ~/rowboat-android # cd ~/rowboat-android # repo init -u git://gitorious.org/rowboat/manifest.git -m rowboat-gingerbread-dsp.xml # repo sync BuildIf 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. BootDVSDK 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. TestTo 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+DSPPreparationjava5-jdk is required for compiling Froyo. (Since Gingerbread java6-jdk is required.) Use manifest rowboat-froyo-dsp.xml to download Froyo source from Rowboat. BuildTo 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. BootFor 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
Some Observations
|
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)
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.
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.
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.
sws-vinpa:
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.
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 ... #
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
@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.
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" ...
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"
Hi everybody! How can I download the Latest Update(•12/20/2010 - rowboat-froyo-dsp.xml removed DVSDK4 installation dependency on CodeSourcery? toolchain)?
Thanks!
where can i find more information on enabling codecs?
I need execute the dsp-link-examples, someone could i help me please??
Android is running ok, and modules dsplink ok too.
Thanks
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'
make2?: `include/asm-arm/mach-types.h' is up to date. <stdin>:1523:2: warning: #warning syscall recvmmsg not implemented 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 2I 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.
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