* [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors
@ 2010-09-17 17:59 Pierre-Luc Simard
2010-09-17 17:59 ` [Buildroot] [PATCH 01/17] Basic frame to support TI's packages for OMAP and Davinci processors Pierre-Luc Simard
` (17 more replies)
0 siblings, 18 replies; 25+ messages in thread
From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw)
To: buildroot
Hello All,
I'd like some comment on the packages I've made to support TI's gstreamer
plugin for the OMAP3 and DM365 processors. All packages compile using
crosstool-ng and glibc, I have not yet tested them with BR's own internal
toolchain and the uclibc at the moment. If anybody wants to test these package
I'll provide as much assistance as I can. I've publish my working branch at
http://github.com/Admetric/buildroot
It's my first time posting patches so guidance and/or comments on how I'm
sending the patches and on the patches themselves are welcome.
Thanks in advance,
Pierre-Luc
^ permalink raw reply [flat|nested] 25+ messages in thread* [Buildroot] [PATCH 01/17] Basic frame to support TI's packages for OMAP and Davinci processors 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 02/17] TI's DSP/BIOS Utilities Pierre-Luc Simard ` (16 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/Config.in | 3 +++ package/ti/Config.in | 45 +++++++++++++++++++++++++++++++++++++++++++++ package/ti/ti.mk | 1 + 3 files changed, 49 insertions(+), 0 deletions(-) create mode 100644 package/ti/Config.in create mode 100644 package/ti/ti.mk diff --git a/package/Config.in b/package/Config.in index 2209b55..40492b8 100644 --- a/package/Config.in +++ b/package/Config.in @@ -345,6 +345,9 @@ source "package/ng-spice-rework/Config.in" source "package/shared-mime-info/Config.in" endmenu +#TI's Packages +source "package/ti/Config.in" + menu "Networking applications" source "package/argus/Config.in" source "package/avahi/Config.in" diff --git a/package/ti/Config.in b/package/ti/Config.in new file mode 100644 index 0000000..14b0225 --- /dev/null +++ b/package/ti/Config.in @@ -0,0 +1,45 @@ +menuconfig BR2_PACKAGE_TI_OMAP_DAVINCI + bool "TI OMAP and Davinci support" + depends on BR2_arm + help + OMAP3 Support for the builtin DSP + +if BR2_PACKAGE_TI_OMAP_DAVINCI + +choice + prompt "Processor/DSP Platform" + default BR2_PACKAGE_TI_PLATFORM_omap3 + + config BR2_PACKAGE_TI_PLATFORM_omap3 + bool "OMAP 3530" + + config BR2_PACKAGE_TI_PLATFORM_dm365 + bool "DM365" + + # TODO: Implement other platforms + # config BR2_PACKAGE_TI_PLATFORM_l137 + # bool "OMAP L1XX (L137)" + # + # config BR2_PACKAGE_TI_PLATFORM_l138 + # bool "OMAP L138" + # + # config BR2_PACKAGE_TI_PLATFORM_dm6446 + # bool "DM6446" + # + # config BR2_PACKAGE_TI_PLATFORM_dm6467 + # bool "DM6467" + # + # config BR2_PACKAGE_TI_PLATFORM_dm368 + # bool "DM368" + # + # config BR2_PACKAGE_TI_PLATFORM_dm355 + # bool "DM355" + +endchoice + +comment "Target components" + +comment "Staging tools" + + +endif diff --git a/package/ti/ti.mk b/package/ti/ti.mk new file mode 100644 index 0000000..e899289 --- /dev/null +++ b/package/ti/ti.mk @@ -0,0 +1 @@ +include package/ti/*/*.mk -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 02/17] TI's DSP/BIOS Utilities 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 01/17] Basic frame to support TI's packages for OMAP and Davinci processors Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 03/17] TI's DSP Code Generation Tools Pierre-Luc Simard ` (15 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 2 +- package/ti/ti-biosutils/Config.in | 6 ++++++ package/ti/ti-biosutils/ti-biosutils.mk | 28 ++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletions(-) create mode 100644 package/ti/ti-biosutils/Config.in create mode 100644 package/ti/ti-biosutils/ti-biosutils.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index 14b0225..9b65bce 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -40,6 +40,6 @@ endchoice comment "Target components" comment "Staging tools" - +source "package/ti/ti-biosutils/Config.in" endif diff --git a/package/ti/ti-biosutils/Config.in b/package/ti/ti-biosutils/Config.in new file mode 100644 index 0000000..8b24bfc --- /dev/null +++ b/package/ti/ti-biosutils/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TI_BIOSUTILS + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + bool "DSP/BIOS Utilities" + help + TI DSP/BIOS Utilities" + http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/Bios_Utils diff --git a/package/ti/ti-biosutils/ti-biosutils.mk b/package/ti/ti-biosutils/ti-biosutils.mk new file mode 100644 index 0000000..19dfeda --- /dev/null +++ b/package/ti/ti-biosutils/ti-biosutils.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# ti-biosutils +# +################################################################################ +TI_BIOSUTILS_VERSION:=1.02.02.02 +TI_BIOSUTILS_FILE_VERSION_MAJOR:=1_02_02 +TI_BIOSUTILS_FILE_VERSION:=$(TI_BIOSUTILS_FILE_VERSION_MAJOR)_02 +TI_BIOSUTILS_SOURCE:=biosutils_$(TI_BIOSUTILS_FILE_VERSION_MAJOR).tar.gz +TI_BIOSUTILS_SITE:=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/Bios_Utils/$(TI_BIOSUTILS_FILE_VERSION)/exports +TI_BIOSUTILS_DIR:=$(BUILD_DIR)/ti-biosutils-$(TI_BIOSUTILS_VERSION) + +TI_BIOSUTILS_INSTALL_TARGET = NO +TI_BIOSUTILS_INSTALL_STAGING = YES + +TI_BIOSUTILS_INSTALL_DIR:=$(STAGING_DIR)/ti/biosutils-$(TI_BIOSUTILS_VERSION) + +define TI_BIOSUTILS_INSTALL_STAGING_CMDS + mkdir -p $(TI_BIOSUTILS_INSTALL_DIR) + cp -r $(TI_BIOSUTILS_DIR)/* $(TI_BIOSUTILS_INSTALL_DIR) + chmod -R +w $(TI_BIOSUTILS_INSTALL_DIR) +endef + +define TI_BIOSUTILS_UNINSTALL_STAGING_CMDS + rm -rf $(TI_BIOSUTILS_INSTALL_DIR) +endef + +$(eval $(call GENTARGETS,package/ti,ti-biosutils)) \ No newline at end of file -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 03/17] TI's DSP Code Generation Tools 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 01/17] Basic frame to support TI's packages for OMAP and Davinci processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 02/17] TI's DSP/BIOS Utilities Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 04/17] TI's Codec Engine for TI ARM/DSP processors Pierre-Luc Simard ` (14 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-cgt6x/Config.in | 6 +++++ package/ti/ti-cgt6x/ti-cgt6x.mk | 42 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-cgt6x/Config.in create mode 100644 package/ti/ti-cgt6x/ti-cgt6x.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index 9b65bce..8abb6d7 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -41,5 +41,6 @@ comment "Target components" comment "Staging tools" source "package/ti/ti-biosutils/Config.in" +source "package/ti/ti-cgt6x/Config.in" endif diff --git a/package/ti/ti-cgt6x/Config.in b/package/ti/ti-cgt6x/Config.in new file mode 100644 index 0000000..5b13c9f --- /dev/null +++ b/package/ti/ti-cgt6x/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TI_CGT6X + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + bool "DSP Code Generation Tools" + help + TI DSP Code Generation Tools + https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm \ No newline at end of file diff --git a/package/ti/ti-cgt6x/ti-cgt6x.mk b/package/ti/ti-cgt6x/ti-cgt6x.mk new file mode 100644 index 0000000..29367a7 --- /dev/null +++ b/package/ti/ti-cgt6x/ti-cgt6x.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# ti-cgt6x +# +################################################################################ +TI_CGT6X_VERSION:=6.1.12 + +TI_CGT6X_SOURCE:=ti-cgt6x-$(TI_CGT6X_VERSION).tar.gz +TI_CGT6X_SOURCE_BIN:=ti_cgt_c6000_$(TI_CGT6X_VERSION)_setup_linux_x86.bin +TI_CGT6X_SOURCE_BIN_FOLDER:=c6000cgt$(TI_CGT6X_VERSION) +TI_CGT6X_SITE:=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_3_00/latest//exports +TI_CGT6X_DIR:=$(BUILD_DIR)/ti-cgt6x-$(TI_CGT6X_VERSION) + +TI_CGT6X_INSTALL_TARGET = NO +TI_CGT6X_INSTALL_STAGING = YES + +TI_CGT6X_INSTALL_DIR:=$(STAGING_DIR)/ti/cgt6x-$(TI_CGT6X_VERSION) + +$(DL_DIR)/$(TI_CGT6X_SOURCE): + $(call DOWNLOAD,$(TI_CGT6X_SITE),$(TI_CGT6X_SOURCE_BIN)) + chmod +x $(DL_DIR)/$(TI_CGT6X_SOURCE_BIN) + $(DL_DIR)/$(TI_CGT6X_SOURCE_BIN) --mode silent --nodoc --prefix $(DL_DIR)/$(TI_CGT6X_SOURCE_BIN_FOLDER) + find $(DL_DIR)/$(TI_CGT6X_SOURCE_BIN_FOLDER) -type f -not -readable -exec sudo chmod gou+r {} \; + find $(DL_DIR)/$(TI_CGT6X_SOURCE_BIN_FOLDER) -type d -not -executable -exec sudo chmod gou+rx {} \; + (cd $(DL_DIR); \ + tar -czf $(TI_CGT6X_SOURCE) $(TI_CGT6X_SOURCE_BIN_FOLDER)\ + ) + rm -rf $(DL_DIR)/$(TI_CGT6X_SOURCE_BIN_FOLDER) + +define TI_CGT6X_INSTALL_STAGING_CMDS + mkdir -p $(TI_CGT6X_INSTALL_DIR) + cp -r $(@D)/* $(TI_CGT6X_INSTALL_DIR) + chmod -R +w $(TI_CGT6X_INSTALL_DIR) +endef + +define TI_CGT6X_UNINSTALL_STAGING_CMDS + rm -rf $(TI_CGT6X_INSTALL_DIR) +endef + +ti-cgt6x-source: $(DL_DIR)/$(TI_CGT6X_SOURCE) + +$(eval $(call GENTARGETS,package/ti,ti-cgt6x)) \ No newline at end of file -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 04/17] TI's Codec Engine for TI ARM/DSP processors 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (2 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 03/17] TI's DSP Code Generation Tools Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 05/17] TI Codecs for the OMAP3 processor Pierre-Luc Simard ` (13 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-codec-engine/Config.in | 21 +++ package/ti/ti-codec-engine/ti-codec-engine.mk | 178 +++++++++++++++++++++++++ 3 files changed, 200 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-codec-engine/Config.in create mode 100644 package/ti/ti-codec-engine/ti-codec-engine.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index 8abb6d7..e371782 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -42,5 +42,6 @@ comment "Target components" comment "Staging tools" source "package/ti/ti-biosutils/Config.in" source "package/ti/ti-cgt6x/Config.in" +source "package/ti/ti-codec-engine/Config.in" endif diff --git a/package/ti/ti-codec-engine/Config.in b/package/ti/ti-codec-engine/Config.in new file mode 100644 index 0000000..4f4566e --- /dev/null +++ b/package/ti/ti-codec-engine/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_TI_CODEC_ENGINE + bool "Codec Engine" + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + # Could probably be used for || BR2_PACKAGE_TI_PLATFORM_dm6446 + select BR2_PACKAGE_TI_LOCAL_POWER_MANAGER + select BR2_PACKAGE_TI_FRAMEWORK_COMPONENTS + select BR2_PACKAGE_TI_XDAIS + select BR2_PACKAGE_TI_XDCTOOLS + select BR2_PACKAGE_TI_LINUXUTILS + select BR2_PACKAGE_TI_DSPBIOS + select BR2_PACKAGE_TI_DSPLINK + select BR2_PACKAGE_TI_BIOSUTILS + select BR2_PACKAGE_TI_CGT6X + select BR2_PACKAGE_TI_EDMA3LLD + help + Codec Engine for TI ARM/DSP processors + http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ce + +config BR2_PACKAGE_TI_CODEC_ENGINE_EXAMPLES + bool "Install Codec Engine examples on target" + depends on BR2_PACKAGE_TI_CODEC_ENGINE \ No newline at end of file diff --git a/package/ti/ti-codec-engine/ti-codec-engine.mk b/package/ti/ti-codec-engine/ti-codec-engine.mk new file mode 100644 index 0000000..9e8a522 --- /dev/null +++ b/package/ti/ti-codec-engine/ti-codec-engine.mk @@ -0,0 +1,178 @@ +################################################################################ +# +# ti-codec-engine +# +################################################################################ +TI_CODEC_ENGINE_VERSION:=2.25.05.16 +TI_CODEC_ENGINE_FILE_VERSION:=2_25_05_16 +TI_CODEC_ENGINE_SOURCE = codec_engine_$(TI_CODEC_ENGINE_FILE_VERSION),lite.tar.gz +TI_CODEC_ENGINE_SITE = http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ce/$(TI_CODEC_ENGINE_FILE_VERSION)/exports +TI_CODEC_ENGINE_DIR:=$(BUILD_DIR)/ti-codec-engine-$(TI_CODEC_ENGINE_VERSION) + +TI_CODEC_ENGINE_INSTALL_STAGING = YES +ifeq ($(BR2_PACKAGE_TI_CODEC_ENGINE_EXAMPLES),y) + TI_CODEC_ENGINE_INSTALL_TARGET = YES +else + TI_CODEC_ENGINE_INSTALL_TARGET = NO +endif + +TI_CODEC_ENGINE_DEPENDENCIES = \ + ti-framework-components \ + ti-xdais \ + ti-xdctools \ + ti-linuxutils \ + ti-dspbios \ + ti-cgt6x \ + ti-biosutils \ + ti-edma3lld \ + +TI_CODEC_ENGINE_INSTALL_STAGING_DIR=$(STAGING_DIR)/ti/codec-engine-$(TI_CODEC_ENGINE_VERSION) +TI_CODEC_ENGINE_INSTALL_TARGET_DIR=$(TARGET_DIR)/usr/lib/ti-codec-engine + +TI_CODEC_ENGINE_PLATFORM=UNDEFINED +TI_CODEC_ENGINE_DSP="UNDEFINED" +TI_CODEC_ENGINE_GPPOS="LINUX_GCC" +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omap3),y) + TI_CODEC_ENGINE_DEVICE=OMAP3530 + TI_CODEC_ENGINE_PROGRAMS="APP_CLIENT DSP_SERVER" + TI_CODEC_ENGINE_DSPSUFFIX=x64P + TI_CODEC_ENGINE_DEPENDENCIES += ti-local-power-manager ti-dsplink +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm6446),y) + TI_CODEC_ENGINE_DEVICE=DM6446 + TI_CODEC_ENGINE_PROGRAMS="APP_CLIENT DSP_SERVER" + TI_CODEC_ENGINE_DSPSUFFIX=x64P + TI_CODEC_ENGINE_DEPENDENCIES += ti-local-power-manager ti-dsplink +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm6467),y) + TI_CODEC_ENGINE_DEVICE=DM6467 + TI_CODEC_ENGINE_PROGRAMS="APP_CLIENT DSP_SERVER" + TI_CODEC_ENGINE_DSPSUFFIX=x64P +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm355),y) + TI_CODEC_ENGINE_DEVICE=DM355 + TI_CODEC_ENGINE_PROGRAMS="APP_LOCAL" + TI_CODEC_ENGINE_DSPSUFFIX=x64P +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm365),y) + TI_CODEC_ENGINE_DEVICE=DM365 + TI_CODEC_ENGINE_PROGRAMS="APP_LOCAL" + TI_CODEC_ENGINE_DSPSUFFIX=x64P +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm368),y) + #TODO: Verify if DM365 applies to DM368 + TI_CODEC_ENGINE_DEVICE=DM365 + TI_CODEC_ENGINE_PROGRAMS="APP_LOCAL" + TI_CODEC_ENGINE_DSPSUFFIX=x64P +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omapl137),y) + TI_CODEC_ENGINE_DEVICE=OMAPL137 + TI_CODEC_ENGINE_PROGRAMS="APP_CLIENT DSP_SERVER" + TI_CODEC_ENGINE_DSPSUFFIX=x674 +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omapl138),y) + TI_CODEC_ENGINE_DEVICE=OMAPL138 + TI_CODEC_ENGINE_PROGRAMS="APP_CLIENT DSP_SERVER" + TI_CODEC_ENGINE_DSPSUFFIX=x674 +endif + +TI_CODEC_ENGINE_CONFIGURE_MAKE_ARGS = \ + DEVICES=$(TI_CODEC_ENGINE_DEVICE) \ + GPPOS=$(TI_CODEC_ENGINE_GPPOS) \ + PROGRAMS=$(TI_CODEC_ENGINE_PROGRAMS) \ + CE_INSTALL_DIR="$(TI_CODEC_ENGINE_DIR)" \ + XDC_INSTALL_DIR="$(TI_XDCTOOLS_INSTALL_DIR)" \ + BIOS_INSTALL_DIR="$(TI_DSPBIOS_INSTALL_DIR)" \ + BIOSUTILS_INSTALL_DIR="$(TI_BIOSUTILS_INSTALL_DIR)" \ + DSPLINK_INSTALL_DIR="$(TI_DSPLINK_INSTALL_STAGING_DIR)" \ + XDAIS_INSTALL_DIR="$(TI_XDAIS_INSTALL_DIR)" \ + FC_INSTALL_DIR="$(TI_FRAMEWORK_COMPONENTS_INSTALL_DIR)" \ + CMEM_INSTALL_DIR="$(TI_LINUXUTILS_INSTALL_STAGING_DIR)" \ + LPM_INSTALL_DIR="$(TI_LOCAL_POWER_MANAGER_INSTALL_STAGING_DIR)" \ + EDMA3_LLD_INSTALL_DIR="$(TI_EDMA3LLD_INSTALL_DIR)" \ + CGTOOLS_V5T=$(dir $(TARGET_CROSS)) \ + CGTOOLS_C64P="$(TI_CGT6X_INSTALL_DIR)" \ + CGTOOLS_C674="$(TI_CGT6X_INSTALL_DIR)" + + +ifeq ($(BR2_PACKAGE_TI_CODEC_ENGINE_EXAMPLES),y) + TI_CODEC_ENGINE_CONFIGURE_CMDS += TI_CODEC_ENGINE_EXAMPLE_CONFIGURE_CMDS + TI_CODEC_ENGINE_BUILD_CMDS += TI_CODEC_ENGINE_EXAMPLE_BUILD_CMDS + TI_CODEC_ENGINE_INSTALL_TARGET_CMDS += TI_CODEC_ENGINE_EXAMPLE_INSTALL_TARGET_CMDS +endif + + +define TI_CODEC_ENGINE_INSTALL_STAGING_CMDS + $(INSTALL) -d $(TI_CODEC_ENGINE_INSTALL_STAGING_DIR) + cp -a $(@D)/* $(TI_CODEC_ENGINE_INSTALL_STAGING_DIR) + $(INSTALL) -R +w $(TI_CODEC_ENGINE_INSTALL_STAGING_DIR) +endef + +define TI_CODEC_ENGINE_EXAMPLE_CONFIGURE_CMDS + sed -i \ + -e s:arm-none-linux-gnueabi-:$(notdir $(TARGET_CROSS))-:g \ + $(@D)/examples/xdcpaths.mak + $(MAKE) -C $(@D)/examples/ti/sdo/ce/examples/codecs $(TI_CODEC_ENGINE_CONFIGURE_MAKE_ARGS) .make clean + $(MAKE) -C $(@D)/examples/ti/sdo/ce/examples/extensions $(TI_CODEC_ENGINE_CONFIGURE_MAKE_ARGS) .make clean + $(MAKE) -C $(@D)/examples/ti/sdo/ce/examples/servers $(TI_CODEC_ENGINE_CONFIGURE_MAKE_ARGS) .make clean + $(MAKE) -C $(@D)/examples/ti/sdo/ce/examples/apps $(TI_CODEC_ENGINE_CONFIGURE_MAKE_ARGS) .make clean +endef + +define TI_CODEC_ENGINE_EXAMPLE_BUILD_CMDS + $(MAKE) -C $(@D)/examples/ti/sdo/ce/examples/codecs $(TI_CODEC_ENGINE_CONFIGURE_MAKE_ARGS) all + $(MAKE) -C $(@D)/examples/ti/sdo/ce/examples/extensions $(TI_CODEC_ENGINE_CONFIGURE_MAKE_ARGS) all + $(MAKE) -C $(@D)/examples/ti/sdo/ce/examples/servers $(TI_CODEC_ENGINE_CONFIGURE_MAKE_ARGS) all + $(MAKE) -C $(@D)/examples/ti/sdo/ce/examples/apps $(TI_CODEC_ENGINE_CONFIGURE_MAKE_ARGS) all +endef + +define TI_CODEC_ENGINE_EXAMPLE_INSTALL_TARGET_CMDS + $(INSTALL) -d $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR); \ + if [ -e $(@D)/examples/apps/system_files/$(TI_CODEC_ENGINE_DEVICE)/loadmodules.sh ]; then \ + cp $(@D)/examples/apps/system_files/$(TI_CODEC_ENGINE_DEVICE)/loadmodules.sh $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR); \ + elif [ -e $(@D)/loadmodules.sh ]; then \ + cp $(@D)/loadmodules.sh $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR); \ + fi ;\ + i_find=`find $(@D) -name "*.$(TI_CODEC_ENGINE_DSPSUFFIX)"` ; \ + for i in $$i_find; do \ + i_dir=`dirname $$i | cut -f3 -d /`; \ + echo Installing $$i TO $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR)/ti-codec-engine-examples/servers/$$i_dir ; \ + $(INSTALL) -d $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR)/ti-codec-engine-examples/servers/`dirname $$i | cut -f3 -d /` ; \ + $(INSTALL) $$i $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR)/ti-codec-engine-examples/servers/`dirname $$i | cut -f3 -d /` ; \ + done ; \ + i_find=`find $(@D) -name "*.xv5T"` ; \ + for i in $$i_find; do \ + i_dir=`dirname $$i | cut -f3 -d /`; \ + echo Installing $$i TO $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR)/ti-codec-engine-examples/servers/$$i_dir ; \ + $(INSTALL) -d $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR)/ti-codec-engine-examples/servers/`dirname $$i | cut -f3 -d /` ; \ + $(INSTALL) $$i $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR)/ti-codec-engine-examples/servers/`dirname $$i | cut -f3 -d /` ; \ + done; \ + i_find=`find $(@D) -name "*.dat"` ; \ + for i in $$i_find; do \ + i_dir=`dirname $$i | cut -f3 -d /`; \ + echo Installing $$i TO $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR)/ti-codec-engine-examples/servers/$$i_dir ; \ + $(INSTALL) -d $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR)/ti-codec-engine-examples/servers/`dirname $$i | cut -f3 -d /` ; \ + $(INSTALL) $$i $(TI_CODEC_ENGINE_INSTALL_TARGET_DIR)/ti-codec-engine-examples/servers/`dirname $$i | cut -f3 -d /` ; \ + done; \ + + #TODO: Clean up this section. It's basically a cut&paste and should be optional all together. + # For each directory, softlink to the app server, except special cases + # cd ${D}/${installdir}/ti-codec-engine-examples + # for i in $(find . -type d | grep -v servers); do + # { + # pwd + # cd ${D}/${installdir}/ti-codec-engine-examples/$i + # if [ $(basename $i) == "audio1_ires" ] ; then + # ln -s ../servers/audio1_ires/audio1_ires.${DSPSUFFIX} + # elif [ $(basename $i) == "server_api_example" ] ; then + # ln -s ../servers/server_api_example/audio_copy.${DSPSUFFIX} + # elif [ $(basename $i) != "." ] ; then + # ln -s ../servers/all_codecs/all.${DSPSUFFIX} + # else + # echo Skipping $i + # fi + # } + # done +endef + +$(eval $(call GENTARGETS,package/ti,ti-codec-engine)) + -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 05/17] TI Codecs for the OMAP3 processor 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (3 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 04/17] TI's Codec Engine for TI ARM/DSP processors Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 06/17] TI's Davinci Multimedia Application Interface (DMAI) for TI ARM/DSP processors Pierre-Luc Simard ` (12 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-codecs-omap3/Config.in | 10 +++ package/ti/ti-codecs-omap3/ti-codecs-omap3.mk | 79 +++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-codecs-omap3/Config.in create mode 100644 package/ti/ti-codecs-omap3/ti-codecs-omap3.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index e371782..b6179cb 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -38,6 +38,7 @@ choice endchoice comment "Target components" +source "package/ti/ti-codecs-omap3/Config.in" comment "Staging tools" source "package/ti/ti-biosutils/Config.in" diff --git a/package/ti/ti-codecs-omap3/Config.in b/package/ti/ti-codecs-omap3/Config.in new file mode 100644 index 0000000..84181f6 --- /dev/null +++ b/package/ti/ti-codecs-omap3/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_TI_CODECS_OMAP3 + bool "TI DSP Codecs" + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + depends on BR2_PACKAGE_TI_CODEC_ENGINE + select BR2_PACKAGE_TI_XDCTOOLS + select BR2_PACKAGE_TI_LINUXUTILS + select BR2_PACKAGE_TI_LOCAL_POWER_MANAGER + help + TI Codecs for the OMAP3 + http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent diff --git a/package/ti/ti-codecs-omap3/ti-codecs-omap3.mk b/package/ti/ti-codecs-omap3/ti-codecs-omap3.mk new file mode 100644 index 0000000..db28b2e --- /dev/null +++ b/package/ti/ti-codecs-omap3/ti-codecs-omap3.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# ti-codecs-omap3 +# +################################################################################ +TI_CODECS_OMAP3_VERSION:=1.01.00 +TI_CODECS_OMAP3_FILE_VERSION:=1_01_00 +TI_CODECS_OMAP3_SOURCE:=ti-codecs-omap3-$(TI_CODEC_VERSION).tar.gz +TI_CODECS_OMAP3_SOURCE_BIN:=cs1omap3530_setupLinux_$(TI_CODECS_OMAP3_FILE_VERSION)-prebuilt-dvsdk3.01.00.10.bin +TI_CODECS_OMAP3_SOURCE_BIN_FOLDER:=cs1omap3530_$(TI_CODECS_OMAP3_FILE_VERSION) +TI_CODECS_OMAP3_SITE:=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/dvsdk/dvsdk_3_01/3_01_00_10/exports +TI_CODECS_OMAP3_DIR:=$(BUILD_DIR)/ti-codecs-omap3-$(TI_CODECS_OMAP3_VERSION) + +TI_CODECS_OMAP3_INSTALL_STAGING_DIR:=$(STAGING_DIR)/ti/codecs-$(TI_CODECS_OMAP3_VERSION) +TI_CODECS_OMAP3_INSTALL_TARGET_DIR:=/usr/lib/ti-codecs-omap3-server + +TI_CODECS_OMAP3_DEPENDENCIES = \ + ti-cgt6x \ + ti-xdctools \ + ti-dspbios \ + ti-codec-engine \ + ti-linuxutils \ + ti-local-power-manager + +TI_CODECS_OMAP3_DSPSUFFIX=x64P + +TI_CODECS_OMAP3_MAKE_ARGS = \ + CE_INSTALL_DIR="$(TI_CODEC_ENGINE_INSTALL_STAGING_DIR)" \ + FC_INSTALL_DIR="$(TI_FRAMEWORK_COMPONENTS_INSTALL_DIR)" \ + XDAIS_INSTALL_DIR="$(TI_XDAIS_INSTALL_DIR)" \ + BIOSUTILS_INSTALL_DIR="$(TI_BIOSUTILS_INSTALL_DIR)" \ + LINK_INSTALL_DIR="$(TI_DSPLINK_INSTALL_STAGING_DIR)" \ + CMEM_INSTALL_DIR="$(TI_LINUXUTILS_INSTALL_STAGING_DIR)" \ + LPM_INSTALL_DIR="$(TI_LOCAL_POWER_MANAGER_INSTALL_STAGING_DIR)" \ + BIOS_INSTALL_DIR="$(TI_DSPBIOS_INSTALL_DIR)" \ + CODEGEN_INSTALL_DIR="$(TI_CGT6X_INSTALL_DIR)" \ + XDC_INSTALL_DIR="$(TI_XDCTOOLS_INSTALL_DIR)" \ + CODEC_INSTALL_DIR="$(TI_CODECS_OMAP3_DIR)" \ + XDCARGS="prod" + +$(DL_DIR)/$(TI_CODECS_OMAP3_SOURCE): + $(call DOWNLOAD,$(TI_CODECS_OMAP3_SITE),$(TI_CODECS_OMAP3_SOURCE_BIN)) + chmod +x $(DL_DIR)/$(TI_CODECS_OMAP3_SOURCE_BIN) + $(DL_DIR)/$(TI_CODECS_OMAP3_SOURCE_BIN) -Y --prefix $(DL_DIR) + find $(DL_DIR)/$(TI_CODECS_OMAP3_SOURCE_BIN_FOLDER) -type f -not -readable -exec sudo chmod gou+r {} \; + find $(DL_DIR)/$(TI_CODECS_OMAP3_SOURCE_BIN_FOLDER) -type d -not -executable -exec sudo chmod gou+rx {} \; + (cd $(DL_DIR); \ + tar -czf $(TI_CODECS_OMAP3_SOURCE) $(TI_CODECS_OMAP3_SOURCE_BIN_FOLDER)\ + ) + rm -rf $(DL_DIR)/$(TI_CODECS_OMAP3_SOURCE_BIN_FOLDER) + + +define TI_CODECS_OMAP3_CONFIGURE_CMDS + $(MAKE) -C $(@D) $(TI_CODECS_OMAP3_MAKE_ARGS) clean +endef + +define TI_CODECS_OMAP3_BUILD_CMDS + $(MAKE) -C $(@D) $(TI_CODECS_OMAP3_MAKE_ARGS) all +endef + +define TI_CODECS_OMAP3_INSTALL_STAGING_CMDS + mkdir -p $(TI_CODECS_OMAP3_INSTALL_STAGING_DIR) + cp -a $(@D)/* $(TI_CODECS_OMAP3_INSTALL_STAGING_DIR) + chmod -R +w $(TI_CODECS_OMAP3_INSTALL_STAGING_DIR) +endef + +define TI_CODECS_OMAP3_INSTALL_TARGET_CMDS + $(INSTALL) -d $(TARGET_DIR)$(TI_CODECS_OMAP3_INSTALL_TARGET_DIR); + find $(@D) -name "*.$(TI_CODECS_OMAP3_DSPSUFFIX)" -exec $(INSTALL) {} $(TARGET_DIR)$(TI_CODECS_OMAP3_INSTALL_TARGET_DIR) \; -print ; +endef + +define TI_CODECS_OMAP3_UNINSTALL_STAGING_CMDS + rm -rf $(TI_CODECS_OMAP3_INSTALL_STAGING_DIR) +endef + +ti-codecs-omap3-source: $(DL_DIR)/$(TI_CODECS_OMAP3_SOURCE) + +$(eval $(call GENTARGETS,package/ti,ti-codecs-omap3)) + -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 06/17] TI's Davinci Multimedia Application Interface (DMAI) for TI ARM/DSP processors 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (4 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 05/17] TI Codecs for the OMAP3 processor Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 07/17] TI's DSP/BIOS v5 Kernel Pierre-Luc Simard ` (11 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-dmai/Config.in | 14 ++++ package/ti/ti-dmai/ti-dmai-Wall.patch | 129 +++++++++++++++++++++++++++++++++ package/ti/ti-dmai/ti-dmai.mk | 108 +++++++++++++++++++++++++++ 4 files changed, 252 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-dmai/Config.in create mode 100644 package/ti/ti-dmai/ti-dmai-Wall.patch create mode 100644 package/ti/ti-dmai/ti-dmai.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index b6179cb..e8b6197 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -44,5 +44,6 @@ comment "Staging tools" source "package/ti/ti-biosutils/Config.in" source "package/ti/ti-cgt6x/Config.in" source "package/ti/ti-codec-engine/Config.in" +source "package/ti/ti-dmai/Config.in" endif diff --git a/package/ti/ti-dmai/Config.in b/package/ti/ti-dmai/Config.in new file mode 100644 index 0000000..3986ce6 --- /dev/null +++ b/package/ti/ti-dmai/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_TI_DMAI + bool "Davinci Multimedia Application Interface (DMAI)" + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_TI_FRAMEWORK_COMPONENTS + select BR2_PACKAGE_TI_CODEC_ENGINE + select BR2_PACKAGE_TI_XDCTOOLS + select BR2_PACKAGE_TI_DSPBIOS + select BR2_PACKAGE_TI_CGT6X + select BR2_PACKAGE_TI_CODECS_OMAP3 + select BR2_PACKAGE_TI_LINUXUTILS + help + Davinci Multimedia Application Interface (DMAI) for TI ARM/DSP processors + https://gforge.ti.com/gf/project/dmai/ diff --git a/package/ti/ti-dmai/ti-dmai-Wall.patch b/package/ti/ti-dmai/ti-dmai-Wall.patch new file mode 100644 index 0000000..90a2d46 --- /dev/null +++ b/package/ti/ti-dmai/ti-dmai-Wall.patch @@ -0,0 +1,129 @@ +diff -rupN a/dmai/packages/ti/sdo/dmai/ce/I2p.c b/dmai/packages/ti/sdo/dmai/ce/I2p.c +--- a/dmai/packages/ti/sdo/dmai/ce/I2p.c 2010-08-23 06:26:15.000000000 -0700 ++++ b/dmai/packages/ti/sdo/dmai/ce/I2p.c 2010-08-23 13:26:06.000000000 -0700 +@@ -82,6 +82,8 @@ Int I2p_process(I2p_Handle hI2p, Buffer_ + assert(Buffer_getSize(hInBuf)); + assert(Buffer_getSize(hOutBuf)); + ++ universalOutArgs.extendedError = NULL; ++ + inputArgs.universalInArgs = universalInArgs; + outputArgs.universalOutArgs = universalOutArgs; + inputArgs.universalInArgs.size = sizeof(inputArgs); +diff -rupN a/dmai/packages/ti/sdo/dmai/linux/Display.c b/dmai/packages/ti/sdo/dmai/linux/Display.c +--- a/dmai/packages/ti/sdo/dmai/linux/Display.c 2010-08-23 06:26:17.000000000 -0700 ++++ b/dmai/packages/ti/sdo/dmai/linux/Display.c 2010-08-23 13:29:41.000000000 -0700 +@@ -288,6 +288,7 @@ static Int sysfsSetup_device (FsOptions + const Char *fileName) + { + int index=0; ++ int _sys =0; + + while ((command != displayCommand[index].command) && + (displayCommand[index].command != FsOptions_COMMANDS_END)){ +@@ -300,45 +301,45 @@ static Int sysfsSetup_device (FsOptions + } + + if (displayCommand[index].command == FsOptions_FBSET_DVI) { +- system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); +- system("fbset -fb /dev/fb0 -xres 720 -yres 480 -vxres 720 -vyres 480"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); ++ _sys = system("fbset -fb /dev/fb0 -xres 720 -yres 480 -vxres 720 -vyres 480"); + } + else if (displayCommand[index].command == FsOptions_FBSET_LCD){ +- system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); +- system("fbset -fb /dev/fb0 -xres 480 -yres 640 -vxres 480 -vyres 640"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); ++ _sys = system("fbset -fb /dev/fb0 -xres 480 -yres 640 -vxres 480 -vyres 640"); + } + else if (displayCommand[index].command == FsOptions_FBSET_TV){ +- system("echo 0 > /sys/devices/platform/omapdss/overlay0/enabled"); +- system("echo 0 > /sys/devices/platform/omapdss/display0/enabled"); +- system("echo 0 > /sys/devices/platform/omapdss/display1/enabled"); +- system("echo 0 > /sys/devices/platform/omapdss/display2/enabled"); +- system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); +- system("echo \"\" > /sys/devices/platform/omapdss/overlay0/manager"); +- system("echo \"\" > /sys/devices/platform/omapdss/overlay1/manager"); +- system("echo \"\" > /sys/devices/platform/omapdss/overlay2/manager"); +- system("fbset -fb /dev/fb0 -xres 720 -yres 480 -vxres 720 -vyres 480 -depth 16"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/overlay0/enabled"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/display0/enabled"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/display1/enabled"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/display2/enabled"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/overlay0/manager"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/overlay1/manager"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/overlay2/manager"); ++ _sys = system("fbset -fb /dev/fb0 -xres 720 -yres 480 -vxres 720 -vyres 480 -depth 16"); + } + else if (displayCommand[index].command == FsOptions_FBSET_TV_LCD){ +- system("echo 0 > /sys/devices/platform/omapdss/overlay0/enabled"); +- system("echo 0 > /sys/devices/platform/omapdss/display0/enabled"); +- system("echo 0 > /sys/devices/platform/omapdss/display1/enabled"); +- system("echo 0 > /sys/devices/platform/omapdss/display2/enabled"); +- system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); +- system("echo \"\" > /sys/devices/platform/omapdss/overlay0/manager"); +- system("echo \"\" > /sys/devices/platform/omapdss/overlay1/manager"); +- system("echo \"\" > /sys/devices/platform/omapdss/overlay2/manager"); +- system("fbset -fb /dev/fb0 -xres 480 -yres 640 -vxres 480 -vyres 640 "); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/overlay0/enabled"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/display0/enabled"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/display1/enabled"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/display2/enabled"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/overlay0/manager"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/overlay1/manager"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/overlay2/manager"); ++ _sys = system("fbset -fb /dev/fb0 -xres 480 -yres 640 -vxres 480 -vyres 640 "); + } + else if (displayCommand[index].command == FsOptions_FBSET_TV_DVI){ +- system("echo 0 > /sys/devices/platform/omapdss/overlay0/enabled"); +- system("echo 0 > /sys/devices/platform/omapdss/display0/enabled"); +- system("echo 0 > /sys/devices/platform/omapdss/display1/enabled"); +- system("echo 0 > /sys/devices/platform/omapdss/display2/enabled"); +- system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); +- system("echo \"\" > /sys/devices/platform/omapdss/overlay0/manager"); +- system("echo \"\" > /sys/devices/platform/omapdss/overlay1/manager"); +- system("echo \"\" > /sys/devices/platform/omapdss/overlay2/manager"); +- system("fbset -fb /dev/fb0 -xres 720 -yres 480 -vxres 720 -vyres 480"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/overlay0/enabled"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/display0/enabled"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/display1/enabled"); ++ _sys = system("echo 0 > /sys/devices/platform/omapdss/display2/enabled"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/manager0/display"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/overlay0/manager"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/overlay1/manager"); ++ _sys = system("echo \"\" > /sys/devices/platform/omapdss/overlay2/manager"); ++ _sys = system("fbset -fb /dev/fb0 -xres 720 -yres 480 -vxres 720 -vyres 480"); + } + /* Write command in sysfs file */ + else if ( _Dmai_writeSysFs(fileName, displayCommand[index].value) < 0) { +@@ -448,6 +449,7 @@ Int _Display_sysfsChange(Display_Output + { + #ifdef Dmai_Device_omap3530 + FsOptionsSequence *sequence = NULL; ++ int _sys = 0; + Display_Output currentDisplayOutput; + + /* List of Sequences using the FileSystem entries to switch displays */ +@@ -581,7 +583,7 @@ Int _Display_sysfsChange(Display_Output + *rotation = 0; + } + if (currentDisplayOutput == Display_Output_SVIDEO){ +- system("fbset -fb /dev/fb0 -depth 16"); ++ _sys = system("fbset -fb /dev/fb0 -depth 16"); + } + *displayOutput = currentDisplayOutput; + } +diff -rupN a/dmai/packages/ti/sdo/dmai/linux/Display_fbdev.c b/dmai/packages/ti/sdo/dmai/linux/Display_fbdev.c +--- a/dmai/packages/ti/sdo/dmai/linux/Display_fbdev.c 2010-08-23 06:26:17.000000000 -0700 ++++ b/dmai/packages/ti/sdo/dmai/linux/Display_fbdev.c 2010-08-23 13:27:28.000000000 -0700 +@@ -134,7 +134,7 @@ Display_Handle Display_fbdev_create(BufT + Int displaySize; + Int bufIdx; + Int8 *virtPtr; +- Int32 physPtr; ++ Int32 physPtr = 0; + Int height, width; + Display_Handle hDisplay; + Buffer_Handle hBuf; diff --git a/package/ti/ti-dmai/ti-dmai.mk b/package/ti/ti-dmai/ti-dmai.mk new file mode 100644 index 0000000..409ca2b --- /dev/null +++ b/package/ti/ti-dmai/ti-dmai.mk @@ -0,0 +1,108 @@ +################################################################################ +# +# ti-dmai +# +################################################################################ +TI_DMAI_VERSION:=2.05.00.14 +TI_DMAI_FILE_VERSION:=2_05_00_14 +TI_DMAI_SOURCE:=ti-dmai-$(TI_DMAI_VERSION).tar.gz +TI_DMAI_SOURCE_DIR:=davinci_multimedia_application_interface +TI_DMAI_SITE:=https://gforge.ti.com/svn/dmai/tags +TI_DMAI_SITE_TAG:=TAG_$(TI_DMAI_FILE_VERSION) + +TI_DMAI_DEPENDENCIES=alsa-lib ti-framework-components ti-codec-engine ti-xdctools + +TI_DMAI_DIR:=$(BUILD_DIR)/ti-dmai-$(TI_DMAI_VERSION) + +TI_DMAI_INSTALL_STAGING = YES + +TI_DMAI_INSTALL_TARGET_DIR:=$(STAGING_DIR)/usr/lib/ti-dmai +TI_DMAI_INSTALL_STAGING_DIR:=$(STAGING_DIR)/ti/dmai-$(TI_DMAI_VERSION) + +TI_DMAI_PLATFORM=UNDEFINED +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omap3),y) + TI_DMAI_PLATFORM=o3530_al + TI_DMAI_DEPENDENCIES+=ti-codecs-omap3 + TI_DMAI_CODEC_INSTALL_DIR=$(TI_CODECS_OMAP3_INSTALL_STAGING_DIR) +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm6446),y) + TI_DMAI_PLATFORM=dm6446_al +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm6467),y) + TI_DMAI_PLATFORM=dm6467_al +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm355),y) + TI_DMAI_PLATFORM=dm355_al +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm365),y) + TI_DMAI_PLATFORM=dm365_al + TI_DMAI_DEPENDENCIES+=ti-dvsdk-dm365 +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omapl137),y) + TI_DMAI_PLATFORM=omapl137_al +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omapl138),y) + TI_DMAI_PLATFORM=omapl138_al +endif + + +TI_DMAI_MAKE_ENV = \ + PARALLEL_MAKE="" \ + USER_XDC_PATH=$(TI_CODEC_ENGINE_INSTALL_STAGING_DIR)/examples \ + XDC_INSTALL_DIR=$(TI_XDCTOOLS_INSTALL_DIR) \ + CE_INSTALL_DIR=$(TI_CODEC_ENGINE_INSTALL_STAGING_DIR) \ + CODEC_INSTALL_DIR=$(TI_DMAI_CODEC_INSTALL_DIR) \ + FC_INSTALL_DIR=$(TI_FRAMEWORK_COMPONENTS_INSTALL_DIR) \ + LINUXKERNEL_INSTALL_DIR=$(BUILD_DIR)/linux-$(LINUX26_VERSION) \ + CODEGEN_INSTALL_DIR=$(TI_CGT6X_INSTALL_DIR) \ + BIOS_INSTALL_DIR=$(TI_DSPBIOS_INSTALL_DIR) \ + LINUXLIBS_INSTALL_DIR=$(STAGING_DIR)/usr \ + CROSS_COMPILE=$(TARGET_CROSS) \ + VERBOSE="true" \ + XDAIS_INSTALL_DIR=$(TI_XDAIS_INSTALL_DIR) \ + LINK_INSTALL_DIR=$(TI_DSPLINK_INSTALL_STAGING_DIR) \ + CMEM_INSTALL_DIR=$(TI_LINUXUTILS_INSTALL_STAGING_DIR) \ + LPM_INSTALL_DIR=$(TI_LOCAL_POWER_MANAGER_INSTALL_STAGING_DIR) \ + MVTOOL_PREFIX=$(TARGET_CROSS) \ + PLATFORM=$(TI_DMAI_PLATFORM) \ + LD_FLAGS="$(TARGET_LDFLAGS)" \ + C_FLAGS="$(TARGET_CFLAGS) -fPIC" + +$(DL_DIR)/$(TI_DMAI_SOURCE): + (cd $(DL_DIR);\ + svn --non-interactive --username anonymous --password "" checkout $(TI_DMAI_SITE)/$(TI_DMAI_SITE_TAG) \ + ) + find $(DL_DIR)/$(TI_DMAI_SITE_TAG) -type d -name ".svn" | xargs rm -rf + (cd $(DL_DIR)/$(TI_DMAI_SITE_TAG);\ + sleep 10; \ + tar -czf $(DL_DIR)/$(TI_DMAI_SOURCE) $(TI_DMAI_SOURCE_DIR)\ + ) + rm -rf $(DL_DIR)/$(TI_DMAI_SITE_TAG) + +define TI_DMAI_CONFIGURE_CMDS + $(MAKE) -C $(TI_DMAI_DIR) $(TI_DMAI_MAKE_ENV) clean +endef + +define TI_DMAI_BUILD_CMDS + $(MAKE) -C $(TI_DMAI_DIR)/dmai $(TI_DMAI_MAKE_ENV) all +endef + +define TI_DMAI_INSTALL_STAGING_CMDS + mkdir -p $(TI_DMAI_INSTALL_STAGING_DIR) + cp -r $(TI_DMAI_DIR)/* $(TI_DMAI_INSTALL_STAGING_DIR) + chmod -R +w $(TI_DMAI_INSTALL_STAGING_DIR) +endef + +define TI_DMAI_INSTALL_TARGET_CMDS + $(INSTALL) -d $(TI_DMAI_INSTALL_TARGET_DIR)/apps + $(MAKE) -C $(TI_DMAI_DIR)/dmai $(TI_DMAI_MAKE_ENV) EXEC_DIR=$(TI_DMAI_INSTALL_TARGET_DIR) install +endef + +define TI_DMAI_UNINSTALL_STAGING_CMDS + rm -rf $(TI_DMAI_INSTALL_DIR) +endef + +ti-dmai-source: $(DL_DIR)/$(TI_DMAI_SOURCE) + + +$(eval $(call GENTARGETS,package/ti,ti-dmai)) \ No newline@end of file -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 07/17] TI's DSP/BIOS v5 Kernel 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (5 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 06/17] TI's Davinci Multimedia Application Interface (DMAI) for TI ARM/DSP processors Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 08/17] Corrected the position of the ti-dspbios package in the menu Pierre-Luc Simard ` (10 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-dspbios/Config.in | 6 ++++ package/ti/ti-dspbios/ti-dspbios.mk | 46 +++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-dspbios/Config.in create mode 100644 package/ti/ti-dspbios/ti-dspbios.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index e8b6197..834d467 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -39,6 +39,7 @@ endchoice comment "Target components" source "package/ti/ti-codecs-omap3/Config.in" +source "package/ti/ti-dspbios/Config.in" comment "Staging tools" source "package/ti/ti-biosutils/Config.in" diff --git a/package/ti/ti-dspbios/Config.in b/package/ti/ti-dspbios/Config.in new file mode 100644 index 0000000..38ebf23 --- /dev/null +++ b/package/ti/ti-dspbios/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TI_DSPBIOS + bool "DSP/BIOS v5 Kernel" + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + help + TI DSP/BIOS v5 Kernel + http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/dspbios \ No newline at end of file diff --git a/package/ti/ti-dspbios/ti-dspbios.mk b/package/ti/ti-dspbios/ti-dspbios.mk new file mode 100644 index 0000000..7461f10 --- /dev/null +++ b/package/ti/ti-dspbios/ti-dspbios.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# ti-dspbios +# +################################################################################ +TI_DSPBIOS_VERSION:=5.41.04.18 +TI_DSPBIOS_FILE_VERSION:=5_41_04_18 + +TI_DSPBIOS_SOURCE:=ti-bios-$(TI_DSPBIOS_VERSION).tar.gz +TI_DSPBIOS_SOURCE_BIN:=bios_setuplinux_$(TI_DSPBIOS_FILE_VERSION).bin +TI_DSPBIOS_SOURCE_BIN_FOLDER:=bios_$(TI_DSPBIOS_FILE_VERSION) +TI_DSPBIOS_SITE:=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/dspbios/$(TI_DSPBIOS_FILE_VERSION)/exports + +TI_DSPBIOS_DIR:=$(BUILD_DIR)/ti-dspbios-$(TI_DSPBIOS_VERSION) + +TI_DSPBIOS_INSTALL_TARGET = NO +TI_DSPBIOS_INSTALL_STAGING = YES + +TI_DSPBIOS_INSTALL_DIR:=$(STAGING_DIR)/ti/dspbios-$(TI_DSPBIOS_VERSION) + + +$(DL_DIR)/$(TI_DSPBIOS_SOURCE): + $(call DOWNLOAD,$(TI_DSPBIOS_SITE),$(TI_DSPBIOS_SOURCE_BIN)) + chmod +x $(DL_DIR)/$(TI_DSPBIOS_SOURCE_BIN) + $(DL_DIR)/$(TI_DSPBIOS_SOURCE_BIN) --S --prefix $(DL_DIR) + find $(DL_DIR)/$(TI_DSPBIOS_SOURCE_BIN_FOLDER) -type f -not -readable -exec sudo chmod gou+r {} \; + find $(DL_DIR)/$(TI_DSPBIOS_SOURCE_BIN_FOLDER) -type d -not -executable -exec sudo chmod gou+rx {} \; + (cd $(DL_DIR); \ + tar -czf $(TI_DSPBIOS_SOURCE) $(TI_DSPBIOS_SOURCE_BIN_FOLDER)\ + ) + rm -rf $(DL_DIR)/$(TI_DSPBIOS_SOURCE_BIN_FOLDER) + +define TI_DSPBIOS_INSTALL_STAGING_CMDS + mkdir -p $(TI_DSPBIOS_INSTALL_DIR) + cp -r $(TI_DSPBIOS_DIR)/* $(TI_DSPBIOS_INSTALL_DIR) + chmod -R +w $(TI_DSPBIOS_INSTALL_DIR) +endef + +define TI_DSPBIOS_UNINSTALL_STAGING_CMDS + rm -rf $(TI_DSPBIOS_INSTALL_DIR) +endef + + +ti-dspbios-source: $(DL_DIR)/$(TI_DSPBIOS_SOURCE) + +$(eval $(call GENTARGETS,package/ti,ti-dspbios)) \ No newline at end of file -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 08/17] Corrected the position of the ti-dspbios package in the menu 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (6 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 07/17] TI's DSP/BIOS v5 Kernel Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 09/17] DSPLink Inter-Processor Communications (IPC) for TI's processors Pierre-Luc Simard ` (9 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/package/ti/Config.in b/package/ti/Config.in index 834d467..f127c92 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -39,12 +39,12 @@ endchoice comment "Target components" source "package/ti/ti-codecs-omap3/Config.in" -source "package/ti/ti-dspbios/Config.in" comment "Staging tools" source "package/ti/ti-biosutils/Config.in" source "package/ti/ti-cgt6x/Config.in" source "package/ti/ti-codec-engine/Config.in" source "package/ti/ti-dmai/Config.in" +source "package/ti/ti-dspbios/Config.in" endif -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 09/17] DSPLink Inter-Processor Communications (IPC) for TI's processors 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (7 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 08/17] Corrected the position of the ti-dspbios package in the menu Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 10/17] TI's DVSDK for DM365 processors Pierre-Luc Simard ` (8 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-dsplink/Config.in | 12 ++ .../ti/ti-dsplink/ti-dsplink-1.65.00.03-fpic.patch | 12 ++ package/ti/ti-dsplink/ti-dsplink.mk | 137 ++++++++++++++++++++ 4 files changed, 162 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-dsplink/Config.in create mode 100644 package/ti/ti-dsplink/ti-dsplink-1.65.00.03-fpic.patch create mode 100644 package/ti/ti-dsplink/ti-dsplink.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index f127c92..9827b44 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -39,6 +39,7 @@ endchoice comment "Target components" source "package/ti/ti-codecs-omap3/Config.in" +source "package/ti/ti-dsplink/Config.in" comment "Staging tools" source "package/ti/ti-biosutils/Config.in" diff --git a/package/ti/ti-dsplink/Config.in b/package/ti/ti-dsplink/Config.in new file mode 100644 index 0000000..8c4d353 --- /dev/null +++ b/package/ti/ti-dsplink/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_TI_DSPLINK + bool "DSPLink Inter-Processor Communications (IPC)" + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + # Could also be used for: BR2_PACKAGE_TI_PLATFORM_dm6467 || BR2_PACKAGE_TI_PLATFORM_omapl137 || BR2_PACKAGE_TI_PLATFORM_omapl138 || + select BR2_PACKAGE_TI_DSPBIOS + select BR2_PACKAGE_TI_XDCTOOLS + help + DSPLINK Inter-Processor Communications (IPC) for TI ARM/DSP processors + http://software-dl.ti.com/dsps/dsps_public_sw/DSPLink/index.html + + You will need to add a startup script to load the kernel module manually. + \ No newline at end of file diff --git a/package/ti/ti-dsplink/ti-dsplink-1.65.00.03-fpic.patch b/package/ti/ti-dsplink/ti-dsplink-1.65.00.03-fpic.patch new file mode 100644 index 0000000..a3e7ca5 --- /dev/null +++ b/package/ti/ti-dsplink/ti-dsplink-1.65.00.03-fpic.patch @@ -0,0 +1,12 @@ +diff -rup a/dsplink/make/Linux/omap3530_2.6.mk b/dsplink/make/Linux/omap3530_2.6.mk +--- a/dsplink/make/Linux/omap3530_2.6.mk 2010-07-16 02:03:04.000000000 -0700 ++++ b/dsplink/make/Linux/omap3530_2.6.mk 2010-08-23 11:18:35.000000000 -0700 +@@ -129,7 +129,7 @@ CC_SW_DEB := -g + # ---------------------------------------------------------------------------- + # Standard flags for the compiler + # ---------------------------------------------------------------------------- +-STD_USER_FLAGS := -Wall -c ++STD_USER_FLAGS := -Wall -fPIC -c + + # ---------------------------------------------------------------------------- + # Standard flags for the compiler when building an executable diff --git a/package/ti/ti-dsplink/ti-dsplink.mk b/package/ti/ti-dsplink/ti-dsplink.mk new file mode 100644 index 0000000..4323c4f --- /dev/null +++ b/package/ti/ti-dsplink/ti-dsplink.mk @@ -0,0 +1,137 @@ +################################################################################ +# +# ti-dsplink +# +################################################################################ +TI_DSPLINK_VERSION:=1.65.00.03 +TI_DSPLINK_FILE_VERSION_MAJOR:=1_65 +TI_DSPLINK_FILE_VERSION:=$(TI_DSPLINK_FILE_VERSION_MAJOR)_00_03 +TI_DSPLINK_SOURCE = dsplink_linux_$(TI_DSPLINK_FILE_VERSION).tar.gz +TI_DSPLINK_SITE = http://software-dl.ti.com/dsps/dsps_public_sw/DSPLink/$(TI_DSPLINK_FILE_VERSION_MAJOR)/$(TI_DSPLINK_FILE_VERSION)/$(TI_DSPLINK_VERSION) +TI_DSPLINK_DIR:=$(BUILD_DIR)/ti-dsplink-$(TI_DSPLINK_VERSION) +TI_DSPLINK_PATH:=$(TI_DSPLINK_DIR)/dsplink + +TI_DSPLINK_INSTALL_STAGING = YES + +TI_DSPLINK_DEPENDENCIES = ti-xdctools ti-dspbios linux26 + +TI_DSPLINK_INSTALL_STAGING_DIR=$(STAGING_DIR)/ti/dsplink-$(TI_DSPLINK_VERSION)/packages + +TI_DSPLINK_DSPNUM=1 +TI_DSPLINK_DSP_COMP=ponslrmc +TI_DSPLINK_DSPPOS=DSPBIOS5XX +TI_DSPLINK_PLATFORM=UNDEFINED +TI_DSPLINK_DSPCFG=UNDEFINED +TI_DSPLINK_DSP=UNDEFINED +TI_DSPLINK_GPPOS=UNDEFINED +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omap3),y) + TI_DSPLINK_PLATFORM=OMAP3530 + TI_DSPLINK_DSPCFG=OMAP3530SHMEM + TI_DSPLINK_DSP=OMAP3530_0 + TI_DSPLINK_GPPOS=OMAPLSP +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm6446),y) + TI_DSPLINK_PLATFORM=DAVINCI + TI_DSPLINK_DSPCFG=DM6446GEMSHMEM + TI_DSPLINK_DSP=DM6446GEM_0 + TI_DSPLINK_GPPOS=DM6446LSP +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm6467),y) + TI_DSPLINK_PLATFORM=DAVINCIHD + TI_DSPLINK_DSPCFG=DM6467GEMSHMEM + TI_DSPLINK_DSP=DM6467GEM_0 + TI_DSPLINK_GPPOS=DM6467LSP +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omapl137),y) + TI_DSPLINK_PLATFORM=OMAPL1XX + TI_DSPLINK_DSPCFG=OMAPL1XXGEMSHMEM + TI_DSPLINK_DSP=OMAPL1XXGEM_0 + TI_DSPLINK_GPPOS=ARM +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omapl138),y) + TI_DSPLINK_PLATFORM=OMAPL138 + TI_DSPLINK_DSPCFG=OMAPL138GEMSHMEM + TI_DSPLINK_DSP=OMAPL138GEM_0 + TI_DSPLINK_GPPOS=ARM +endif + + +define TI_DSPLINK_CONFIGURE_CMDS + (export DSPLINK=$(TI_DSPLINK_PATH); \ + export C_FLAGS="$(TARGET_CFLAGS) -fPIC"; \ + export LD_FLAGS ="$(TARGET_LDFLAGS)"; \ + /usr/bin/perl $(TI_DSPLINK_PATH)/config/bin/dsplinkcfg.pl \ + --platform=$(TI_DSPLINK_PLATFORM) \ + --nodsp=$(TI_DSPLINK_DSPNUM) \ + --dspcfg_0=$(TI_DSPLINK_DSPCFG) \ + --dspos_0=$(TI_DSPLINK_DSPPOS) \ + --comps=$(TI_DSPLINK_DSP_COMP) \ + --gppos=$(TI_DSPLINK_GPPOS) \ + ) + (cd $(TI_DSPLINK_PATH); XDCPATH=$(TI_XDCTOOLS_INSTALL_DIR) $(TI_XDCTOOLS_INSTALL_DIR)/xdc .make -PR .) + (cd $(TI_DSPLINK_PATH); XDCPATH=$(TI_XDCTOOLS_INSTALL_DIR) $(TI_XDCTOOLS_INSTALL_DIR)/xdc clean -PR .) + (cd $(TI_DSPLINK_PATH); XDCPATH=$(TI_XDCTOOLS_INSTALL_DIR) $(TI_XDCTOOLS_INSTALL_DIR)/xdc .interfaces -PR .) +endef + +define TI_DSPLINK_BUILD_CMDS + $(MAKE) -C $(TI_DSPLINK_PATH)/gpp/src/api \ + DSPLINK=$(TI_DSPLINK_PATH) \ + CROSS_COMPILE="$(TOOLCHAIN_EXTERNAL_PREFIX)" \ + AR="$(TARGET_CROSS)ar" \ + LD="$(TARGET_LD)" \ + COMPILER="$(TARGET_CC)" \ + ARCHIVER="$(TARGET_CROSS)ar" \ + KERNEL_DIR="$(BUILD_DIR)/linux-$(LINUX26_VERSION)" \ + all + # Build the gpp kernel space (debug and release) + $(MAKE) -C $(TI_DSPLINK_PATH)/gpp/src \ + DSPLINK=$(TI_DSPLINK_PATH) \ + OBJDUMP="$(TARGET_CROSS)objdump" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CC="$(TARGET_CC)" \ + AR="$(TARGET_CROSS)ar" \ + LD="$(TARGET_LD)" \ + COMPILER="$(TARGET_CC)" \ + ARCHIVER="$(TARGET_CROSS)ar" \ + KERNEL_DIR="$(BUILD_DIR)/linux-$(LINUX26_VERSION)" \ + BASE_BUILDOS="$(BUILD_DIR)/linux-$(LINUX26_VERSION)" \ + all + # Build the dsp library (debug and release) + $(MAKE) -C $(TI_DSPLINK_PATH)/dsp/src \ + DSPLINK=$(TI_DSPLINK_PATH) \ + BASE_CGTOOLS="$(TI_CGT6X_INSTALL_DIR)" \ + BASE_SABIOS="$(TI_DSPBIOS_INSTALL_DIR)" \ + all +endef + +define TI_DSPLINK_INSTALL_STAGING_CMDS + # Install/Stage the Source Tree + $(INSTALL) -d $(TI_DSPLINK_INSTALL_STAGING_DIR) + cp -pPrf $(TI_DSPLINK_DIR)/* $(TI_DSPLINK_INSTALL_STAGING_DIR) + chmod -R +w $(TI_DSPLINK_INSTALL_STAGING_DIR) + + # Changes path of include txt file to use LINK_INSTALL_DIR variable for GPP + i_find=`find $(TI_DSPLINK_INSTALL_STAGING_DIR)/dsplink/gpp/export/BIN/Linux/$(TI_DSPLINK_PLATFORM)/*/ -name "*.txt"` ; \ + for i in $$i_find; do \ + sed -i $$i -e s=$(TI_DSPLINK_PATH)=$(TI_DSPLINK_INSTALL_STAGING_DIR)=g ; \ + done; + + #Changes path of include txt file to use LINK_INSTALL_DIR variable for DSP + i_find=`find $(TI_DSPLINK_INSTALL_STAGING_DIR)/dsplink/dsp/export/BIN/DspBios/$(TI_DSPLINK_PLATFORM)/$(TI_DSPLINK_DSP)/*/ -name "*.txt"` ; \ + for i in $$i_find; do \ + sed -i $$i -e s=$(TI_DSPLINK_PATH)=$(TI_DSPLINK_INSTALL_STAGING_DIR)=g ; \ + done ; +endef + +define TI_DSPLINK_INSTALL_TARGET_CMDS + $(INSTALL) -d $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp + $(INSTALL) -m 0644 $(TI_DSPLINK_PATH)/gpp/export/BIN/Linux/$(TI_DSPLINK_PLATFORM)/RELEASE/dsplinkk.ko $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp/dsplinkk.ko +endef + +define TI_DSPLINK_UNINSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp/dsplinkk.ko +endef + + +$(eval $(call GENTARGETS,package/ti,ti-dsplink)) + -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 10/17] TI's DVSDK for DM365 processors 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (8 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 09/17] DSPLink Inter-Processor Communications (IPC) for TI's processors Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 11/17] TI EDMA3 Low Level Driver (LLD) Pierre-Luc Simard ` (7 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-dvsdk-dm365/Config.in | 6 + .../ti/ti-dvsdk-dm365/ti-dvsdk-dm365-extract.py | 52 ++++++++++ package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365.mk | 105 ++++++++++++++++++++ 4 files changed, 164 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-dvsdk-dm365/Config.in create mode 100644 package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365-extract.py create mode 100644 package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index 9827b44..d64500e 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -47,5 +47,6 @@ source "package/ti/ti-cgt6x/Config.in" source "package/ti/ti-codec-engine/Config.in" source "package/ti/ti-dmai/Config.in" source "package/ti/ti-dspbios/Config.in" +source "package/ti/ti-dvsdk-dm365/Config.in" endif diff --git a/package/ti/ti-dvsdk-dm365/Config.in b/package/ti/ti-dvsdk-dm365/Config.in new file mode 100644 index 0000000..05a798b --- /dev/null +++ b/package/ti/ti-dvsdk-dm365/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TI_DVSDK_DM365 + bool "DVSDK for TI's DM365 processor" + depends on BR2_PACKAGE_TI_PLATFORM_dm365 || BR2_PACKAGE_TI_PLATFORM_dm368 + select BR2_PACKAGE_ALSA_LIB + help + TI's DVSDK \ No newline at end of file diff --git a/package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365-extract.py b/package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365-extract.py new file mode 100644 index 0000000..8bc1205 --- /dev/null +++ b/package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365-extract.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +import sys +from subprocess import Popen, PIPE + + +if len(sys.argv) < 4: + print "usage: ", + print sys.argv[0], + print " <installer> <codesourcery> <destination>" + print " " + print " installer : the DVSDK installer location " + print " (eg: ~/Downloads/dvsdk_..._setuplinux.bin)" + print " codesourcery: location of the CodeSourcery installation" + print " (eg: ~/CodeSourcery/Sourcery_G++_Lite/bin)" + print " destination : where to install the files" + print " (eg: ~/dvsdk)" + sys.exit(2) +else: + installer=sys.argv[1] + codesourcery=sys.argv[2] + destination=sys.argv[3] + print "Installer: ", + print installer + print "CodeSourcery: ", + print codesourcery + print "Destination: ", + print destination + +pb = Popen(installer, shell=False, stdout=PIPE, stdin=PIPE, stderr=PIPE) +question = 0 +data = pb.stdout.read(1) +while data: + sys.stdout.write(data) + if data == ']': + if question == 0: + pb.stdin.write("Y\n") + question = 1 + elif question == 1: + pb.stdin.write(codesourcery) + pb.stdin.write("\n") + sys.stdout.write(codesourcery) + sys.stdout.write("\n") + question = 2 + elif question == 2: + pb.stdin.write(destination) + pb.stdin.write("\n") + sys.stdout.write(destination) + sys.stdout.write("\n") + question = 3 + data = pb.stdout.read(1) + +sys.exit(pb.wait()) \ No newline at end of file diff --git a/package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365.mk b/package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365.mk new file mode 100644 index 0000000..a2fe9d7 --- /dev/null +++ b/package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365.mk @@ -0,0 +1,105 @@ +################################################################################ +# +# ti-dvsdk-dm365 +# +################################################################################ +TI_DVSDK_DM365_VERSION:=4.00.00.17 +TI_DVSDK_DM365_FILE_VERSION_MAJOR:=4_00 +TI_DVSDK_DM365_FILE_VERSION:=$(TI_DVSDK_DM365_FILE_VERSION_MAJOR)_00_17 + +TI_DVSDK_DM365_SOURCE:=ti-dvsdk-dm365-$(TI_DVSDK_DM365_VERSION).tar.gz +TI_DVSDK_DM365_SOURCE_BIN:=dvsdk_dm365-evm_$(TI_DVSDK_DM365_FILE_VERSION)_setuplinux.bin +TI_DVSDK_DM365_SOURCE_BIN_FOLDER:=dvsdk_dm365-evm_$(TI_DVSDK_DM365_FILE_VERSION) +TI_DVSDK_DM365_SITE:=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_$(TI_DVSDK_DM365_FILE_VERSION_MAJOR)/latest/exports +TI_DVSDK_DM365_DIR:=$(BUILD_DIR)/ti-dvsdk-dm365-$(TI_DVSDK_DM365_VERSION) + +TI_DVSDK_DM365_INSTALL_STAGING = NO +TI_DVSDK_DM365_DEPENDENCIES = linux26 alsa-lib + +# The DVSDK installer from TI will REFUSE to install itself if it does not find +# the right version of the CodeSourcery compiler. This package will download +# then extract the CodeSourcery compiler to a temp directory and keep it there +# just long enough to run the DVSDK installer. +# It's not the best solution but, for the moment, it's the only one that works. +TI_DVSDK_DM365_CS_VERSION_MAJOR=2009q1 +TI_DVSDK_DM365_CS_VERSION=$(TI_DVSDK_DM365_CS_VERSION_MAJOR)-203 +TI_DVSDK_DM365_CS_FILE=arm-$(TI_DVSDK_DM365_CS_VERSION)-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +TI_DVSDK_DM365_CS_SITE=http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi +TI_DVSDK_DM365_CS_DIR=arm-$(TI_DVSDK_DM365_CS_VERSION_MAJOR) + +# Extracting the DVSDK unattended, requires a python script. +TI_DVSDK_DM365_EXTRACT=$(TOPDIR)/package/ti/ti-dvsdk-dm365/ti-dvsdk-dm365-extract.py + +# Some directory settings will be required by other tools. +TI_DVSDK_DM365_CE_INSTALL_DIR:=$(TI_DVSDK_DM365_DIR)/`grep -m 1 CE_INSTALL_DIR $(TI_DVSDK_DM365_DIR)/Rules.make | cut -f2 -d'/'` +TI_DVSDK_DM365_CODEC_INSTALL_DIR:=$(TI_DVSDK_DM365_DIR)/`grep -m 1 CODEC_INSTALL_DIR $(TI_DVSDK_DM365_DIR)/Rules.make | cut -f2 -d'/'` +TI_DVSDK_DM365_DMAI_INSTALL_DIR:=$(TI_DVSDK_DM365_DIR)/`grep -m 1 DMAI_INSTALL_DIR $(TI_DVSDK_DM365_DIR)/Rules.make | cut -f2 -d'/'` +TI_DVSDK_DM365_DVTB_INSTALL_DIR:=$(TI_DVSDK_DM365_DIR)/`grep -m 1 DVTB_INSTALL_DIR $(TI_DVSDK_DM365_DIR)/Rules.make | cut -f2 -d'/'` +TI_DVSDK_DM365_FC_INSTALL_DIR:=$(TI_DVSDK_DM365_DIR)/`grep -m 1 FC_INSTALL_DIR $(TI_DVSDK_DM365_DIR)/Rules.make | cut -f2 -d'/'` +TI_DVSDK_DM365_DM365MM_MODULE_INSTALL_DIR:=$(TI_DVSDK_DM365_DIR)/`grep -m 1 DM365MM_MODULE_INSTALL_DIR $(TI_DVSDK_DM365_DIR)/Rules.make | cut -f2 -d'/'` +TI_DVSDK_DM365_XDAIS_INSTALL_DIR:=$(TI_DVSDK_DM365_DIR)/`grep -m 1 XDAIS_INSTALL_DIR $(TI_DVSDK_DM365_DIR)/Rules.make | cut -f2 -d'/'` +TI_DVSDK_DM365_XDC_INSTALL_DIR:=$(TI_DVSDK_DM365_DIR)/`grep -m 1 XDC_INSTALL_DIR $(TI_DVSDK_DM365_DIR)/Rules.make | cut -f2 -d'/'` +TI_DVSDK_DM365_LINUXUTILS_INSTALL_DIR:=$(TI_DVSDK_DM365_DIR)/`grep -m 1 LINUXUTILS_INSTALL_DIR $(TI_DVSDK_DM365_DIR)/Rules.make | cut -f2 -d'/'` + +# Select what will be built in the DVSDK (not using build all) +TI_DVSDK_DM365_TARGETS=cmem irq edma dm365mm dmai + +# Where to install the kernel modules +$(DL_DIR)/$(TI_DVSDK_DM365_CS_FILE): + $(call DOWNLOAD,$(TI_DVSDK_DM365_CS_SITE),$(TI_DVSDK_DM365_CS_FILE)) + +# NOTE: +# Archive contains hardlinks and it may fails on some filesystem. Ignoring +# return values will adding the missing symlink will resolve the issue. +# Anyway, CodeSourcery is not used in this package. +$(DL_DIR)/$(TI_DVSDK_DM365_SOURCE): $(DL_DIR)/$(TI_DVSDK_DM365_CS_FILE) + $(call DOWNLOAD,$(TI_DVSDK_DM365_SITE),$(TI_DVSDK_DM365_SOURCE_BIN)) + - (cd $(DL_DIR);tar -xf $(DL_DIR)/$(TI_DVSDK_DM365_CS_FILE)) + ( if [ ! -e $(DL_DIR)/$(TI_DVSDK_DM365_CS_DIR)/bin/arm-none-linux-gnueabi-gcc ]; then\ + ln -s $(DL_DIR)/$(TI_DVSDK_DM365_CS_DIR)/bin/arm-none-linux-gnueabi-gcc-4.3.3 $(DL_DIR)/$(TI_DVSDK_DM365_CS_DIR)/bin/arm-none-linux-gnueabi-gcc;\ + fi\ + ) + chmod +x $(DL_DIR)/$(TI_DVSDK_DM365_SOURCE_BIN) + python $(TI_DVSDK_DM365_EXTRACT) \ + $(DL_DIR)/$(TI_DVSDK_DM365_SOURCE_BIN) \ + $(DL_DIR)/$(TI_DVSDK_DM365_CS_DIR)/bin \ + $(DL_DIR)/$(TI_DVSDK_DM365_SOURCE_BIN_FOLDER) + find $(DL_DIR)/$(TI_DVSDK_DM365_SOURCE_BIN_FOLDER) -type f -not -readable -exec sudo chmod gou+r {} \; + find $(DL_DIR)/$(TI_DVSDK_DM365_SOURCE_BIN_FOLDER) -type d -not -executable -exec sudo chmod gou+rx {} \; + (cd $(DL_DIR); \ + tar -czf $(TI_DVSDK_DM365_SOURCE) $(TI_DVSDK_DM365_SOURCE_BIN_FOLDER)\ + ) + rm -rf $(DL_DIR)/$(TI_DVSDK_DM365_SOURCE_BIN_FOLDER) + rm -rf $(DL_DIR)/$(TI_DVSDK_DM365_CS_DIR) + + +define TI_DVSDK_DM365_CONFIGURE_CMDS + $(SED) s:DVSDK_INSTALL_DIR=.*:DVSDK_INSTALL_DIR=$(@D):g $(@D)/Rules.make + $(SED) s:LINUXKERNEL_INSTALL_DIR=.*:LINUXKERNEL_INSTALL_DIR=$(BUILD_DIR)/linux-$(LINUX26_VERSION):g $(@D)/Rules.make + $(SED) s:CSTOOL_DIR=.*:CSTOOL_DIR=$(dir $(TARGET_CROSS))/..:g $(@D)/Rules.make + $(SED) s:CSTOOL_PREFIX=.*:CSTOOL_PREFIX=$(TARGET_CROSS):g $(@D)/Rules.make + $(SED) s:EXEC_DIR=.*:EXEC_DIR=$(STAGING_DIR)/usr/bin:g $(@D)/Rules.make + $(SED) s:LINUXLIBS_INSTALL_DIR=.*:LINUXLIBS_INSTALL_DIR=$(TARGET_DIR)/usr:g $(@D)/Rules.make + for i in $(TI_DVSDK_DM365_TARGETS) ; do \ + $(MAKE) -C $(@D) $${i}_clean; \ + done + $(SED) s:^GCC_LD_FLAGS.*:\&\ -L$(TARGET_DIR)/lib:g $(TI_DVSDK_DM365_DMAI_INSTALL_DIR)/packages/ti/sdo/dmai/apps/Makefile.app +endef + +define TI_DVSDK_DM365_BUILD_CMDS + for i in $(TI_DVSDK_DM365_TARGETS) ; do \ + $(MAKE) -C $(@D) $${i}; \ + done +endef + +define TI_DVSDK_DM365_INSTALL_TARGET_CMDS + $(INSTALL) -d $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp + $(INSTALL) $(TI_DVSDK_DM365_LINUXUTILS_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp/cmemk.ko + $(INSTALL) $(TI_DVSDK_DM365_LINUXUTILS_INSTALL_DIR)/packages/ti/sdo/linuxutils/irq/src/module/irqk.ko $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp/irqk.ko + $(INSTALL) $(TI_DVSDK_DM365_LINUXUTILS_INSTALL_DIR)/packages/ti/sdo/linuxutils/edma/src/module/edmak.ko $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp/edmak.ko + $(INSTALL) $(TI_DVSDK_DM365_DM365MM_MODULE_INSTALL_DIR)/module/dm365mmap.ko $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp/dm365mmap.ko +endef + +ti-dvsdk-dm365-source: $(DL_DIR)/$(TI_DVSDK_DM365_SOURCE) + +$(eval $(call GENTARGETS,package/ti,ti-dvsdk-dm365)) -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 11/17] TI EDMA3 Low Level Driver (LLD) 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (9 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 10/17] TI's DVSDK for DM365 processors Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 12/17] TI Framework Components Pierre-Luc Simard ` (6 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-edma3lld/Config.in | 6 ++++ package/ti/ti-edma3lld/ti-edma3lld.mk | 44 +++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-edma3lld/Config.in create mode 100644 package/ti/ti-edma3lld/ti-edma3lld.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index d64500e..1cd1cf3 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -48,5 +48,6 @@ source "package/ti/ti-codec-engine/Config.in" source "package/ti/ti-dmai/Config.in" source "package/ti/ti-dspbios/Config.in" source "package/ti/ti-dvsdk-dm365/Config.in" +source "package/ti/ti-edma3lld/Config.in" endif diff --git a/package/ti/ti-edma3lld/Config.in b/package/ti/ti-edma3lld/Config.in new file mode 100644 index 0000000..23a7974 --- /dev/null +++ b/package/ti/ti-edma3lld/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TI_EDMA3LLD + bool "EDMA3 Low Level Driver (LLD)" + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + help + TI EDMA3 Low Level Driver (LLD)" + http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc diff --git a/package/ti/ti-edma3lld/ti-edma3lld.mk b/package/ti/ti-edma3lld/ti-edma3lld.mk new file mode 100644 index 0000000..13f3ed3 --- /dev/null +++ b/package/ti/ti-edma3lld/ti-edma3lld.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# ti-edma3lld +# +################################################################################ +TI_EDMA3LLD_VERSION:=01.11.00.03 +TI_EDMA3LLD_FILE_VERSION:=01_11_00_03 + +TI_EDMA3LLD_SOURCE:=ti-edma3lld-$(TI_EDMA3LLD_VERSION).tar.gz +TI_EDMA3LLD_SOURCE_BIN:=EDMA3_LLD_setuplinux_$(TI_EDMA3LLD_FILE_VERSION).bin +TI_EDMA3LLD_SOURCE_BIN_FOLDER:=edma3_lld_$(TI_EDMA3LLD_FILE_VERSION) +TI_EDMA3LLD_SITE:=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/edma3_lld/edma3-lld-bios5/$(TI_EDMA3LLD_FILE_VERSION)/exports +TI_EDMA3LLD_DIR:=$(BUILD_DIR)/ti-edma3lld-$(TI_EDMA3LLD_VERSION) + +TI_EDMA3LLD_INSTALL_TARGET = NO +TI_EDMA3LLD_INSTALL_STAGING = YES + +TI_EDMA3LLD_INSTALL_DIR:=$(STAGING_DIR)/ti/edma3lld-$(TI_EDMA3LLD_VERSION) + +$(DL_DIR)/$(TI_EDMA3LLD_SOURCE): + $(call DOWNLOAD,$(TI_EDMA3LLD_SITE),$(TI_EDMA3LLD_SOURCE_BIN)) + chmod +x $(DL_DIR)/$(TI_EDMA3LLD_SOURCE_BIN) + $(DL_DIR)/$(TI_EDMA3LLD_SOURCE_BIN) --mode silent --prefix $(DL_DIR)/$(TI_EDMA3LLD_SOURCE_BIN_FOLDER) + find $(DL_DIR)/$(TI_EDMA3LLD_SOURCE_BIN_FOLDER) -type f -not -readable -exec sudo chmod gou+r {} \; + find $(DL_DIR)/$(TI_EDMA3LLD_SOURCE_BIN_FOLDER) -type d -not -executable -exec sudo chmod gou+rx {} \; + (cd $(DL_DIR); \ + tar -czf $(TI_EDMA3LLD_SOURCE) $(TI_EDMA3LLD_SOURCE_BIN_FOLDER)\ + ) + rm -rf $(DL_DIR)/$(TI_EDMA3LLD_SOURCE_BIN_FOLDER) + +define TI_EDMA3LLD_INSTALL_STAGING_CMDS + mkdir -p $(TI_EDMA3LLD_INSTALL_DIR) + cp -r $(TI_EDMA3LLD_DIR)/* $(TI_EDMA3LLD_INSTALL_DIR) + chmod -R +w $(TI_EDMA3LLD_INSTALL_DIR) +endef + +define TI_EDMA3LLD_UNINSTALL_STAGING_CMDS + rm -rf $(TI_EDMA3LLD_INSTALL_DIR) +endef + +ti-edma3lld-source: $(DL_DIR)/$(TI_EDMA3LLD_SOURCE) + + +$(eval $(call GENTARGETS,package/ti,ti-edma3lld)) \ No newline at end of file -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 12/17] TI Framework Components 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (10 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 11/17] TI EDMA3 Low Level Driver (LLD) Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 13/17] GStreamer Plugin (gstreamer-ti) for TI ARM/DSP processors Pierre-Luc Simard ` (5 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-framework-components/Config.in | 6 +++ .../ti-framework-components.mk | 34 ++++++++++++++++++++ 3 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-framework-components/Config.in create mode 100644 package/ti/ti-framework-components/ti-framework-components.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index 1cd1cf3..d766e20 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -49,5 +49,6 @@ source "package/ti/ti-dmai/Config.in" source "package/ti/ti-dspbios/Config.in" source "package/ti/ti-dvsdk-dm365/Config.in" source "package/ti/ti-edma3lld/Config.in" +source "package/ti/ti-framework-components/Config.in" endif diff --git a/package/ti/ti-framework-components/Config.in b/package/ti/ti-framework-components/Config.in new file mode 100644 index 0000000..9a6df1a --- /dev/null +++ b/package/ti/ti-framework-components/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TI_FRAMEWORK_COMPONENTS + bool "TI Framework Components" + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + help + TI Framework Components + http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/fc diff --git a/package/ti/ti-framework-components/ti-framework-components.mk b/package/ti/ti-framework-components/ti-framework-components.mk new file mode 100644 index 0000000..dbfaa0d --- /dev/null +++ b/package/ti/ti-framework-components/ti-framework-components.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# ti-framework-components +# +################################################################################ +TI_FRAMEWORK_COMPONENTS_VERSION:=2.25.02.06 +TI_FRAMEWORK_COMPONENTS_FILE_VERSION:=2_25_02_06 +TI_FRAMEWORK_COMPONENTS_SOURCE:=framework_components_$(TI_FRAMEWORK_COMPONENTS_FILE_VERSION),lite.tar.gz +TI_FRAMEWORK_COMPONENTS_SITE:=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/fc/$(TI_FRAMEWORK_COMPONENTS_FILE_VERSION)/exports +TI_FRAMEWORK_COMPONENTS_DIR:=$(BUILD_DIR)/ti-framework-components-$(TI_FRAMEWORK_COMPONENTS_VERSION) + +TI_FRAMEWORK_COMPONENTS_INSTALL_TARGET = NO +TI_FRAMEWORK_COMPONENTS_INSTALL_STAGING = YES + +TI_FRAMEWORK_COMPONENTS_INSTALL_DIR:=$(STAGING_DIR)/ti/framework-components-$(TI_FRAMEWORK_COMPONENTS_VERSION) + + +$(DL_DIR)/$(TI_FRAMEWORK_COMPONENTS_SOURCE): + $(call DOWNLOAD,$(TI_FRAMEWORK_COMPONENTS_SITE),$(TI_FRAMEWORK_COMPONENTS_SOURCE)) + +define TI_FRAMEWORK_COMPONENTS_INSTALL_STAGING_CMDS + mkdir -p $(TI_FRAMEWORK_COMPONENTS_INSTALL_DIR) + cp -pPrf $(TI_FRAMEWORK_COMPONENTS_DIR)/* $(TI_FRAMEWORK_COMPONENTS_INSTALL_DIR) + chmod -R +w $(TI_FRAMEWORK_COMPONENTS_INSTALL_DIR) +endef + +define TI_FRAMEWORK_COMPONENTS_UNINSTALL_STAGING_CMDS + rm -rf $(TI_FRAMEWORK_COMPONENTS_INSTALL_DIR) +endef + + +ti-framework-components-source: $(DL_DIR)/$(TI_FRAMEWORK_COMPONENTS_SOURCE) + +$(eval $(call GENTARGETS,package/ti,ti-framework-components)) \ No newline at end of file -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 13/17] GStreamer Plugin (gstreamer-ti) for TI ARM/DSP processors 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (11 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 12/17] TI Framework Components Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 14/17] TI's MFP Linux utils Pierre-Luc Simard ` (4 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-gst-plugin/Config.in | 33 + ...-plugin-1.01.00-angstrom_combined_patches.patch | 2887 ++++++++++++++++++++ package/ti/ti-gst-plugin/ti-gst-plugin.mk | 87 + 4 files changed, 3008 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-gst-plugin/Config.in create mode 100644 package/ti/ti-gst-plugin/ti-gst-plugin-1.01.00-angstrom_combined_patches.patch create mode 100644 package/ti/ti-gst-plugin/ti-gst-plugin.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index d766e20..8e47e57 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -40,6 +40,7 @@ endchoice comment "Target components" source "package/ti/ti-codecs-omap3/Config.in" source "package/ti/ti-dsplink/Config.in" +source "package/ti/ti-gst-plugin/Config.in" comment "Staging tools" source "package/ti/ti-biosutils/Config.in" diff --git a/package/ti/ti-gst-plugin/Config.in b/package/ti/ti-gst-plugin/Config.in new file mode 100644 index 0000000..e92cc29 --- /dev/null +++ b/package/ti/ti-gst-plugin/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_TI_GST_PLUGIN + bool "GStreamer Plugin" + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + select BR2_PACKAGE_TI_DMAI + select BR2_PACKAGE_TI_CODECS_OMAP3 + select BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_BASE + help + GStreamer Plugin (gstreamer-ti) for TI ARM/DSP processors + http://gstreamer.ti.com/ + +config BR2_PACKAGE_TI_GST_PLUGIN + bool "GStreamer Plugin" + depends on BR2_PACKAGE_TI_PLATFORM_dm365 + select BR2_PACKAGE_TI_DVSDK_DM365 + select BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_BASE + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ADDER + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOCONVERT + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORATE + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_FFMPEGCOLORSPACE + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TYPEFIND + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PLAYBACK + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOSCALE + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VOLUME + help + GStreamer Plugin (gstreamer-ti) for TI ARM/DSP processors + http://gstreamer.ti.com/ + + +#TODO: Add other architectures \ No newline at end of file diff --git a/package/ti/ti-gst-plugin/ti-gst-plugin-1.01.00-angstrom_combined_patches.patch b/package/ti/ti-gst-plugin/ti-gst-plugin-1.01.00-angstrom_combined_patches.patch new file mode 100644 index 0000000..ae37e10 --- /dev/null +++ b/package/ti/ti-gst-plugin/ti-gst-plugin-1.01.00-angstrom_combined_patches.patch @@ -0,0 +1,2887 @@ +diff -rupN a/Makefile.external b/Makefile.external +--- a/Makefile.external 2009-07-14 08:17:55.000000000 -0700 ++++ b/Makefile.external 2010-09-16 12:25:09.000000000 -0700 +@@ -3,8 +3,7 @@ + # + # The only customization required below is defining the DVSDK_PATH + # and, if your DVSDK doesn't include DMAI, the set DMAI_INSTALL_DIR variable +-# appropriately. If your DVSDK does include DMAI, then delete the line +-# setting the DMAI_INSTALL_DIR variable below. ++# appropriately. + # + # Copyright (C) 2009 Ridgerun + # +@@ -17,15 +16,16 @@ DMAI_INSTALL_DIR=undefined + ifeq ($(DVSDK_PATH),undefined) + $(error You need to define the environment variable DVSDK_PATH) + endif ++include $(DVSDK_PATH)/Rules.make ++ + ifeq ($(DMAI_INSTALL_DIR),undefined) + $(error You need to define the environment variable DMAI_INSTALL_DIR) + endif + + default: +- @echo "Please specify the target: dm6446, omap3530, dm355, dm6467, dm365" ++ @echo "Please specify the target: dm6446, omap3530, dm355, dm6467, dm6467t, dm365" + +-include $(DVSDK_PATH)/Rules.make +-export PLATFORM=$(MAKECMDGOALS) ++export GST_TI_PLATFORM=$(MAKECMDGOALS) + export BIOS_INSTALL_DIR + export CE_INSTALL_DIR + export CMEM_INSTALL_DIR +@@ -33,6 +33,7 @@ export CODEC_INSTALL_DIR + export DMAI_INSTALL_DIR + export FC_INSTALL_DIR + export LINK_INSTALL_DIR ++export LINK_XDC_ROOT = $(LINK_INSTALL_DIR)/packages + export LINUXKERNEL_INSTALL_DIR + export LPM_INSTALL_DIR + export MVTOOL_DIR +@@ -41,34 +42,49 @@ export XDAIS_INSTALL_DIR + export XDC_INSTALL_DIR + export EDMA3_LLD_INSTALL_DIR + +-ifeq ($(PLATFORM), dm355) +- export XDC_TARGET = gnu.targets.MVArm9 +- export XDC_PLATFORM = ti.platforms.evmDM355 ++ifeq ($(GST_TI_PLATFORM), dm355) ++ export XDC_TARGET = gnu.targets.arm.GCArmv5T ++ export XDC_PLATFORM = ti.platforms.evmDM355 ++ export MVTOOL_PREFIX = $(CSTOOL_PREFIX) ++ export MVTOOL_DIR = $(CSTOOL_DIR) ++ export PLATFORM_XDC = ${XDC_PLATFORM} + endif + +-ifeq ($(PLATFORM), dm6446) ++ifeq ($(GST_TI_PLATFORM), dm6446) + export XDC_TARGET = gnu.targets.MVArm9 + export XDC_PLATFORM = ti.platforms.evmDM6446 + endif + +-ifeq ($(PLATFORM), dm6467) ++ifeq ($(GST_TI_PLATFORM), dm6467) + export XDC_TARGET = gnu.targets.MVArm9 + export XDC_PLATFORM = ti.platforms.evmDM6467 + endif + +-ifeq ($(PLATFORM), dm365) +- export XDC_TARGET = gnu.targets.MVArm9 +- export XDC_PLATFORM = ti.platforms.evmDM365 ++ifeq ($(GST_TI_PLATFORM), dm6467t) ++ export XDC_TARGET = gnu.targets.arm.GCArmv5T ++ export XDC_PLATFORM = ti.platforms.evmDM6467 ++ export LINK_XDC_ROOT = $(LINK_INSTALL_DIR) ++ export MVTOOL_PREFIX = $(CSTOOL_PREFIX) ++ export MVTOOL_DIR = $(CSTOOL_DIR) ++ export PLATFORM_XDC = ${XDC_PLATFORM} + endif + +-ifeq ($(PLATFORM), omap3530) ++ifeq ($(GST_TI_PLATFORM), dm365) ++ export XDC_TARGET = gnu.targets.arm.GCArmv5T ++ export XDC_PLATFORM = ti.platforms.evmDM365 ++ export MVTOOL_PREFIX = $(CSTOOL_PREFIX) ++ export MVTOOL_DIR = $(CSTOOL_DIR) ++ export PLATFORM_XDC = ${XDC_PLATFORM} ++endif ++ ++ifeq ($(GST_TI_PLATFORM), omap3530) + export XDC_TARGET = gnu.targets.arm.GCArmv5T + export XDC_PLATFORM = ti.platforms.evm3530 + export MVTOOL_PREFIX = $(CSTOOL_PREFIX) + export MVTOOL_DIR = $(CSTOOL_DIR) + endif + +-CPPFLAGS=-DPlatform_$(PLATFORM) ++CPPFLAGS=-DPlatform_$(GST_TI_PLATFORM) + HOST=arm-none-linux-gnueabi + + configure: +@@ -86,6 +102,9 @@ dm6446: Makefile + dm6467: Makefile + $(MAKE) -f Makefile + ++dm6467t: Makefile ++ $(MAKE) -f Makefile ++ + dm355: Makefile + $(MAKE) -f Makefile + +diff -rupN a/src/gsttiauddec1.c b/src/gsttiauddec1.c +--- a/src/gsttiauddec1.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gsttiauddec1.c 2010-09-16 12:41:11.000000000 -0700 +@@ -85,7 +85,7 @@ static GstStaticPadTemplate sink_factory + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ("audio/mpeg, " +- "mpegversion = (int) { 1, 4 }") ++ "mpegversion = (int) { 4 }") + ); + + /* Define source (output) pad capabilities. Currently, RAW is supported. */ +diff -rupN a/src/gsttiauddec.c b/src/gsttiauddec.c +--- a/src/gsttiauddec.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gsttiauddec.c 2010-09-16 12:41:11.000000000 -0700 +@@ -85,7 +85,7 @@ static GstStaticPadTemplate sink_factory + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ("audio/mpeg, " +- "mpegversion = (int) { 1, 4 }") ++ "mpegversion = (int) { 4 }") + ); + + /* Constants */ +diff -rupN a/src/gstticodecplugin_dm355.cfg b/src/gstticodecplugin_dm355.cfg +--- a/src/gstticodecplugin_dm355.cfg 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gstticodecplugin_dm355.cfg 2010-09-16 12:38:28.000000000 -0700 +@@ -1,84 +1,59 @@ +-/* +- * Copyright (C) 2008-2009 Texas Instruments Incorporated - http://www.ti.com/ +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Lesser General Public License as +- * published by the Free Software Foundation version 2.1 of the License. +- * +- * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, +- * whether express or implied; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Lesser General Public License for more details. ++/* =========================================================================== ++ * Copyright (c) Texas Instruments Incorporated 2009 + * ++ * Use of this software is controlled by the terms and conditions found in ++ * the license agreement under which this software has been supplied or ++ * provided. ++ * =========================================================================== + */ + +-prog.build.platform = "ti.platforms.evmDM355"; +- + /* Load support for the Codec Engine OSAL */ + var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); + + /* Configure CE to use it's DSP Link Linux version */ + osalGlobal.runtimeEnv = osalGlobal.LINUX; + ++/* Configure RMAN */ ++var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN'); ++RMAN.useDSKT2 = false; ++RMAN.persistentAllocFxn = "__ALG_allocMemory"; ++RMAN.persistentFreeFxn = "__ALG_freeMemory"; ++RMAN.semCreateFxn = "Sem_create"; ++RMAN.semDeleteFxn = "Sem_delete"; ++RMAN.semPendFxn = "Sem_pend"; ++RMAN.semPostFxn = "Sem_post"; ++RMAN.tableSize = 10; ++ ++var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings'); ++var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN'); ++var EDMA = xdc.useModule('ti.sdo.linuxutils.edma.EDMA'); ++var VICPLU = xdc.useModule('ti.sdo.linuxutils.vicp.VICP'); ++var VICP = xdc.useModule('ti.sdo.fc.ires.vicp.VICP2'); ++var VICPSYNC = xdc.useModule('ti.sdo.fc.vicpsync.VICPSYNC'); ++var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE'); ++var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM'); ++ + /* + * ======== Engine Configuration ======== + */ + var viddec = xdc.module('ti.sdo.ce.video2.IVIDDEC2'); +-var imgenc = xdc.module('ti.sdo.ce.image1.IIMGENC1'); +-var MPEG4DEC = xdc.useModule('ti.sdo.codecs.mpeg4dec.dm355.ce.MPEG4DEC'); +-var MPEG4ENC = xdc.useModule('ti.sdo.codecs.mpeg4enc.dm355.ce.MPEG4ENC'); +-var JPEGENC = xdc.useModule('ti.sdo.codecs.jpegenc.dm355.ce.JPEGENC'); +-var JPEGDEC = xdc.useModule('ti.sdo.codecs.jpegdec.dm355.ce.JPEGDEC'); ++var auddec = xdc.module('ti.sdo.ce.audio.IAUDDEC'); ++var videnc = xdc.module('ti.sdo.ce.video1.IVIDENC1'); ++var audenc = xdc.module('ti.sdo.ce.audio.IAUDENC'); ++ ++var MPEG4DEC = xdc.useModule('ti.sdo.codecs.mpeg4dec.ce.MPEG4DEC'); ++var JPEGDEC = xdc.useModule('ti.sdo.codecs.jpegdec.ce.JPEGDEC'); ++var MPEG4ENC = xdc.useModule('ti.sdo.codecs.mpeg4enc.ce.MPEG4ENC'); ++var JPEGENC = xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC'); + +-var Engine = xdc.useModule('ti.sdo.ce.Engine'); +-var decodeEngine = Engine.create("decode", [ ++var Engine = xdc.useModule('ti.sdo.ce.Engine'); ++var myEngine = Engine.create("codecServer", [ + {name: "mpeg4dec", mod: MPEG4DEC, local: true, groupId: 1}, + {name: "jpegdec", mod: JPEGDEC, local: true, groupId: 1}, +-]); +- +-var encodeEngine = Engine.create("encode", [ + {name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1}, +- {name: "jpegenc", mod: JPEGENC, local: true, groupId: 1}, ++ {name: "jpegenc", mod: JPEGENC, local: true, groupId: 1} + ]); + + /* Load support for the 'Davinci Multimedia Application Interface' modules */ + var DMAI = xdc.loadPackage('ti.sdo.dmai'); + +-/* +- * ======== DMAN3 Configuration ======== +- */ +- +-var DMAN3 = xdc.useModule('ti.sdo.fc.dman3.DMAN3'); +- +-/* give DMAN3 all TCCs except those hard-coded by The JPEG & MPEG Enc & Decs */ +- +-/* +- * For the 32-63 range, configure tccAllocationMaskH to exclude used channels +- * JPEG Dec: {33-47, 52-57} +- * JPEG Enc: {34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49} +- * MPEG Dec: {32-63} +- * MPEG Enc: {12, 13, 34, 35, 40,41,42,43,44,45,46,47,48,49,50,52,53, +- * 54,55,56,57,63} +- */ +-DMAN3.tccAllocationMaskH = 0x0; /* everthing 32-63 hardcoded and unavailable */ +- +-/* Give DMAN3 all lower TCCs except what's taken by Linux kernel and a Codec: +- * Based on the info from montavista: {2, 3, 8, 9, 26, 27, 30, 31} +- * and MPEG Enc taking up: {12, 13} +- */ +-DMAN3.tccAllocationMaskL = 0x33ffccf3; +- +-/* Following assignments will give DMAN3 control of PaRAMs above 78: */ +-DMAN3.paRamBaseIndex = 64; +-DMAN3.numPaRamEntries = 48; +-DMAN3.nullPaRamIndex = 127; +- +-/* Configure Scratch Group's DMAN3 resources */ +-DMAN3.numTccGroup[1] = 0; +-DMAN3.numPaRamGroup[1] = 32; +- +-DMAN3.qdmaChannels = [0, 1, 2, 3, 4, 5, 6, 7]; +-DMAN3.maxQdmaChannels = 8; +-DMAN3.numQdmaChannels = 8; +-DMAN3.maxTCs = 2; +- +diff -rupN a/src/gstticodecplugin_dm365.cfg b/src/gstticodecplugin_dm365.cfg +--- a/src/gstticodecplugin_dm365.cfg 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gstticodecplugin_dm365.cfg 2010-09-16 12:39:28.000000000 -0700 +@@ -1,19 +1,11 @@ +-/* +- * Copyright (C) 2008-2009 Texas Instruments Incorporated - http://www.ti.com/ +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU Lesser General Public License as +- * published by the Free Software Foundation version 2.1 of the License. +- * +- * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, +- * whether express or implied; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Lesser General Public License for more details. ++/* ============================================================================ ++ * Copyright (c) Texas Instruments Incorporated 2009 + * ++ * Use of this software is controlled by the terms and conditions found in the ++ * license agreement under which this software has been supplied or provided. ++ * ============================================================================ + */ + +-prog.build.platform = "ti.platforms.evmDM365"; +- + /* Load support for the Codec Engine OSAL */ + var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); + +@@ -23,34 +15,30 @@ osalGlobal.runtimeEnv = osalGlobal.LINUX + /* + * ======== Engine Configuration ======== + */ +-var videnc = xdc.module('ti.sdo.ce.video1.IVIDENC1'); + var viddec = xdc.module('ti.sdo.ce.video2.IVIDDEC2'); ++var auddec = xdc.module('ti.sdo.ce.audio.IAUDDEC'); + +-var MPEG4ENC = xdc.useModule('ti.sdo.codecs.mpeg4enc.ce.MPEG4ENC'); +-var H264ENC = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC'); +-var MPEG4DEC = xdc.useModule('ti.sdo.codecs.mpeg4dec.ce.MPEG4DEC'); ++var MPEG4DEC = xdc.useModule('ti.sdo.codecs.mpeg4dec_hdvicp.ce.MPEG4DEC_HDVICP'); ++var MPEG2DEC = xdc.useModule('ti.sdo.codecs.mpeg2dec.ce.MPEG2DEC'); + var H264DEC = xdc.useModule('ti.sdo.codecs.h264dec.ce.H264DEC'); +-var JPEGENC = xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC'); +-var JPEGDEC = xdc.useModule('ti.sdo.codecs.jpegdec.ce.JPEGDEC'); ++var MPEG4ENC = xdc.useModule('ti.sdo.codecs.mpeg4enc_hdvicp.ce.MPEG4ENC_HDVICP'); ++var MPEG2ENC = xdc.useModule('ti.sdo.codecs.mpeg2enc.ce.MPEG2ENC'); ++var H264ENC = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC'); + + var Engine = xdc.useModule('ti.sdo.ce.Engine'); +-var encodeEngine = Engine.create("encode", [ +- {name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1}, +- {name: "h264enc", mod: H264ENC, local: true, groupId: 1}, +- {name: "jpegenc", mod: JPEGENC, local: true, groupId: 1}, +-]); +-var decodeEngine = Engine.create("decode", [ ++var myEngine = Engine.create("codecServer", [ + {name: "mpeg4dec", mod: MPEG4DEC, local: true, groupId: 1}, ++ {name: "mpeg2dec", mod: MPEG2DEC, local: true, groupId: 1}, + {name: "h264dec", mod: H264DEC, local: true, groupId: 1}, +- {name: "jpegdec", mod: JPEGDEC, local: true, groupId: 1}, ++ {name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1}, ++ {name: "mpeg2enc", mod: MPEG2ENC, local: true, groupId: 1}, ++ {name: "h264enc", mod: H264ENC, local: true, groupId: 1}, + ]); + +-/* Load support for the 'Davinci Multimedia Application Interface' modules */ +-var DMAI = xdc.loadPackage('ti.sdo.dmai'); + +-/* Load support for SimpleWidget */ +-/*var SW = xdc.loadPackage('ti.sdo.simplewidget');*/ + ++/* Load support for the 'Davinci Multimedia Application Interface' modules */ ++var DMAI = xdc.loadPackage('ti.sdo.dmai'); + + /* Configure RMAN */ + var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN'); +@@ -78,17 +66,16 @@ var HDVICP = xdc.useModule('ti.sdo.fc.ir + + var VICP = xdc.useModule('ti.sdo.fc.ires.vicp.VICP2'); + +-var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE'); +- + var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN'); + +-var LSP = xdc.useModule('ti.sdo.linuxutils.edma.EDMA'); ++var EDMA = xdc.useModule('ti.sdo.linuxutils.edma.EDMA'); + +-var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM'); ++var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE'); + ++var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM'); + + /* Uncomment these lines if you wish to debug FC and enable FC trace */ +- ++/* + /* + xdc.loadPackage('ti.sdo.fc.ires.vicp').profile = "debug_trace"; + xdc.loadPackage('ti.sdo.fc.ires.edma3chan').profile = "debug_trace"; +Binary files a/src/.gstticodecplugin_dm365.cfg.rej.swp and b/src/.gstticodecplugin_dm365.cfg.rej.swp differ +diff -rupN a/src/gstticodecplugin_dm6467.cfg b/src/gstticodecplugin_dm6467.cfg +--- a/src/gstticodecplugin_dm6467.cfg 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gstticodecplugin_dm6467.cfg 2010-09-16 12:41:05.000000000 -0700 +@@ -29,25 +29,15 @@ TraceUtil.attrs = TraceUtil.SOCRATES_TRA + * ======== Engine Configuration ======== + */ + var Engine = xdc.useModule('ti.sdo.ce.Engine'); +-var decodeEngine = Engine.createFromServer( +- "decode", +- "./decodeCombo.x64P", +- "ti.sdo.servers.decode" ++var demoEngine = Engine.createFromServer( ++ "codecServer", ++ "./bin/cs.x64P", ++ "ti.sdo.server.cs" + ); +-var encodeEngine = Engine.createFromServer( +- "encode", +- "./encodeCombo.x64P", +- "ti.sdo.servers.encode" +- ); +- +-var encpath = "" + java.lang.System.getenv("ENCODE_COMBO"); +-if (encpath != "" && encpath != "null") { +- encodeEngine.server = java.lang.System.getenv("ENCODE_COMBO"); +-} + +-var decpath = "" + java.lang.System.getenv("DECODE_COMBO"); +-if (decpath != "" && decpath != "null") { +- decodeEngine.server = java.lang.System.getenv("DECODE_COMBO"); ++var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); ++if (combopath != "" && combopath != "null") { ++ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); + } + + /* Load support for the 'Davinci Multimedia Application Interface' modules */ +diff -rupN a/src/gstticodecplugin_dm6467t.cfg b/src/gstticodecplugin_dm6467t.cfg +--- a/src/gstticodecplugin_dm6467t.cfg 1969-12-31 16:00:00.000000000 -0800 ++++ b/src/gstticodecplugin_dm6467t.cfg 2010-09-16 12:25:09.000000000 -0700 +@@ -0,0 +1,34 @@ ++/* ============================================================================ ++ * Copyright (c) Texas Instruments Incorporated 2009 ++ * ++ * Use of this software is controlled by the terms and conditions found in the ++ * license agreement under which this software has been supplied or provided. ++ * ============================================================================ ++ */ ++ ++/* Load support for the Codec Engine OSAL */ ++var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); ++var os = xdc.useModule('ti.sdo.ce.osal.linux.Settings'); ++osalGlobal.os = os; ++ ++/* Configure CE to use it's DSP Link Linux version */ ++var ipc = xdc.useModule('ti.sdo.ce.ipc.Settings'); ++ipc.commType = ipc.COMM_DSPLINK; ++ ++/* ++ * ======== Engine Configuration ======== ++ */ ++var Engine = xdc.useModule('ti.sdo.ce.Engine'); ++var demoEngine = Engine.createFromServer( ++ "codecServer", ++ "./bin/cs.x64P", ++ "ti.sdo.server.cs" ++ ); ++ ++var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); ++if (combopath != "" && combopath != "null") { ++ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); ++} ++ ++/* Load support for the 'Davinci Multimedia Application Interface' modules */ ++var DMAI = xdc.loadPackage('ti.sdo.dmai'); +diff -rupN a/src/gstticodecplugin_omapl137.cfg b/src/gstticodecplugin_omapl137.cfg +--- a/src/gstticodecplugin_omapl137.cfg 1969-12-31 16:00:00.000000000 -0800 ++++ b/src/gstticodecplugin_omapl137.cfg 2010-09-16 12:40:59.000000000 -0700 +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++/* Load the Codec Engine 'Operating System Abstraction Layer' */ ++var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); ++ ++var os = xdc.useModule('ti.sdo.ce.osal.linux.Settings'); ++osalGlobal.os = os; ++ ++/* Configure CE to use it's DSP Link Linux version */ ++var ipc = xdc.useModule('ti.sdo.ce.ipc.Settings'); ++ipc.commType = ipc.COMM_DSPLINK; ++ ++/* ++* ======== Engine Configuration ======== ++ */ ++var Engine = xdc.useModule('ti.sdo.ce.Engine'); ++var demoEngine = Engine.createFromServer( ++ "codecServer", ++ "./bin/cs.x64P", ++ "ti.sdo.server.cs" ++ ); ++ ++var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); ++if (combopath != "" && combopath != "null") { ++ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); ++} ++ ++/* Load support for the DMAI module */ ++var DMAI = xdc.loadPackage('ti.sdo.dmai'); +diff -rupN a/src/gstticodecplugin_omapl138.cfg b/src/gstticodecplugin_omapl138.cfg +--- a/src/gstticodecplugin_omapl138.cfg 1969-12-31 16:00:00.000000000 -0800 ++++ b/src/gstticodecplugin_omapl138.cfg 2010-09-16 12:40:52.000000000 -0700 +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++/* Load the Codec Engine 'Operating System Abstraction Layer' */ ++var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); ++ ++var os = xdc.useModule('ti.sdo.ce.osal.linux.Settings'); ++osalGlobal.os = os; ++ ++/* Configure CE to use it's DSP Link Linux version */ ++var ipc = xdc.useModule('ti.sdo.ce.ipc.Settings'); ++ipc.commType = ipc.COMM_DSPLINK; ++ ++/* ++* ======== Engine Configuration ======== ++ */ ++var Engine = xdc.useModule('ti.sdo.ce.Engine'); ++var demoEngine = Engine.createFromServer( ++ "codecServer", ++ "./bin/cs.x64P", ++ "ti.sdo.server.cs" ++ ); ++ ++var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); ++if (combopath != "" && combopath != "null") { ++ demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); ++} ++ ++/* Load support for the DMAI module */ ++var DMAI = xdc.loadPackage('ti.sdo.dmai'); +diff -rupN a/src/gstticodecs_dm355.c b/src/gstticodecs_dm355.c +--- a/src/gstticodecs_dm355.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gstticodecs_dm355.c 2010-09-16 12:25:09.000000000 -0700 +@@ -22,8 +22,7 @@ + #include "gstticodecs.h" + + /* Declaration of the production engine and decoders shipped with the DVSDK */ +-static Char decodeEngine[] = "decode"; +-static Char encodeEngine[] = "encode"; ++static Char codecServer[] = "codecServer"; + + /* NULL terminated list of speech decoders in the engine to use in the demo */ + GstTICodec gst_ticodec_codecs[] = { +@@ -32,25 +31,25 @@ GstTICodec gst_ticodec_codecs[] = { + { + "MPEG4 Video Decoder", /* String name of codec used by plugin */ + "mpeg4dec", /* String name of codec used by CE */ +- decodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ + }, + + { + "MPEG4 Video Encoder", /* String name of codec used by plugin */ + "mpeg4enc", /* String name of codec used by CE */ +- encodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ + }, + + /* Imaging Codecs */ + { + "JPEG Image Encoder", + "jpegenc", +- encodeEngine ++ codecServer + }, + { + "JPEG Image Decoder", + "jpegdec", +- decodeEngine ++ codecServer + }, + + { NULL } +diff -rupN a/src/gstticodecs_dm365.c b/src/gstticodecs_dm365.c +--- a/src/gstticodecs_dm365.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gstticodecs_dm365.c 2010-09-16 12:25:09.000000000 -0700 +@@ -22,8 +22,7 @@ + #include "gstticodecs.h" + + /* Declaration of the production engine and decoders shipped with the DVSDK */ +-static Char decodeEngine[] = "decode"; +-static Char encodeEngine[] = "encode"; ++static Char codecServer[] = "codecServer"; + + /* NULL terminated list of speech decoders in the engine to use in the demo */ + GstTICodec gst_ticodec_codecs[] = { +@@ -32,25 +31,37 @@ GstTICodec gst_ticodec_codecs[] = { + { + "MPEG4 Video Decoder", /* String name of codec used by plugin */ + "mpeg4dec", /* String name of codec used by CE */ +- decodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { ++ "MPEG2 Video Decoder", /* String name of codec used by plugin */ ++ "mpeg2dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ + }, + + { + "MPEG4 Video Encoder", /* String name of codec used by plugin */ + "mpeg4enc", /* String name of codec used by CE */ +- encodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { ++ "MPEG2 Video Encoder", /* String name of codec used by plugin */ ++ "mpeg2enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ + }, + + { + "H.264 Video Decoder", /* String name of codec used by plugin */ + "h264dec", /* String name of codec used by CE */ +- decodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ + }, + + { + "H.264 Video Encoder", /* String name of codec used by plugin */ + "h264enc", /* String name of codec used by CE */ +- encodeEngine /* Engine that contains this codec */ ++ codecServer /* Engine that contains this codec */ + }, + + { NULL } +diff -rupN a/src/gstticodecs_dm6467.c b/src/gstticodecs_dm6467.c +--- a/src/gstticodecs_dm6467.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gstticodecs_dm6467.c 2010-09-16 12:25:09.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * gstticodecs_dm6446.c ++ * gstticodecs_dm6467.c + * + * This file provides information for available codecs on the DM6446 platform. + * +diff -rupN a/src/gstticodecs_dm6467t.c b/src/gstticodecs_dm6467t.c +--- a/src/gstticodecs_dm6467t.c 1969-12-31 16:00:00.000000000 -0800 ++++ b/src/gstticodecs_dm6467t.c 2010-09-16 12:25:09.000000000 -0700 +@@ -0,0 +1,69 @@ ++/* ++ * gstticodecs_dm6467t.c ++ * ++ * This file provides information for available codecs on the DM6446 platform. ++ * ++ * Original Author: ++ * Don Darling, Texas Instruments, Inc. ++ * ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++#include "gstticodecs.h" ++ ++/* Declaration of the production engine and decoders shipped with the DVSDK */ ++static Char codecServer[] = "codecServer"; ++ ++/* NULL terminated list of speech decoders in the engine to use in the demo */ ++GstTICodec gst_ticodec_codecs[] = { ++ ++ /* Speech Codecs */ ++ { ++ "G.711 Speech Decoder", /* String name of codec used by plugin */ ++ "g711dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "G.711 Speech Encoder", /* String name of codec used by plugin */ ++ "g711enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Audio Codecs */ ++ { ++ "AAC Audio Decoder", /* String name of codec used by plugin */ ++ "aachedec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Codecs */ ++ { ++ "H.264 Video Decoder", /* String name of codec used by plugin */ ++ "h264dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "H.264 BP/HP Decoder", /* Name of codec used by plugin */ ++ "h2641080p60vdec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "H.264 Video Encoder", /* String name of codec used by plugin */ ++ "h264enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "MPEG2 Video Decoder", /* String name of codec used by plugin */ ++ "mpeg2dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { NULL } ++}; ++ +diff -rupN a/src/gstticodecs_omapl137.c b/src/gstticodecs_omapl137.c +--- a/src/gstticodecs_omapl137.c 1969-12-31 16:00:00.000000000 -0800 ++++ b/src/gstticodecs_omapl137.c 2010-09-16 12:40:59.000000000 -0700 +@@ -0,0 +1,81 @@ ++/* ++ * gstticodecs_omapl137.c ++ * ++ * This file provides information for available codecs on the OMAP3530 platform. ++ * ++ * Original Author: ++ * Don Darling, Texas Instruments, Inc. ++ * ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++#include "gstticodecs.h" ++ ++/* Declaration of the production engine and decoders shipped with the DVSDK */ ++static Char codecServer[] = "codecServer"; ++ ++/* NULL terminated list of speech decoders in the engine to use in the demo */ ++GstTICodec gst_ticodec_codecs[] = { ++ ++ /* Audio Decoders */ ++ { ++ "AAC Audio Decoder", /* String name of codec used by plugin */ ++ "aachedec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Decoders */ ++ { ++ "H.264 Video Decoder", /* String name of codec used by plugin */ ++ "h264dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "MPEG4 Video Decoder", /* String name of codec used by plugin */ ++ "mpeg4dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Image Decoders */ ++ { ++ "JPEG Image Decoder", /* String name of codec used by plugin */ ++ "jpegdec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Encoders */ ++ { ++ "H.264 Video Encoder", /* String name of codec used by plugin */ ++ "h264enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Image Encoders */ ++ { ++ "JPEG Image Encoder", /* String name of codec used by plugin */ ++ "jpegenc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { NULL } ++}; ++ ++ ++/****************************************************************************** ++ * Custom ViM Settings for editing this file ++ ******************************************************************************/ ++#if 0 ++ Tabs (use 4 spaces for indentation) ++ vim:set tabstop=4: /* Use 4 spaces for tabs */ ++ vim:set shiftwidth=4: /* Use 4 spaces for >> operations */ ++ vim:set expandtab: /* Expand tabs into white spaces */ ++#endif +diff -rupN a/src/gstticodecs_omapl138.c b/src/gstticodecs_omapl138.c +--- a/src/gstticodecs_omapl138.c 1969-12-31 16:00:00.000000000 -0800 ++++ b/src/gstticodecs_omapl138.c 2010-09-16 12:40:52.000000000 -0700 +@@ -0,0 +1,81 @@ ++/* ++ * gstticodecs_omapl138.c ++ * ++ * This file provides information for available codecs on the OMAP3530 platform. ++ * ++ * Original Author: ++ * Don Darling, Texas Instruments, Inc. ++ * ++ * Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++#include "gstticodecs.h" ++ ++/* Declaration of the production engine and decoders shipped with the DVSDK */ ++static Char codecServer[] = "codecServer"; ++ ++/* NULL terminated list of speech decoders in the engine to use in the demo */ ++GstTICodec gst_ticodec_codecs[] = { ++ ++ /* Audio Decoders */ ++ { ++ "AAC Audio Decoder", /* String name of codec used by plugin */ ++ "aachedec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Decoders */ ++ { ++ "H.264 Video Decoder", /* String name of codec used by plugin */ ++ "h264dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, { ++ "MPEG4 Video Decoder", /* String name of codec used by plugin */ ++ "mpeg4dec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Image Decoders */ ++ { ++ "JPEG Image Decoder", /* String name of codec used by plugin */ ++ "jpegdec", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Video Encoders */ ++ { ++ "H.264 Video Encoder", /* String name of codec used by plugin */ ++ "h264enc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ /* Image Encoders */ ++ { ++ "JPEG Image Encoder", /* String name of codec used by plugin */ ++ "jpegenc", /* String name of codec used by CE */ ++ codecServer /* Engine that contains this codec */ ++ }, ++ ++ { NULL } ++}; ++ ++ ++/****************************************************************************** ++ * Custom ViM Settings for editing this file ++ ******************************************************************************/ ++#if 0 ++ Tabs (use 4 spaces for indentation) ++ vim:set tabstop=4: /* Use 4 spaces for tabs */ ++ vim:set shiftwidth=4: /* Use 4 spaces for >> operations */ ++ vim:set expandtab: /* Expand tabs into white spaces */ ++#endif +diff -rupN a/src/gsttidmaivideosink.c b/src/gsttidmaivideosink.c +--- a/src/gsttidmaivideosink.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gsttidmaivideosink.c 2010-09-16 12:40:59.000000000 -0700 +@@ -32,11 +32,12 @@ + /* Define sink (input) pad capabilities. + * + * UYVY - YUV 422 interleaved corresponding to V4L2_PIX_FMT_UYVY in v4l2 +- * Y8C8 - YUV 422 semi planar. The dm6467 VDCE outputs this format after a ++ * NV16 - YUV 422 semi planar. The dm6467 VDCE outputs this format after a + * color conversion.The format consists of two planes: one with the + * Y component and one with the CbCr components interleaved (hence semi) * + * See the LSP VDCE documentation for a thorough description of this + * format. ++ * Y8C8 - Same as NV16. Y8C8 was used in MVL-based LSPs. + * NV12 - YUV 420 semi planar corresponding to V4L2_PIX_FMT_NV12 in v4l2. + * The format consists of two planes: one with the + * Y component and one with the CbCr components interleaved with +@@ -51,6 +52,19 @@ static GstStaticPadTemplate sink_factory + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ++#if defined(Platform_omapl138) || defined(Platform_omapl137) ++ ("video/x-raw-rgb, " ++ "bpp=(int)16, " ++ "depth=(int)16, " ++ "endianness=(int)1234, " ++ "red_mask=(int)63488, " ++ "green_mask=(int)2016, " ++ "blue_mask=(int)31, " ++ "framerate=(fraction)[ 0, MAX ], " ++ "width=(int)[ 1, MAX ], " ++ "height=(int)[1, MAX ] " ++ ) ++#else + ("video/x-raw-yuv, " + "format=(fourcc)UYVY, " + "framerate=(fraction)[ 0, MAX ], " +@@ -62,11 +76,17 @@ static GstStaticPadTemplate sink_factory + "width=(int)[ 1, MAX ], " + "height=(int)[ 1, MAX ];" + "video/x-raw-yuv, " ++ "format=(fourcc)NV16, " ++ "framerate=(fraction)[ 0, MAX ], " ++ "width=(int)[ 1, MAX ], " ++ "height=(int)[ 1, MAX ];" ++ "video/x-raw-yuv, " + "format=(fourcc)NV12, " + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " + "height=(int)[ 1, MAX ]" + ) ++#endif + ); + + GST_DEBUG_CATEGORY_STATIC (gst_tidmaivideosink_debug); +@@ -219,7 +239,7 @@ static void gst_tidmaivideosink_class_in + "Video Standard used\n" + "\tAUTO (if supported), CIF, SIF_NTSC, SIF_PAL, VGA, D1_NTSC\n" + "\tD1_PAL, 480P, 576P, 720P_60, 720P_50, 1080I_30, 1080I_25\n" +- "\t1080P_30, 1080P_25, 1080P_24\n", ++ "\t1080P_30, 1080P_60, 1080P_25, 1080P_24\n", + NULL, G_PARAM_READWRITE)); + + g_object_class_install_property(gobject_class, PROP_VIDEOOUTPUT, +@@ -661,9 +681,18 @@ static int gst_tidmaivideosink_videostd_ + break; + case VideoStd_480P: + case VideoStd_720P_60: ++ #if defined(Platform_dm6467t) ++ case VideoStd_1080P_60: ++ #endif + vattrs->framerate = 60; + break; + ++ #if defined(Platform_omapl138) || defined(Platform_omapl137) ++ case VideoStd_QVGA: ++ vattrs->framerate = 30; ++ break; ++ #endif ++ + #if defined(Platform_omap3530) + case VideoStd_VGA: + vattrs->framerate = 60; +@@ -715,6 +744,9 @@ static int gst_tidmaivideosink_videostd_ + + case VideoStd_480P: + case VideoStd_720P_60: ++ #if defined(Platform_dm6467t) ++ case VideoStd_1080P_60: ++ #endif + return 16667; + + #if defined(Platform_omap3530) +@@ -949,6 +981,10 @@ static int gst_tidmaivideosink_convert_a + return VideoStd_1080P_25; + else if (!strcmp(sink->videoStd, "1080P_24")) + return VideoStd_1080P_24; ++ #if defined(Platform_dm6467t) ++ else if (!strcmp(sink->videoStd, "1080P_60")) ++ return VideoStd_1080P_60; ++ #endif + #if defined(Platform_omap3530) + else if (!strcmp(sink->videoStd, "VGA")) + return VideoStd_VGA; +@@ -958,7 +994,7 @@ static int gst_tidmaivideosink_convert_a + "Please choose from:\n" + "\tAUTO (if supported), CIF, SIF_NTSC, SIF_PAL, VGA, D1_NTSC\n" + "\tD1_PAL, 480P, 576P, 720P_60, 720P_50, 1080I_30, 1080I_25\n" +- "\t1080P_30, 1080P_25, 1080P_24\n", sink->videoStd); ++ "\t1080P_30, 1080P_60, 1080P_25, 1080P_24\n", sink->videoStd); + return -1; + } + break; +@@ -1035,6 +1071,18 @@ static gboolean gst_tidmaivideosink_set_ + sink->dAttrs.colorSpace = colorSpace; + break; + #endif ++ #if defined(Platform_omapl138) ++ case Cpu_Device_OMAPL138: ++ sink->dAttrs = Display_Attrs_OMAPL138_OSD_DEFAULT; ++ sink->dAttrs.colorSpace = colorSpace; ++ break; ++ #endif ++ #if defined(Platform_omapl137) ++ case Cpu_Device_OMAPL137: ++ sink->dAttrs = Display_Attrs_OMAPL137_OSD_DEFAULT; ++ sink->dAttrs.colorSpace = colorSpace; ++ break; ++ #endif + default: + sink->dAttrs = Display_Attrs_DM6446_DM355_VID_DEFAULT; + break; +@@ -1291,8 +1339,10 @@ static gboolean gst_tidmaivideosink_proc + ColorSpace_Type inBufColorSpace; + gint framerateDen; + gint framerateNum; ++ const gchar *mime; + + structure = gst_caps_get_structure(caps, 0); ++ mime = gst_structure_get_name(structure); + + /* The width and height of the input buffer are collected here so that it + * can be checked against the width and height of the display buffer. +@@ -1300,24 +1350,38 @@ static gboolean gst_tidmaivideosink_proc + gst_structure_get_int(structure, "width", &width); + gst_structure_get_int(structure, "height", &height); + +- /* Map input buffer fourcc to dmai color space */ +- gst_structure_get_fourcc(structure, "format", &fourcc); ++ if (!strcmp(mime, "video/x-raw-rgb")) { ++ gint rm,gm,bm; + +- switch (fourcc) { +- case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): +- inBufColorSpace = ColorSpace_UYVY; +- break; +- case GST_MAKE_FOURCC('Y', '8', 'C', '8'): +- inBufColorSpace = ColorSpace_YUV422PSEMI; +- break; +- #if defined(Platform_dm365) +- case GST_MAKE_FOURCC('N', 'V', '1', '2'): +- inBufColorSpace = ColorSpace_YUV420PSEMI; +- break; +- #endif +- default: +- GST_ERROR("unsupported fourcc\n"); ++ gst_structure_get_int(structure,"red_mask",&rm); ++ gst_structure_get_int(structure,"green_mask",&gm); ++ gst_structure_get_int(structure,"blue_mask",&bm); ++ if ((rm == 63488) && (gm == 2016) && (bm == 31)){ ++ inBufColorSpace = ColorSpace_RGB565; ++ } else { ++ GST_ERROR("unsupported color space\n"); + return FALSE; ++ } ++ } else { ++ ++ /* Map input buffer fourcc to dmai color space */ ++ gst_structure_get_fourcc(structure, "format", &fourcc); ++ ++ switch (fourcc) { ++ case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): ++ inBufColorSpace = ColorSpace_UYVY; ++ break; ++ case GST_MAKE_FOURCC('N', 'V', '1', '6'): ++ case GST_MAKE_FOURCC('Y', '8', 'C', '8'): ++ inBufColorSpace = ColorSpace_YUV422PSEMI; ++ break; ++ case GST_MAKE_FOURCC('N', 'V', '1', '2'): ++ inBufColorSpace = ColorSpace_YUV420PSEMI; ++ break; ++ default: ++ GST_ERROR("unsupported fourcc\n"); ++ return FALSE; ++ } + } + + /* Read the frame rate */ +diff -rupN a/src/gsttividdec2.c b/src/gsttividdec2.c +--- a/src/gsttividdec2.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gsttividdec2.c 2010-09-16 12:41:15.000000000 -0700 +@@ -83,7 +83,7 @@ static GstStaticPadTemplate sink_factory + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ("video/mpeg, " +- "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ ++ "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ + "systemstream=(boolean)false, " + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " +@@ -91,7 +91,8 @@ static GstStaticPadTemplate sink_factory + "video/x-h264, " /* H264 */ + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " +- "height=(int)[ 1, MAX ]" ++ "height=(int)[ 1, MAX ] ;" ++ "video/x-xvid" /* XVID */ + ) + ); + +@@ -613,6 +614,11 @@ static gboolean gst_tividdec2_set_sink_c + codec = gst_ticodec_get_codec("H.264 Video Decoder"); + } + ++ /* XVID Decode */ ++ else if (!strcmp(mime, "video/x-xvid")) { ++ codec = gst_ticodec_get_codec("MPEG4 Video Decoder"); ++ } ++ + /* Mime type not supported */ + else { + GST_ELEMENT_ERROR(viddec2, STREAM, NOT_IMPLEMENTED, +@@ -671,16 +677,8 @@ static gboolean gst_tividdec2_set_source + given buffer */ + BufferGfx_getDimensions(hBuf, &dim); + +-#if !defined(Platform_dm365) +- caps = +- gst_caps_new_simple("video/x-raw-yuv", +- "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('U','Y','V','Y'), +- "framerate", GST_TYPE_FRACTION, viddec2->framerateNum, +- viddec2->framerateDen, +- "width", G_TYPE_INT, dim.width, +- "height", G_TYPE_INT, dim.height, +- NULL); +-#else ++#if defined(Platform_dm365) || defined(Platform_dm6467) || \ ++ defined(Platform_dm6467t) + caps = + gst_caps_new_simple("video/x-raw-yuv", + "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('N','V','1','2'), +@@ -689,6 +687,15 @@ static gboolean gst_tividdec2_set_source + "width", G_TYPE_INT, dim.width, + "height", G_TYPE_INT, dim.height, + NULL); ++#else ++ caps = ++ gst_caps_new_simple("video/x-raw-yuv", ++ "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('U','Y','V','Y'), ++ "framerate", GST_TYPE_FRACTION, viddec2->framerateNum, ++ viddec2->framerateDen, ++ "width", G_TYPE_INT, dim.width, ++ "height", G_TYPE_INT, dim.height, ++ NULL); + #endif + + /* Set the source pad caps */ +@@ -1165,29 +1172,35 @@ static gboolean gst_tividdec2_codec_star + + /* Set up codec parameters depending on device */ + switch(device) { +- case Cpu_Device_DM6467: +- params.forceChromaFormat = XDM_YUV_420P; +- params.maxWidth = VideoStd_1080I_WIDTH; +- params.maxHeight = VideoStd_1080I_HEIGHT + 8; +- colorSpace = ColorSpace_YUV420PSEMI; +- defaultNumBufs = 5; +- break; +-#if defined(Platform_dm365) +- case Cpu_Device_DM365: +- params.forceChromaFormat = XDM_YUV_420SP; +- params.maxWidth = VideoStd_720P_WIDTH; +- params.maxHeight = VideoStd_720P_HEIGHT; +- colorSpace = ColorSpace_YUV420PSEMI; +- defaultNumBufs = 5; +- break; +-#endif +- default: +- params.forceChromaFormat = XDM_YUV_422ILE; +- params.maxWidth = VideoStd_D1_WIDTH; +- params.maxHeight = VideoStd_D1_PAL_HEIGHT; +- colorSpace = ColorSpace_UYVY; +- defaultNumBufs = 3; +- break; ++ case Cpu_Device_DM6467: ++ #if defined(Platform_dm6467t) ++ params.forceChromaFormat = XDM_YUV_420SP; ++ params.maxFrameRate = 60000; ++ params.maxBitRate = 30000000; ++ #else ++ params.forceChromaFormat = XDM_YUV_420P; ++ #endif ++ params.maxWidth = VideoStd_1080I_WIDTH; ++ params.maxHeight = VideoStd_1080I_HEIGHT + 8; ++ colorSpace = ColorSpace_YUV420PSEMI; ++ defaultNumBufs = 5; ++ break; ++ #if defined(Platform_dm365) ++ case Cpu_Device_DM365: ++ params.forceChromaFormat = XDM_YUV_420SP; ++ params.maxWidth = VideoStd_720P_WIDTH; ++ params.maxHeight = VideoStd_720P_HEIGHT; ++ colorSpace = ColorSpace_YUV420PSEMI; ++ defaultNumBufs = 4; ++ break; ++ #endif ++ default: ++ params.forceChromaFormat = XDM_YUV_422ILE; ++ params.maxWidth = VideoStd_D1_WIDTH; ++ params.maxHeight = VideoStd_D1_PAL_HEIGHT; ++ colorSpace = ColorSpace_UYVY; ++ defaultNumBufs = 3; ++ break; + } + + GST_LOG("opening video decoder \"%s\"\n", viddec2->codecName); +diff -rupN a/src/gsttividdec.c b/src/gsttividdec.c +--- a/src/gsttividdec.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gsttividdec.c 2010-09-16 12:41:15.000000000 -0700 +@@ -82,7 +82,7 @@ static GstStaticPadTemplate sink_factory + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ("video/mpeg, " +- "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ ++ "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ + "systemstream=(boolean)false, " + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " +@@ -90,7 +90,8 @@ static GstStaticPadTemplate sink_factory + "video/x-h264, " /* H264 */ + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " +- "height=(int)[ 1, MAX ]" ++ "height=(int)[ 1, MAX ] ;" ++ "video/x-xvid" /* XVID */ + ) + ); + +@@ -603,6 +604,11 @@ static gboolean gst_tividdec_set_sink_ca + codec = gst_ticodec_get_codec("H.264 Video Decoder"); + } + ++ /* XVID Decode */ ++ else if (!strcmp(mime, "video/x-xvid")) { ++ codec = gst_ticodec_get_codec("MPEG4 Video Decoder"); ++ } ++ + /* Mime type not supported */ + else { + GST_ELEMENT_ERROR(viddec, STREAM, NOT_IMPLEMENTED, +diff -rupN a/src/gsttividdec.c.orig b/src/gsttividdec.c.orig +--- a/src/gsttividdec.c.orig 1969-12-31 16:00:00.000000000 -0800 ++++ b/src/gsttividdec.c.orig 2010-09-16 12:24:16.000000000 -0700 +@@ -0,0 +1,1496 @@ ++/* ++ * gsttividdec.c ++ * ++ * This file defines the "TIViddec" element, which decodes an xDM 0.9 video ++ * stream. ++ * ++ * Example usage: ++ * gst-launch filesrc location=<video file> ! ++ * TIViddec engineName="<engine name>" codecName="<codecName>" ! ++ * fakesink silent=TRUE ++ * ++ * Notes: ++ * * If the upstream element (i.e. demuxer or typefind element) negotiates ++ * caps with TIViddec, the engineName and codecName properties will be ++ * auto-detected based on the mime type requested. The engine and codec ++ * names used for particular mime types are defined in gsttividdec.h. ++ * Currently, they are set to use the engine and codec names provided with ++ * the TI evaluation codecs. ++ * * This element currently assumes that the codec produces UYVY output. ++ * ++ * Original Author: ++ * Don Darling, Texas Instruments, Inc. ++ * ++ * Copyright (C) 2008-2009 Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation version 2.1 of the License. ++ * ++ * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, ++ * whether express or implied; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include <config.h> ++#endif ++ ++#include <stdio.h> ++#include <string.h> ++#include <gst/gst.h> ++#include <semaphore.h> ++ ++#include <ti/sdo/dmai/Dmai.h> ++#include <ti/sdo/dmai/VideoStd.h> ++#include <ti/sdo/dmai/Buffer.h> ++#include <ti/sdo/dmai/BufferGfx.h> ++#include <ti/sdo/dmai/BufTab.h> ++#include <ti/sdo/dmai/ce/Vdec.h> ++ ++#include "gsttividdec.h" ++#include "gsttidmaibuffertransport.h" ++#include "gstticodecs.h" ++#include "gsttithreadprops.h" ++#include "gsttiquicktime_h264.h" ++#include "gstticommonutils.h" ++ ++/* Declare variable used to categorize GST_LOG output */ ++GST_DEBUG_CATEGORY_STATIC (gst_tividdec_debug); ++#define GST_CAT_DEFAULT gst_tividdec_debug ++ ++/* Element property identifiers */ ++enum ++{ ++ PROP_0, ++ PROP_ENGINE_NAME, /* engineName (string) */ ++ PROP_CODEC_NAME, /* codecName (string) */ ++ PROP_NUM_OUTPUT_BUFS, /* numOutputBufs (int) */ ++ PROP_FRAMERATE, /* frameRate (int) */ ++ PROP_DISPLAY_BUFFER, /* displayBuffer (boolean) */ ++ PROP_GEN_TIMESTAMPS /* genTimeStamps (boolean) */ ++}; ++ ++/* Define sink (input) pad capabilities. Currently, MPEG and H264 are ++ * supported. ++ */ ++static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( ++ "sink", ++ GST_PAD_SINK, ++ GST_PAD_ALWAYS, ++ GST_STATIC_CAPS ++ ("video/mpeg, " ++ "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ ++ "systemstream=(boolean)false, " ++ "framerate=(fraction)[ 0, MAX ], " ++ "width=(int)[ 1, MAX ], " ++ "height=(int)[ 1, MAX ] ;" ++ "video/x-h264, " /* H264 */ ++ "framerate=(fraction)[ 0, MAX ], " ++ "width=(int)[ 1, MAX ], " ++ "height=(int)[ 1, MAX ]" ++ ) ++); ++ ++/* Constants */ ++#define gst_tividdec_CODEC_FREE 0x2 ++ ++/* Define source (output) pad capabilities. Currently, UYVY is supported. */ ++static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE( ++ "src", ++ GST_PAD_SRC, ++ GST_PAD_ALWAYS, ++ GST_STATIC_CAPS ++ ("video/x-raw-yuv, " /* UYVY */ ++ "format=(fourcc)UYVY, " ++ "framerate=(fraction)[ 0, MAX ], " ++ "width=(int)[ 1, MAX ], " ++ "height=(int)[ 1, MAX ]" ++ ) ++); ++ ++ ++/* Declare a global pointer to our element base class */ ++static GstElementClass *parent_class = NULL; ++ ++/* Static Function Declarations */ ++static void ++ gst_tividdec_base_init(gpointer g_class); ++static void ++ gst_tividdec_class_init(GstTIViddecClass *g_class); ++static void ++ gst_tividdec_init(GstTIViddec *object, GstTIViddecClass *g_class); ++static void ++ gst_tividdec_set_property (GObject *object, guint prop_id, ++ const GValue *value, GParamSpec *pspec); ++static void ++ gst_tividdec_get_property (GObject *object, guint prop_id, GValue *value, ++ GParamSpec *pspec); ++static gboolean ++ gst_tividdec_set_sink_caps(GstPad *pad, GstCaps *caps); ++static gboolean ++ gst_tividdec_set_source_caps(GstTIViddec *viddec, Buffer_Handle hBuf); ++static gboolean ++ gst_tividdec_sink_event(GstPad *pad, GstEvent *event); ++static GstFlowReturn ++ gst_tividdec_chain(GstPad *pad, GstBuffer *buf); ++static gboolean ++ gst_tividdec_init_video(GstTIViddec *viddec); ++static gboolean ++ gst_tividdec_exit_video(GstTIViddec *viddec); ++static GstStateChangeReturn ++ gst_tividdec_change_state(GstElement *element, GstStateChange transition); ++static void* ++ gst_tividdec_decode_thread(void *arg); ++static void ++ gst_tividdec_drain_pipeline(GstTIViddec *viddec); ++static GstClockTime ++ gst_tividdec_frame_duration(GstTIViddec *viddec); ++static gboolean ++ gst_tividdec_codec_start (GstTIViddec *viddec); ++static gboolean ++ gst_tividdec_codec_stop (GstTIViddec *viddec); ++static void ++ gst_tividdec_init_env(GstTIViddec *viddec); ++static void ++ gst_tividdec_dispose(GObject * object); ++static gboolean ++ gst_tividdec_set_query_pad(GstPad * pad, GstQuery * query); ++ ++/****************************************************************************** ++ * gst_tividdec_class_init_trampoline ++ * Boiler-plate function auto-generated by "make_element" script. ++ ******************************************************************************/ ++static void gst_tividdec_class_init_trampoline(gpointer g_class, gpointer data) ++{ ++ parent_class = (GstElementClass*) g_type_class_peek_parent(g_class); ++ gst_tividdec_class_init((GstTIViddecClass*)g_class); ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_get_type ++ * Boiler-plate function auto-generated by "make_element" script. ++ * Defines function pointers for initialization routines for this element. ++ ******************************************************************************/ ++GType gst_tividdec_get_type(void) ++{ ++ static GType object_type = 0; ++ ++ if (G_UNLIKELY(object_type == 0)) { ++ static const GTypeInfo object_info = { ++ sizeof(GstTIViddecClass), ++ gst_tividdec_base_init, ++ NULL, ++ gst_tividdec_class_init_trampoline, ++ NULL, ++ NULL, ++ sizeof(GstTIViddec), ++ 0, ++ (GInstanceInitFunc) gst_tividdec_init ++ }; ++ ++ object_type = g_type_register_static((gst_element_get_type()), ++ "GstTIViddec", &object_info, (GTypeFlags)0); ++ ++ /* Initialize GST_LOG for this object */ ++ GST_DEBUG_CATEGORY_INIT(gst_tividdec_debug, "TIViddec", 0, ++ "TI xDM 0.9 Video Decoder"); ++ ++ GST_LOG("initialized get_type\n"); ++ } ++ ++ return object_type; ++}; ++ ++ ++/****************************************************************************** ++ * gst_tividdec_base_init ++ * Boiler-plate function auto-generated by "make_element" script. ++ * Initializes element base class. ++ ******************************************************************************/ ++static void gst_tividdec_base_init(gpointer gclass) ++{ ++ static GstElementDetails element_details = { ++ "TI xDM 0.9 Video Decoder", ++ "Codec/Decoder/Video", ++ "Decodes video using an xDM 0.9-based codec", ++ "Don Darling; Texas Instruments, Inc." ++ }; ++ ++ GstElementClass *element_class = GST_ELEMENT_CLASS(gclass); ++ ++ gst_element_class_add_pad_template(element_class, ++ gst_static_pad_template_get (&src_factory)); ++ gst_element_class_add_pad_template(element_class, ++ gst_static_pad_template_get (&sink_factory)); ++ gst_element_class_set_details(element_class, &element_details); ++ ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_class_init ++ * Boiler-plate function auto-generated by "make_element" script. ++ * Initializes the TIViddec class. ++ ******************************************************************************/ ++static void gst_tividdec_class_init(GstTIViddecClass *klass) ++{ ++ GObjectClass *gobject_class; ++ GstElementClass *gstelement_class; ++ ++ gobject_class = (GObjectClass*) klass; ++ gstelement_class = (GstElementClass*) klass; ++ ++ gobject_class->set_property = gst_tividdec_set_property; ++ gobject_class->get_property = gst_tividdec_get_property; ++ gobject_class->dispose = GST_DEBUG_FUNCPTR(gst_tividdec_dispose); ++ ++ gstelement_class->change_state = gst_tividdec_change_state; ++ ++ g_object_class_install_property(gobject_class, PROP_ENGINE_NAME, ++ g_param_spec_string("engineName", "Engine Name", ++ "Engine name used by Codec Engine", "unspecified", ++ G_PARAM_READWRITE)); ++ ++ g_object_class_install_property(gobject_class, PROP_CODEC_NAME, ++ g_param_spec_string("codecName", "Codec Name", "Name of video codec", ++ "unspecified", G_PARAM_READWRITE)); ++ ++ g_object_class_install_property(gobject_class, PROP_NUM_OUTPUT_BUFS, ++ g_param_spec_int("numOutputBufs", ++ "Number of Ouput Buffers", ++ "Number of output buffers to allocate for codec", ++ 2, G_MAXINT32, 3, G_PARAM_WRITABLE)); ++ ++ g_object_class_install_property(gobject_class, PROP_FRAMERATE, ++ g_param_spec_int("frameRate", ++ "Frame rate to play output", ++ "Communicate this framerate to downstream elements. The frame " ++ "rate specified should be an integer. If 29.97fps is desired, " ++ "specify 30 for this setting", ++ 1, G_MAXINT32, 30, G_PARAM_WRITABLE)); ++ ++ g_object_class_install_property(gobject_class, PROP_DISPLAY_BUFFER, ++ g_param_spec_boolean("displayBuffer", "Display Buffer", ++ "Display circular buffer status while processing", ++ FALSE, G_PARAM_WRITABLE)); ++ ++ g_object_class_install_property(gobject_class, PROP_GEN_TIMESTAMPS, ++ g_param_spec_boolean("genTimeStamps", "Generate Time Stamps", ++ "Set timestamps on output buffers", ++ TRUE, G_PARAM_WRITABLE)); ++} ++ ++/****************************************************************************** ++ * gst_tividdec_dispose ++ *****************************************************************************/ ++static void gst_tividdec_dispose(GObject * object) ++{ ++ GstTIViddec *viddec = GST_TIVIDDEC(object); ++ ++ if (viddec->segment) { ++ gst_segment_free(viddec->segment); ++ viddec->segment = NULL; ++ } ++ ++ G_OBJECT_CLASS(parent_class)->dispose (object); ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_init_env ++ *****************************************************************************/ ++static void gst_tividdec_init_env(GstTIViddec *viddec) ++{ ++ GST_LOG("gst_tividdec_init_env - begin\n"); ++ ++ if (gst_ti_env_is_defined("GST_TI_TIViddec_engineName")) { ++ viddec->engineName = gst_ti_env_get_string("GST_TI_TIViddec_engineName"); ++ GST_LOG("Setting engineName=%s\n", viddec->engineName); ++ } ++ ++ if (gst_ti_env_is_defined("GST_TI_TIViddec_codecName")) { ++ viddec->codecName = gst_ti_env_get_string("GST_TI_TIViddec_codecName"); ++ GST_LOG("Setting codecName=%s\n", viddec->codecName); ++ } ++ ++ if (gst_ti_env_is_defined("GST_TI_TIViddec_numOutputBufs")) { ++ viddec->numOutputBufs = ++ gst_ti_env_get_int("GST_TI_TIViddec_numOutputBufs"); ++ GST_LOG("Setting numOutputBufs=%ld\n", viddec->numOutputBufs); ++ } ++ ++ if (gst_ti_env_is_defined("GST_TI_TIViddec_displayBuffer")) { ++ viddec->displayBuffer = ++ gst_ti_env_get_boolean("GST_TI_TIViddec_displayBuffer"); ++ GST_LOG("Setting displayBuffer=%s\n", ++ viddec->displayBuffer ? "TRUE" : "FALSE"); ++ } ++ ++ if (gst_ti_env_is_defined("GST_TI_TIViddec_genTimeStamps")) { ++ viddec->genTimeStamps = ++ gst_ti_env_get_boolean("GST_TI_TIViddec_genTimeStamps"); ++ GST_LOG("Setting genTimeStamps =%s\n", ++ viddec->genTimeStamps ? "TRUE" : "FALSE"); ++ } ++ ++ if (gst_ti_env_is_defined("GST_TI_TIViddec_frameRate")) { ++ viddec->framerateNum = ++ gst_ti_env_get_int("GST_TI_TIViddec_frameRate"); ++ GST_LOG("Setting frameRate=%d\n", viddec->framerateNum); ++ } ++ ++ GST_LOG("gst_tividdec_init_env - end\n"); ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_init ++ * Initializes a new element instance, instantiates pads and sets the pad ++ * callback functions. ++ ******************************************************************************/ ++static void gst_tividdec_init(GstTIViddec *viddec, GstTIViddecClass *gclass) ++{ ++ /* Instantiate encoded video sink pad. ++ * ++ * Fixate on our static template caps instead of writing a getcaps ++ * function, which is overkill for this element. ++ */ ++ viddec->sinkpad = ++ gst_pad_new_from_static_template(&sink_factory, "sink"); ++ gst_pad_set_setcaps_function( ++ viddec->sinkpad, GST_DEBUG_FUNCPTR(gst_tividdec_set_sink_caps)); ++ gst_pad_set_event_function( ++ viddec->sinkpad, GST_DEBUG_FUNCPTR(gst_tividdec_sink_event)); ++ gst_pad_set_chain_function( ++ viddec->sinkpad, GST_DEBUG_FUNCPTR(gst_tividdec_chain)); ++ gst_pad_fixate_caps(viddec->sinkpad, ++ gst_caps_make_writable( ++ gst_caps_copy(gst_pad_get_pad_template_caps(viddec->sinkpad)))); ++ ++ /* Instantiate deceoded video source pad. ++ * ++ * Fixate on our static template caps instead of writing a getcaps ++ * function, which is overkill for this element. ++ */ ++ viddec->srcpad = ++ gst_pad_new_from_static_template(&src_factory, "src"); ++ gst_pad_fixate_caps(viddec->srcpad, ++ gst_caps_make_writable( ++ gst_caps_copy(gst_pad_get_pad_template_caps(viddec->srcpad)))); ++ gst_pad_set_query_function(viddec->srcpad, ++ GST_DEBUG_FUNCPTR(gst_tividdec_set_query_pad)); ++ ++ /* Add pads to TIViddec element */ ++ gst_element_add_pad(GST_ELEMENT(viddec), viddec->sinkpad); ++ gst_element_add_pad(GST_ELEMENT(viddec), viddec->srcpad); ++ ++ /* Initialize TIViddec state */ ++ viddec->engineName = NULL; ++ viddec->codecName = NULL; ++ viddec->displayBuffer = FALSE; ++ viddec->genTimeStamps = TRUE; ++ ++ viddec->hEngine = NULL; ++ viddec->hVd = NULL; ++ viddec->drainingEOS = FALSE; ++ viddec->threadStatus = 0UL; ++ ++ viddec->waitOnDecodeThread = NULL; ++ viddec->waitOnDecodeDrain = NULL; ++ viddec->waitOnBufTab = NULL; ++ ++ viddec->framerateNum = 0; ++ viddec->framerateDen = 0; ++ ++ viddec->numOutputBufs = 0UL; ++ viddec->hOutBufTab = NULL; ++ viddec->circBuf = NULL; ++ ++ viddec->sps_pps_data = NULL; ++ viddec->nal_code_prefix = NULL; ++ viddec->nal_length = 0; ++ ++ viddec->segment = gst_segment_new(); ++ viddec->totalDuration = 0; ++ viddec->totalBytes = 0; ++ ++ gst_tividdec_init_env(viddec); ++} ++ ++/****************************************************************************** ++ * gst_tiauddec_set_query_pad ++ * This function reuturn stream duration and position. ++ *****************************************************************************/ ++static gboolean gst_tividdec_set_query_pad(GstPad *pad, GstQuery *query) ++{ ++ GstTIViddec *viddec; ++ gboolean ret = FALSE; ++ ++ viddec = GST_TIVIDDEC(gst_pad_get_parent(pad)); ++ ++ ret = gst_ti_query_srcpad(pad, query, viddec->sinkpad, ++ viddec->totalDuration, viddec->totalBytes); ++ ++ gst_object_unref(viddec); ++ ++ return ret; ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_set_property ++ * Set element properties when requested. ++ ******************************************************************************/ ++static void gst_tividdec_set_property(GObject *object, guint prop_id, ++ const GValue *value, GParamSpec *pspec) ++{ ++ GstTIViddec *viddec = GST_TIVIDDEC(object); ++ ++ GST_LOG("begin set_property\n"); ++ ++ switch (prop_id) { ++ case PROP_ENGINE_NAME: ++ if (viddec->engineName) { ++ g_free((gpointer)viddec->engineName); ++ } ++ viddec->engineName = ++ (gchar*)g_malloc(strlen(g_value_get_string(value)) + 1); ++ strcpy((gchar *)viddec->engineName, g_value_get_string(value)); ++ GST_LOG("setting \"engineName\" to \"%s\"\n", viddec->engineName); ++ break; ++ case PROP_CODEC_NAME: ++ if (viddec->codecName) { ++ g_free((gpointer)viddec->codecName); ++ } ++ viddec->codecName = ++ (gchar*)g_malloc(strlen(g_value_get_string(value)) + 1); ++ strcpy((gchar*)viddec->codecName, g_value_get_string(value)); ++ GST_LOG("setting \"codecName\" to \"%s\"\n", viddec->codecName); ++ break; ++ case PROP_NUM_OUTPUT_BUFS: ++ viddec->numOutputBufs = g_value_get_int(value); ++ GST_LOG("setting \"numOutputBufs\" to \"%ld\"\n", ++ viddec->numOutputBufs); ++ break; ++ case PROP_FRAMERATE: ++ { ++ viddec->framerateNum = g_value_get_int(value); ++ viddec->framerateDen = 1; ++ ++ /* If 30fps was specified, use 29.97 */ ++ if (viddec->framerateNum == 30) { ++ viddec->framerateNum = 30000; ++ viddec->framerateDen = 1001; ++ } ++ ++ GST_LOG("setting \"frameRate\" to \"%2.2lf\"\n", ++ (gdouble)viddec->framerateNum / (gdouble)viddec->framerateDen); ++ break; ++ } ++ case PROP_DISPLAY_BUFFER: ++ viddec->displayBuffer = g_value_get_boolean(value); ++ GST_LOG("setting \"displayBuffer\" to \"%s\"\n", ++ viddec->displayBuffer ? "TRUE" : "FALSE"); ++ break; ++ case PROP_GEN_TIMESTAMPS: ++ viddec->genTimeStamps = g_value_get_boolean(value); ++ GST_LOG("setting \"genTimeStamps\" to \"%s\"\n", ++ viddec->genTimeStamps ? "TRUE" : "FALSE"); ++ break; ++ default: ++ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); ++ break; ++ } ++ ++ GST_LOG("end set_property\n"); ++} ++ ++/****************************************************************************** ++ * gst_tividdec_get_property ++ * Return values for requested element property. ++ ******************************************************************************/ ++static void gst_tividdec_get_property(GObject *object, guint prop_id, ++ GValue *value, GParamSpec *pspec) ++{ ++ GstTIViddec *viddec = GST_TIVIDDEC(object); ++ ++ GST_LOG("begin get_property\n"); ++ ++ switch (prop_id) { ++ case PROP_ENGINE_NAME: ++ g_value_set_string(value, viddec->engineName); ++ break; ++ case PROP_CODEC_NAME: ++ g_value_set_string(value, viddec->codecName); ++ break; ++ default: ++ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); ++ break; ++ } ++ ++ GST_LOG("end get_property\n"); ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_set_sink_caps ++ * Negotiate our sink pad capabilities. ++ ******************************************************************************/ ++static gboolean gst_tividdec_set_sink_caps(GstPad *pad, GstCaps *caps) ++{ ++ GstTIViddec *viddec; ++ GstStructure *capStruct; ++ const gchar *mime; ++ GstTICodec *codec = NULL; ++ ++ viddec = GST_TIVIDDEC(gst_pad_get_parent(pad)); ++ capStruct = gst_caps_get_structure(caps, 0); ++ mime = gst_structure_get_name(capStruct); ++ ++ GST_INFO("requested sink caps: %s", gst_caps_to_string(caps)); ++ ++ /* Generic Video Properties */ ++ if (!strncmp(mime, "video/", 6)) { ++ gint framerateNum; ++ gint framerateDen; ++ ++ if (gst_structure_get_fraction(capStruct, "framerate", &framerateNum, ++ &framerateDen)) { ++ viddec->framerateNum = framerateNum; ++ viddec->framerateDen = framerateDen; ++ } ++ } ++ ++ /* MPEG Decode */ ++ if (!strcmp(mime, "video/mpeg")) { ++ gboolean systemstream; ++ gint mpegversion; ++ ++ /* Retreive video properties */ ++ if (!gst_structure_get_int(capStruct, "mpegversion", &mpegversion)) { ++ mpegversion = 0; ++ } ++ ++ if (!gst_structure_get_boolean(capStruct, "systemstream", ++ &systemstream)) { ++ systemstream = FALSE; ++ } ++ ++ /* Determine the correct decoder to use */ ++ if (systemstream) { ++ gst_object_unref(viddec); ++ return FALSE; ++ } ++ ++ if (mpegversion == 2) { ++ codec = gst_ticodec_get_codec("MPEG2 Video Decoder"); ++ } ++ else if (mpegversion == 4) { ++ codec = gst_ticodec_get_codec("MPEG4 Video Decoder"); ++ } ++ else { ++ gst_object_unref(viddec); ++ return FALSE; ++ } ++ } ++ ++ /* H.264 Decode */ ++ else if (!strcmp(mime, "video/x-h264")) { ++ codec = gst_ticodec_get_codec("H.264 Video Decoder"); ++ } ++ ++ /* Mime type not supported */ ++ else { ++ GST_ELEMENT_ERROR(viddec, STREAM, NOT_IMPLEMENTED, ++ ("stream type not supported"), (NULL)); ++ gst_object_unref(viddec); ++ return FALSE; ++ } ++ ++ /* Report if the required codec was not found */ ++ if (!codec) { ++ GST_ELEMENT_ERROR(viddec, STREAM, CODEC_NOT_FOUND, ++ ("unable to find codec needed for stream"), (NULL)); ++ gst_object_unref(viddec); ++ return FALSE; ++ } ++ ++ /* Shut-down any running video decoder */ ++ if (!gst_tividdec_exit_video(viddec)) { ++ gst_object_unref(viddec); ++ return FALSE; ++ } ++ ++ /* Configure the element to use the detected engine name and codec, unless ++ * they have been using the set_property function. ++ */ ++ if (!viddec->engineName) { ++ viddec->engineName = codec->CE_EngineName; ++ } ++ if (!viddec->codecName) { ++ viddec->codecName = codec->CE_CodecName; ++ } ++ ++ gst_object_unref(viddec); ++ ++ GST_LOG("sink caps negotiation successful\n"); ++ return TRUE; ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_set_source_caps ++ * Negotiate our source pad capabilities. ++ ******************************************************************************/ ++static gboolean gst_tividdec_set_source_caps( ++ GstTIViddec *viddec, Buffer_Handle hBuf) ++{ ++ BufferGfx_Dimensions dim; ++ GstCaps *caps; ++ gboolean ret; ++ GstPad *pad; ++ char *string; ++ ++ pad = viddec->srcpad; ++ ++ /* Create a UYVY caps object using the dimensions from the given buffer */ ++ BufferGfx_getDimensions(hBuf, &dim); ++ ++ caps = ++ gst_caps_new_simple("video/x-raw-yuv", ++ "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC('U','Y','V','Y'), ++ "framerate", GST_TYPE_FRACTION, viddec->framerateNum, ++ viddec->framerateDen, ++ "width", G_TYPE_INT, dim.width, ++ "height", G_TYPE_INT, dim.height, ++ NULL); ++ ++ /* Set the source pad caps */ ++ string = gst_caps_to_string(caps); ++ GST_LOG("setting source caps to UYVY: %s", string); ++ g_free(string); ++ ret = gst_pad_set_caps(pad, caps); ++ gst_caps_unref(caps); ++ ++ return ret; ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_sink_event ++ * Perform event processing on the input stream. At the moment, this ++ * function isn't needed as this element doesn't currently perform any ++ * specialized event processing. We'll leave it in for now in case we need ++ * it later on. ++ ******************************************************************************/ ++static gboolean gst_tividdec_sink_event(GstPad *pad, GstEvent *event) ++{ ++ GstTIViddec *viddec; ++ gboolean ret; ++ ++ viddec = GST_TIVIDDEC(GST_OBJECT_PARENT(pad)); ++ ++ GST_DEBUG("pad \"%s\" received: %s\n", GST_PAD_NAME(pad), ++ GST_EVENT_TYPE_NAME(event)); ++ ++ switch (GST_EVENT_TYPE(event)) { ++ ++ case GST_EVENT_NEWSEGMENT: ++ /* if event format is byte then convert in time format */ ++ gst_ti_parse_newsegment(&event, viddec->segment, ++ &viddec->totalDuration, viddec->totalBytes); ++ ++ /* Propagate NEWSEGMENT to downstream elements */ ++ ret = gst_pad_push_event(viddec->srcpad, event); ++ break; ++ ++ case GST_EVENT_EOS: ++ /* end-of-stream: process any remaining encoded frame data */ ++ GST_LOG("no more input; draining remaining encoded video data\n"); ++ ++ if (!viddec->drainingEOS) { ++ gst_tividdec_drain_pipeline(viddec); ++ } ++ ++ /* Propagate EOS to downstream elements */ ++ ret = gst_pad_push_event(viddec->srcpad, event); ++ break; ++ ++ case GST_EVENT_FLUSH_STOP: ++ ret = gst_pad_push_event(viddec->srcpad, event); ++ break; ++ ++ /* Unhandled events */ ++ case GST_EVENT_BUFFERSIZE: ++ case GST_EVENT_CUSTOM_BOTH: ++ case GST_EVENT_CUSTOM_BOTH_OOB: ++ case GST_EVENT_CUSTOM_DOWNSTREAM: ++ case GST_EVENT_CUSTOM_DOWNSTREAM_OOB: ++ case GST_EVENT_CUSTOM_UPSTREAM: ++ case GST_EVENT_FLUSH_START: ++ case GST_EVENT_NAVIGATION: ++ case GST_EVENT_QOS: ++ case GST_EVENT_SEEK: ++ case GST_EVENT_TAG: ++ default: ++ ret = gst_pad_event_default(pad, event); ++ break; ++ ++ } ++ ++ return ret; ++ ++} ++ ++/****************************************************************************** ++ * gst_tividdec_chain ++ * This is the main processing routine. This function receives a buffer ++ * from the sink pad, processes it, and pushes the result to the source ++ * pad. ++ ******************************************************************************/ ++static GstFlowReturn gst_tividdec_chain(GstPad * pad, GstBuffer * buf) ++{ ++ GstTIViddec *viddec = GST_TIVIDDEC(GST_OBJECT_PARENT(pad)); ++ GstFlowReturn flow = GST_FLOW_OK; ++ gboolean checkResult; ++ ++ /* If the decode thread aborted, signal it to let it know it's ok to ++ * shut down, and communicate the failure to the pipeline. ++ */ ++ if (gst_tithread_check_status(viddec, TIThread_CODEC_ABORTED, ++ checkResult)) { ++ flow = GST_FLOW_UNEXPECTED; ++ goto exit; ++ } ++ ++ /* If our engine handle is currently NULL, then either this is our first ++ * buffer or the upstream element has re-negotiated our capabilities which ++ * resulted in our engine being closed. In either case, we need to ++ * initialize (or re-initialize) our video decoder to handle the new ++ * stream. ++ */ ++ if (viddec->hEngine == NULL) { ++ if (!gst_tividdec_init_video(viddec)) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, FAILED, ++ ("unable to initialize video\n"), (NULL)); ++ flow = GST_FLOW_UNEXPECTED; ++ goto exit; ++ } ++ ++ /* check if we have recieved buffer from qtdemuxer. To do this, ++ * we will verify if codec_data field has a valid avcC header. ++ */ ++ if (gst_is_h264_decoder(viddec->codecName) && ++ gst_h264_valid_quicktime_header(buf)) { ++ viddec->nal_length = gst_h264_get_nal_length(buf); ++ viddec->sps_pps_data = gst_h264_get_sps_pps_data(buf); ++ viddec->nal_code_prefix = gst_h264_get_nal_prefix_code(); ++ } ++ ++ GST_TICIRCBUFFER_TIMESTAMP(viddec->circBuf) = ++ GST_CLOCK_TIME_IS_VALID(GST_BUFFER_TIMESTAMP(buf)) ? ++ GST_BUFFER_TIMESTAMP(buf) : 0ULL; ++ } ++ ++ /* If demuxer has passed SPS and PPS NAL unit dump in codec_data field, ++ * then we have a packetized h264 stream. We need to transform this stream ++ * into byte-stream. ++ */ ++ if (viddec->sps_pps_data) { ++ if (gst_h264_parse_and_queue(viddec->circBuf, buf, ++ viddec->sps_pps_data, viddec->nal_code_prefix, ++ viddec->nal_length) < 0) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, WRITE, ++ ("Failed to queue input buffer into circular buffer\n"), (NULL)); ++ flow = GST_FLOW_UNEXPECTED; ++ goto exit; ++ } ++ } ++ else { ++ /* Queue up the encoded data stream into a circular buffer */ ++ if (!gst_ticircbuffer_queue_data(viddec->circBuf, buf)) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, WRITE, ++ ("Failed to queue input buffer into circular buffer\n"), (NULL)); ++ flow = GST_FLOW_UNEXPECTED; ++ goto exit; ++ } ++ } ++ ++exit: ++ gst_buffer_unref(buf); ++ return flow; ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_init_video ++ * Initialize or re-initializes the video stream ++ ******************************************************************************/ ++static gboolean gst_tividdec_init_video(GstTIViddec *viddec) ++{ ++ Rendezvous_Attrs rzvAttrs = Rendezvous_Attrs_DEFAULT; ++ struct sched_param schedParam; ++ pthread_attr_t attr; ++ ++ GST_LOG("begin init_video\n"); ++ ++ /* If video has already been initialized, shut down previous decoder */ ++ if (viddec->hEngine) { ++ if (!gst_tividdec_exit_video(viddec)) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, FAILED, ++ ("failed to shut down existing video decoder\n"), (NULL)); ++ return FALSE; ++ } ++ } ++ ++ /* Make sure we know what codec we're using */ ++ if (!viddec->engineName) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, FAILED, ++ ("engine name not specified\n"), (NULL)); ++ return FALSE; ++ } ++ ++ if (!viddec->codecName) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, FAILED, ++ ("codec name not specified\n"), (NULL)); ++ return FALSE; ++ } ++ ++ /* Initialize thread status management */ ++ viddec->threadStatus = 0UL; ++ pthread_mutex_init(&viddec->threadStatusMutex, NULL); ++ ++ /* Initialize rendezvous objects for making threads wait on conditions */ ++ viddec->waitOnDecodeThread = Rendezvous_create(2, &rzvAttrs); ++ viddec->waitOnDecodeDrain = Rendezvous_create(100, &rzvAttrs); ++ viddec->waitOnBufTab = Rendezvous_create(100, &rzvAttrs); ++ viddec->drainingEOS = FALSE; ++ ++ /* Initialize custom thread attributes */ ++ if (pthread_attr_init(&attr)) { ++ GST_WARNING("failed to initialize thread attrs\n"); ++ gst_tividdec_exit_video(viddec); ++ return FALSE; ++ } ++ ++ /* Force the thread to use the system scope */ ++ if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) { ++ GST_WARNING("failed to set scope attribute\n"); ++ gst_tividdec_exit_video(viddec); ++ return FALSE; ++ } ++ ++ /* Force the thread to use custom scheduling attributes */ ++ if (pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED)) { ++ GST_WARNING("failed to set schedule inheritance attribute\n"); ++ gst_tividdec_exit_video(viddec); ++ return FALSE; ++ } ++ ++ /* Set the thread to be fifo real time scheduled */ ++ if (pthread_attr_setschedpolicy(&attr, SCHED_FIFO)) { ++ GST_WARNING("failed to set FIFO scheduling policy\n"); ++ gst_tividdec_exit_video(viddec); ++ return FALSE; ++ } ++ ++ /* Set the display thread priority */ ++ schedParam.sched_priority = GstTIVideoThreadPriority; ++ if (pthread_attr_setschedparam(&attr, &schedParam)) { ++ GST_WARNING("failed to set scheduler parameters\n"); ++ return FALSE; ++ } ++ ++ /* Create decoder thread */ ++ if (pthread_create(&viddec->decodeThread, &attr, ++ gst_tividdec_decode_thread, (void*)viddec)) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, FAILED, ++ ("failed to create decode thread\n"), (NULL)); ++ gst_tividdec_exit_video(viddec); ++ return FALSE; ++ } ++ gst_tithread_set_status(viddec, TIThread_CODEC_CREATED); ++ ++ /* Destroy the custom thread attributes */ ++ if (pthread_attr_destroy(&attr)) { ++ GST_WARNING("failed to destroy thread attrs\n"); ++ gst_tividdec_exit_video(viddec); ++ return FALSE; ++ } ++ ++ /* Make sure circular buffer and display buffers are created by decoder ++ * thread. ++ */ ++ Rendezvous_meet(viddec->waitOnDecodeThread); ++ ++ if (viddec->circBuf == NULL || viddec->hOutBufTab == NULL) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, FAILED, ++ ("decode thread failed to create circular or display buffer handles\n"), ++ (NULL)); ++ return FALSE; ++ } ++ ++ GST_LOG("end init_video\n"); ++ return TRUE; ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_exit_video ++ * Shut down any running video decoder, and reset the element state. ++ ******************************************************************************/ ++static gboolean gst_tividdec_exit_video(GstTIViddec *viddec) ++{ ++ void* thread_ret; ++ gboolean checkResult; ++ ++ GST_LOG("begin exit_video\n"); ++ ++ /* Drain the pipeline if it hasn't already been drained */ ++ if (!viddec->drainingEOS) { ++ gst_tividdec_drain_pipeline(viddec); ++ } ++ ++ /* Shut down the decode thread */ ++ if (gst_tithread_check_status( ++ viddec, TIThread_CODEC_CREATED, checkResult)) { ++ GST_LOG("shutting down decode thread\n"); ++ ++ Rendezvous_force(viddec->waitOnDecodeThread); ++ if (pthread_join(viddec->decodeThread, &thread_ret) == 0) { ++ if (thread_ret == GstTIThreadFailure) { ++ GST_DEBUG("decode thread exited with an error condition\n"); ++ } ++ } ++ } ++ ++ /* Shut down thread status management */ ++ viddec->threadStatus = 0UL; ++ pthread_mutex_destroy(&viddec->threadStatusMutex); ++ ++ /* Shut-down any remaining items */ ++ if (viddec->waitOnDecodeDrain) { ++ Rendezvous_delete(viddec->waitOnDecodeDrain); ++ viddec->waitOnDecodeDrain = NULL; ++ } ++ ++ if (viddec->waitOnDecodeThread) { ++ Rendezvous_delete(viddec->waitOnDecodeThread); ++ viddec->waitOnDecodeThread = NULL; ++ } ++ ++ if (viddec->waitOnBufTab) { ++ Rendezvous_delete(viddec->waitOnBufTab); ++ viddec->waitOnBufTab = NULL; ++ } ++ ++ if (viddec->sps_pps_data) { ++ GST_LOG("freeing sps_pps buffers\n"); ++ gst_buffer_unref(viddec->sps_pps_data); ++ viddec->sps_pps_data = NULL; ++ } ++ ++ if (viddec->nal_code_prefix) { ++ GST_LOG("freeing nal code prefix buffers\n"); ++ gst_buffer_unref(viddec->nal_code_prefix); ++ viddec->nal_code_prefix = NULL; ++ } ++ ++ if (viddec->nal_length) { ++ GST_LOG("reseting nal length to zero\n"); ++ viddec->nal_length = 0; ++ } ++ ++ GST_LOG("end exit_video\n"); ++ return TRUE; ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_change_state ++ * Manage state changes for the video stream. The gStreamer documentation ++ * states that state changes must be handled in this manner: ++ * 1) Handle ramp-up states ++ * 2) Pass state change to base class ++ * 3) Handle ramp-down states ++ ******************************************************************************/ ++static GstStateChangeReturn gst_tividdec_change_state(GstElement *element, ++ GstStateChange transition) ++{ ++ GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; ++ GstTIViddec *viddec = GST_TIVIDDEC(element); ++ ++ GST_LOG("begin change_state (%d)\n", transition); ++ ++ /* Handle ramp-up state changes */ ++ switch (transition) { ++ case GST_STATE_CHANGE_NULL_TO_READY: ++ break; ++ default: ++ break; ++ } ++ ++ /* Pass state changes to base class */ ++ ret = GST_ELEMENT_CLASS(parent_class)->change_state(element, transition); ++ if (ret == GST_STATE_CHANGE_FAILURE) ++ return ret; ++ ++ /* Handle ramp-down state changes */ ++ switch (transition) { ++ case GST_STATE_CHANGE_READY_TO_NULL: ++ /* Shut down any running video decoder */ ++ if (!gst_tividdec_exit_video(viddec)) { ++ return GST_STATE_CHANGE_FAILURE; ++ } ++ break; ++ ++ case GST_STATE_CHANGE_READY_TO_PAUSED: ++ gst_segment_init (viddec->segment, GST_FORMAT_TIME); ++ break; ++ ++ case GST_STATE_CHANGE_PAUSED_TO_READY: ++ viddec->totalBytes = 0; ++ viddec->totalDuration = 0; ++ break; ++ ++ default: ++ break; ++ } ++ ++ GST_LOG("end change_state\n"); ++ return ret; ++} ++ ++/****************************************************************************** ++ * gst_tividdec2_codec_start ++ * Initialize codec engine ++ *****************************************************************************/ ++static gboolean gst_tividdec_codec_start (GstTIViddec *viddec) ++{ ++ VIDDEC_Params params = Vdec_Params_DEFAULT; ++ VIDDEC_DynamicParams dynParams = Vdec_DynamicParams_DEFAULT; ++ BufferGfx_Attrs gfxAttrs = BufferGfx_Attrs_DEFAULT; ++ ++ /* Open the codec engine */ ++ GST_LOG("opening codec engine \"%s\"\n", viddec->engineName); ++ viddec->hEngine = Engine_open((Char *) viddec->engineName, NULL, NULL); ++ ++ if (viddec->hEngine == NULL) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, FAILED, ++ ("failed to open codec engine \"%s\"\n", viddec->engineName), (NULL)); ++ return FALSE; ++ } ++ ++ /* Initialize video decoder */ ++ params.forceChromaFormat = XDM_YUV_422ILE; ++ params.maxWidth = VideoStd_D1_WIDTH; ++ params.maxHeight = VideoStd_D1_PAL_HEIGHT; ++ ++ GST_LOG("opening video decoder \"%s\"\n", viddec->codecName); ++ viddec->hVd = Vdec_create(viddec->hEngine, (Char*)viddec->codecName, ++ ¶ms, &dynParams); ++ ++ if (viddec->hVd == NULL) { ++ GST_ELEMENT_ERROR(viddec, STREAM, CODEC_NOT_FOUND, ++ ("failed to create video decoder: %s\n", viddec->codecName), (NULL)); ++ GST_LOG("closing codec engine\n"); ++ return FALSE; ++ } ++ ++ /* Create a circular input buffer */ ++ viddec->circBuf = ++ gst_ticircbuffer_new(Vdec_getInBufSize(viddec->hVd), 3, FALSE); ++ ++ if (viddec->circBuf == NULL) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, NO_SPACE_LEFT, ++ ("failed to create circular input buffer\n"), (NULL)); ++ return FALSE; ++ } ++ ++ /* Display buffer contents if displayBuffer=TRUE was specified */ ++ gst_ticircbuffer_set_display(viddec->circBuf, viddec->displayBuffer); ++ ++ /* Define the number of display buffers to allocate. This number must be ++ * at least 2, but should be more if codecs don't return a display buffer ++ * after every process call. If this has not been set via set_property(), ++ * default to 3 output buffers. ++ */ ++ if (viddec->numOutputBufs == 0) { ++ viddec->numOutputBufs = 3; ++ } ++ ++ /* Create codec output buffers */ ++ GST_LOG("creating output buffer table\n"); ++ gfxAttrs.colorSpace = ColorSpace_UYVY; ++ gfxAttrs.dim.width = params.maxWidth; ++ gfxAttrs.dim.height = params.maxHeight; ++ gfxAttrs.dim.lineLength = BufferGfx_calcLineLength( ++ gfxAttrs.dim.width, gfxAttrs.colorSpace); ++ ++ /* By default, new buffers are marked as in-use by the codec */ ++ gfxAttrs.bAttrs.useMask = gst_tividdec_CODEC_FREE; ++ ++ viddec->hOutBufTab = ++ BufTab_create(viddec->numOutputBufs, Vdec_getOutBufSize(viddec->hVd), ++ BufferGfx_getBufferAttrs(&gfxAttrs)); ++ ++ if (viddec->hOutBufTab == NULL) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, NO_SPACE_LEFT, ++ ("failed to create output buffers\n"), (NULL)); ++ return FALSE; ++ } ++ ++ /* Tell the Vdec module that hOutBufTab will be used for display buffers */ ++ Vdec_setBufTab(viddec->hVd, viddec->hOutBufTab); ++ ++ return TRUE; ++} ++ ++/****************************************************************************** ++ * gst_tividdec2_codec_stop ++ * Release codec engine resources ++ *****************************************************************************/ ++static gboolean gst_tividdec_codec_stop (GstTIViddec *viddec) ++{ ++ /* Shut down remaining items */ ++ if (viddec->circBuf) { ++ GstTICircBuffer *circBuf; ++ ++ GST_LOG("freeing cicrular input buffer\n"); ++ ++ circBuf = viddec->circBuf; ++ viddec->circBuf = NULL; ++ viddec->framerateNum = 0; ++ viddec->framerateDen = 0; ++ gst_ticircbuffer_unref(circBuf); ++ } ++ ++ if (viddec->hOutBufTab) { ++ ++ /* Re-claim all output buffers that were pushed downstream, and then ++ * delete the BufTab. ++ */ ++ gst_ti_reclaim_buffers(viddec->hOutBufTab); ++ ++ GST_LOG("freeing output buffers\n"); ++ BufTab_delete(viddec->hOutBufTab); ++ viddec->hOutBufTab = NULL; ++ } ++ ++ if (viddec->hVd) { ++ GST_LOG("closing video decoder\n"); ++ Vdec_delete(viddec->hVd); ++ viddec->hVd = NULL; ++ } ++ ++ if (viddec->hEngine) { ++ GST_LOG("closing codec engine\n"); ++ Engine_close(viddec->hEngine); ++ viddec->hEngine = NULL; ++ } ++ ++ return TRUE; ++} ++ ++/****************************************************************************** ++ * gst_tividdec_decode_thread ++ * Call the video codec to process a full input buffer ++ ******************************************************************************/ ++static void* gst_tividdec_decode_thread(void *arg) ++{ ++ GstTIViddec *viddec = GST_TIVIDDEC(gst_object_ref(arg)); ++ GstBuffer *encDataWindow = NULL; ++ Buffer_Attrs bAttrs = Buffer_Attrs_DEFAULT; ++ gboolean codecFlushed = FALSE; ++ void *threadRet = GstTIThreadSuccess; ++ Buffer_Handle hDummyInputBuf = NULL; ++ Buffer_Handle hDstBuf; ++ Int32 encDataConsumed; ++ GstClockTime encDataTime; ++ GstClockTime frameDuration; ++ Buffer_Handle hEncDataWindow; ++ GstBuffer *outBuf; ++ Int bufIdx; ++ Int ret; ++ ++ GST_LOG("init video decode_thread \n"); ++ ++ /* Initialize codec engine */ ++ ret = gst_tividdec_codec_start(viddec); ++ ++ /* Notify main thread that is ok to continue initialization */ ++ Rendezvous_meet(viddec->waitOnDecodeThread); ++ Rendezvous_reset(viddec->waitOnDecodeThread); ++ ++ if (ret == FALSE) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, FAILED, ++ ("failed to start codec\n"), (NULL)); ++ goto thread_exit; ++ } ++ ++ /* Calculate the duration of a single frame in this stream */ ++ frameDuration = gst_tividdec_frame_duration(viddec); ++ ++ /* Main thread loop */ ++ while (TRUE) { ++ ++ /* Obtain an encoded data frame */ ++ encDataWindow = gst_ticircbuffer_get_data(viddec->circBuf); ++ encDataTime = GST_BUFFER_TIMESTAMP(encDataWindow); ++ hEncDataWindow = GST_TIDMAIBUFFERTRANSPORT_DMAIBUF(encDataWindow); ++ ++ /* If we received a data frame of zero size, there is no more data to ++ * process -- exit the thread. If we weren't told that we are ++ * draining the pipeline, something is not right, so exit with an ++ * error. ++ */ ++ if (GST_BUFFER_SIZE(encDataWindow) == 0) { ++ GST_LOG("no video data remains\n"); ++ if (!viddec->drainingEOS) { ++ goto thread_failure; ++ } ++ ++ /* When no input remains, we must flush any remaining display ++ * frames out of the codec and push them to the sink. ++ */ ++ if (!codecFlushed) { ++ Vdec_flush(viddec->hVd); ++ ++ /* Create a dummy input dummy buffer for the process call. ++ * After a flush the codec ignores the input buffer, but since ++ * Codec Engine still address translates the buffer, it needs ++ * to exist. ++ */ ++ hEncDataWindow = hDummyInputBuf = Buffer_create(1, &bAttrs); ++ Buffer_setNumBytesUsed(hDummyInputBuf, 1); ++ codecFlushed = TRUE; ++ } ++ else { ++ Buffer_delete(hDummyInputBuf); ++ goto thread_exit; ++ } ++ } ++ ++ /* Obtain a free output buffer for the decoded data */ ++ /* If we are not able to find free buffer from BufTab then decoder ++ * thread will be blocked on waitOnBufTab rendezvous. And this will be ++ * woke-up by dmaitransportbuffer finalize method. ++ */ ++ hDstBuf = BufTab_getFreeBuf(viddec->hOutBufTab); ++ if (hDstBuf == NULL) { ++ GST_LOG("Failed to get free buffer, waiting on bufTab\n"); ++ Rendezvous_meet(viddec->waitOnBufTab); ++ hDstBuf = BufTab_getFreeBuf(viddec->hOutBufTab); ++ ++ if (hDstBuf == NULL) { ++ GST_ELEMENT_ERROR(viddec, RESOURCE, READ, ++ ("failed to get a free contiguous buffer from BufTab\n"), ++ (NULL)); ++ goto thread_failure; ++ } ++ } ++ ++ /* Reset waitOnBufTab rendezvous handle to its orignal state */ ++ Rendezvous_reset(viddec->waitOnBufTab); ++ ++ /* Make sure the whole buffer is used for output */ ++ BufferGfx_resetDimensions(hDstBuf); ++ ++ /* Invoke the video decoder */ ++ GST_LOG("invoking the video decoder\n"); ++ ret = Vdec_process(viddec->hVd, hEncDataWindow, hDstBuf); ++ encDataConsumed = (codecFlushed) ? 0 : ++ Buffer_getNumBytesUsed(hEncDataWindow); ++ ++ if (ret < 0) { ++ GST_ELEMENT_ERROR(viddec, STREAM, DECODE, ++ ("failed to decode video buffer\n"), (NULL)); ++ goto thread_failure; ++ } ++ ++ /* If no encoded data was used we cannot find the next frame */ ++ if (ret == Dmai_EBITERROR && encDataConsumed == 0 && !codecFlushed) { ++ GST_ELEMENT_ERROR(viddec, STREAM, DECODE, ++ ("fatal bit error\n"), (NULL)); ++ goto thread_failure; ++ } ++ ++ if (ret > 0) { ++ GST_LOG("Vdec_process returned success code %d\n", ret); ++ } ++ ++ /* Release the reference buffer, and tell the circular buffer how much ++ * data was consumed. ++ */ ++ ret = gst_ticircbuffer_data_consumed(viddec->circBuf, encDataWindow, ++ encDataConsumed); ++ encDataWindow = NULL; ++ ++ if (!ret) { ++ goto thread_failure; ++ } ++ ++ /* Obtain the display buffer returned by the codec (it may be a ++ * different one than the one we passed it. ++ */ ++ hDstBuf = Vdec_getDisplayBuf(viddec->hVd); ++ ++ /* Increment total bytes recieved */ ++ viddec->totalBytes += encDataConsumed; ++ ++ /* If we were given back decoded frame, push it to the source pad */ ++ while (hDstBuf) { ++ ++ /* Set the source pad capabilities based on the decoded frame ++ * properties. ++ */ ++ gst_tividdec_set_source_caps(viddec, hDstBuf); ++ ++ /* Create a DMAI transport buffer object to carry a DMAI buffer to ++ * the source pad. The transport buffer knows how to release the ++ * buffer for re-use in this element when the source pad calls ++ * gst_buffer_unref(). ++ */ ++ outBuf = gst_tidmaibuffertransport_new(hDstBuf, ++ viddec->waitOnBufTab); ++ gst_buffer_set_data(outBuf, GST_BUFFER_DATA(outBuf), ++ gst_ti_correct_display_bufSize(hDstBuf)); ++ gst_buffer_set_caps(outBuf, GST_PAD_CAPS(viddec->srcpad)); ++ ++ /* Set output buffer timestamp */ ++ if (viddec->genTimeStamps) { ++ GST_BUFFER_TIMESTAMP(outBuf) = viddec->totalDuration; ++ GST_BUFFER_DURATION(outBuf) = frameDuration; ++ viddec->totalDuration += GST_BUFFER_DURATION(outBuf); ++ } ++ else { ++ GST_BUFFER_TIMESTAMP(outBuf) = GST_CLOCK_TIME_NONE; ++ } ++ ++ /* Tell circular buffer how much time we consumed */ ++ gst_ticircbuffer_time_consumed(viddec->circBuf, frameDuration); ++ ++ /* Push the transport buffer to the source pad */ ++ GST_LOG("pushing buffer to source pad with timestamp : %" ++ GST_TIME_FORMAT ", duration: %" GST_TIME_FORMAT, ++ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP(outBuf)), ++ GST_TIME_ARGS (GST_BUFFER_DURATION(outBuf))); ++ ++ if (gst_pad_push(viddec->srcpad, outBuf) != GST_FLOW_OK) { ++ GST_DEBUG("push to source pad failed\n"); ++ goto thread_failure; ++ } ++ ++ /* Release buffers no longer in use by the codec */ ++ Buffer_freeUseMask(hDstBuf, gst_tividdec_CODEC_FREE); ++ ++ hDstBuf = Vdec_getDisplayBuf(viddec->hVd); ++ } ++ } ++ ++thread_failure: ++ ++ gst_tithread_set_status(viddec, TIThread_CODEC_ABORTED); ++ gst_ticircbuffer_consumer_aborted(viddec->circBuf); ++ threadRet = GstTIThreadFailure; ++ ++thread_exit: ++ ++ /* Re-claim any buffers owned by the codec */ ++ bufIdx = BufTab_getNumBufs(viddec->hOutBufTab); ++ ++ while (bufIdx-- > 0) { ++ Buffer_Handle hBuf = BufTab_getBuf(viddec->hOutBufTab, bufIdx); ++ Buffer_freeUseMask(hBuf, gst_tividdec_CODEC_FREE); ++ } ++ ++ /* Release the last buffer we retrieved from the circular buffer */ ++ if (encDataWindow) { ++ gst_ticircbuffer_data_consumed(viddec->circBuf, encDataWindow, 0); ++ } ++ ++ /* We have to wait to shut down this thread until we can guarantee that ++ * no more input buffers will be queued into the circular buffer ++ * (we're about to delete it). ++ */ ++ Rendezvous_meet(viddec->waitOnDecodeThread); ++ Rendezvous_reset(viddec->waitOnDecodeThread); ++ ++ /* Notify main thread that we are done draining before we shutdown the ++ * codec, or we will hang. We proceed in this order so the EOS event gets ++ * propagated downstream before we attempt to shut down the codec. The ++ * codec-shutdown process will block until all BufTab buffers have been ++ * released, and downstream-elements may hang on to buffers until ++ * they get the EOS. ++ */ ++ Rendezvous_force(viddec->waitOnDecodeDrain); ++ ++ /* Stop codec engine */ ++ if (gst_tividdec_codec_stop(viddec) < 0) { ++ GST_ERROR("failed to stop codec\n"); ++ } ++ ++ gst_object_unref(viddec); ++ ++ GST_LOG("exit video decode_thread (%d)\n", (int)threadRet); ++ return threadRet; ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_drain_pipeline ++ * Wait for the decode thread to finish processing queued input data. ++ ******************************************************************************/ ++static void gst_tividdec_drain_pipeline(GstTIViddec *viddec) ++{ ++ gboolean checkResult; ++ ++ /* If the decode thread hasn't been created, there is nothing to drain */ ++ if (!gst_tithread_check_status( ++ viddec, TIThread_CODEC_CREATED, checkResult)) { ++ return; ++ } ++ ++ viddec->drainingEOS = TRUE; ++ gst_ticircbuffer_drain(viddec->circBuf, TRUE); ++ ++ /* Tell the decode thread that it is ok to shut down */ ++ Rendezvous_force(viddec->waitOnDecodeThread); ++ ++ /* Wait for the decoder to finish draining */ ++ Rendezvous_meet(viddec->waitOnDecodeDrain); ++} ++ ++ ++/****************************************************************************** ++ * gst_tividdec_frame_duration ++ * Return the duration of a single frame in nanoseconds. ++ ******************************************************************************/ ++static GstClockTime gst_tividdec_frame_duration(GstTIViddec *viddec) ++{ ++ /* Default to 29.97 if the frame rate was not specified */ ++ if (viddec->framerateNum == 0 && viddec->framerateDen == 0) { ++ GST_WARNING("framerate not specified; using 29.97fps"); ++ viddec->framerateNum = 30000; ++ viddec->framerateDen = 1001; ++ } ++ ++ return (GstClockTime) ++ ((1 / ((gdouble)viddec->framerateNum/(gdouble)viddec->framerateDen)) ++ * GST_SECOND); ++} ++ ++ ++/****************************************************************************** ++ * Custom ViM Settings for editing this file ++ ******************************************************************************/ ++#if 0 ++ Tabs (use 4 spaces for indentation) ++ vim:set tabstop=4: /* Use 4 spaces for tabs */ ++ vim:set shiftwidth=4: /* Use 4 spaces for >> operations */ ++ vim:set expandtab: /* Expand tabs into white spaces */ ++#endif +diff -rupN a/src/gsttividenc1.c b/src/gsttividenc1.c +--- a/src/gsttividenc1.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gsttividenc1.c 2010-09-16 12:44:32.000000000 -0700 +@@ -129,6 +129,11 @@ static GstStaticPadTemplate sink_factory + "framerate=(fraction)[ 0, MAX ], " + "width=(int)[ 1, MAX ], " + "height=(int)[ 1, MAX ];" ++ "video/x-raw-yuv, " /* NV16 - YUV422 semi planar */ ++ "format=(fourcc)NV16, " ++ "framerate=(fraction)[ 0, MAX ], " ++ "width=(int)[ 1, MAX ], " ++ "height=(int)[ 1, MAX ];" + "video/x-raw-yuv, " /* NV12 - YUV420 semi planar */ + "format=(fourcc)NV12, " + "framerate=(fraction)[ 0, MAX ], " +@@ -286,7 +291,7 @@ static void gst_tividenc1_class_init(Gst + + g_object_class_install_property(gobject_class, PROP_IN_COLORSPACE, + g_param_spec_string("iColorSpace", "Input colorspace", +- "Input color space (UYVY, Y8C8 or NV12)", ++ "Input color space (UYVY, Y8C8, NV16 or NV12)", + "unspecified", G_PARAM_READWRITE)); + + g_object_class_install_property(gobject_class, PROP_BITRATE, +@@ -435,6 +440,8 @@ static ColorSpace_Type gst_tividenc1_fin + { + if (!strcmp(colorSpace, "UYVY")) + return ColorSpace_UYVY; ++ else if (!strcmp(colorSpace, "NV16")) ++ return ColorSpace_YUV422PSEMI; + else if (!strcmp(colorSpace, "Y8C8")) + return ColorSpace_YUV422PSEMI; + else if (!strcmp(colorSpace, "NV12")) +@@ -634,6 +641,7 @@ static gboolean gst_tividenc1_set_sink_c + videnc1->colorSpace = ColorSpace_UYVY; + break; + ++ case GST_MAKE_FOURCC('N', 'V', '1', '6'): + case GST_MAKE_FOURCC('Y', '8', 'C', '8'): + videnc1->colorSpace = ColorSpace_YUV422PSEMI; + break; +@@ -685,11 +693,14 @@ static gboolean gst_tividenc1_set_source + gboolean ret; + GstPad *pad; + char *string; +- GstTICodec *h264Codec = NULL, *mpeg4Codec = NULL; +- ++ GstTICodec *h264Codec = NULL; ++ GstTICodec *mpeg4Codec = NULL; ++ GstTICodec *mpeg2Codec = NULL; ++ + h264Codec = gst_ticodec_get_codec("H.264 Video Encoder"); + mpeg4Codec = gst_ticodec_get_codec("MPEG4 Video Encoder"); +- ++ mpeg2Codec = gst_ticodec_get_codec("MPEG2 Video Encoder"); ++ + pad = videnc1->srcpad; + + /* Create a video caps object using the dimensions from the given buffer */ +@@ -728,6 +739,25 @@ static gboolean gst_tividenc1_set_source + g_free(string); + } + ++ /* Create MPEG-2 source cap */ ++ if (mpeg2Codec && (!strcmp(mpeg2Codec->CE_CodecName, videnc1->codecName))) { ++ gint mpegversion = 2; ++ ++ caps = ++ gst_caps_new_simple("video/mpeg", ++ "mpegversion", G_TYPE_INT, mpegversion, ++ "framerate", GST_TYPE_FRACTION, videnc1->framerateNum, ++ videnc1->framerateDen, ++ "width", G_TYPE_INT, dim.width, ++ "height", G_TYPE_INT, dim.height, ++ NULL); ++ ++ string = gst_caps_to_string(caps); ++ GST_LOG("setting source caps to mpeg2: %s", string); ++ g_free(string); ++ } ++ ++ + /* Set the source pad caps */ + ret = gst_pad_set_caps(pad, caps); + gst_caps_unref(caps); +@@ -1438,6 +1468,12 @@ static gboolean gst_tividenc1_codec_star + #if defined(Platform_omap3530) + case Cpu_Device_OMAP3530: + #endif ++ #if defined(Platform_omapl138) ++ case Cpu_Device_OMAPL138: ++ #endif ++ #if defined(Platform_omapl137) ++ case Cpu_Device_OMAPL137: ++ #endif + case Cpu_Device_DM6446: + params.inputChromaFormat = XDM_YUV_422ILE; + break; +diff -rupN a/src/gsttividresize.c b/src/gsttividresize.c +--- a/src/gsttividresize.c 2009-10-29 15:01:23.000000000 -0700 ++++ b/src/gsttividresize.c 2010-09-16 12:25:09.000000000 -0700 +@@ -90,6 +90,7 @@ static GstStaticPadTemplate sink_factory + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ( GST_VIDEO_CAPS_YUV("UYVY")";" ++ GST_VIDEO_CAPS_YUV("NV16")";" + GST_VIDEO_CAPS_YUV("Y8C8")";" + GST_VIDEO_CAPS_YUV("NV12") + ) +@@ -101,6 +102,7 @@ static GstStaticPadTemplate src_factory + GST_PAD_ALWAYS, + GST_STATIC_CAPS + ( GST_VIDEO_CAPS_YUV("UYVY")";" ++ GST_VIDEO_CAPS_YUV("NV16")";" + GST_VIDEO_CAPS_YUV("Y8C8")";" + GST_VIDEO_CAPS_YUV("NV12") + ) +@@ -583,6 +585,7 @@ static GstCaps * gst_tividresize_transfo + int i; + static const guint32 supported_fmt[] = { + GST_MAKE_FOURCC('U','Y','V','Y'), ++ GST_MAKE_FOURCC('N','V','1','6'), + GST_MAKE_FOURCC('Y','8','C','8'), + GST_MAKE_FOURCC('N','V','1','2'), + }; +@@ -649,6 +652,7 @@ ColorSpace_Type gst_tividresize_get_colo + switch (fourcc) { + case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): + return ColorSpace_UYVY; ++ case GST_MAKE_FOURCC('N', 'V', '1', '6'): + case GST_MAKE_FOURCC('Y', '8', 'C', '8'): + return ColorSpace_YUV422PSEMI; + case GST_MAKE_FOURCC('N', 'V', '1', '2'): +diff -rupN a/src/Makefile.am b/src/Makefile.am +--- a/src/Makefile.am 2009-10-20 13:15:34.000000000 -0700 ++++ b/src/Makefile.am 2010-09-16 12:48:03.000000000 -0700 +@@ -1,6 +1,6 @@ + # plugindir is set in configure + +-XDC_CONFIG_BASENAME = gstticodecplugin_$(PLATFORM) ++XDC_CONFIG_BASENAME = gstticodecplugin_$(GST_TI_PLATFORM) + plugin_LTLIBRARIES = libgstticodecplugin.la + + # sources used to compile this plug-in +@@ -21,7 +21,7 @@ BUILT_SOURCES = $(XDC_CONFIG_BASENAME)/c + XDC_PATH = .;$(XDC_INSTALL_DIR)/packages;$(LINK_INSTALL_DIR)/packages;$(FC_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/packages;$(XDAIS_INSTALL_DIR)/packages;$(CODEC_INSTALL_DIR)/packages;$(CMEM_INSTALL_DIR)/packages;$(DMAI_INSTALL_DIR)/packages;$(LPM_INSTALL_DIR)/packages;$(XDC_USER_PATH);$(EDMA3_LLD_INSTALL_DIR)/packages; + + gstticodecs_platform.c : +- ln -s $(srcdir)/gstticodecs_$(PLATFORM).c gstticodecs_platform.c ++ ln -s $(srcdir)/gstticodecs_$(GST_TI_PLATFORM).c gstticodecs_platform.c + + %/compiler.opt %/linker.cmd : %.cfg + XDCPATH="$(XDC_PATH)" $(CONFIGURO) -c $(MVTOOL_DIR) -o $(XDC_CONFIG_BASENAME) -t $(XDC_TARGET) -p $(XDC_PLATFORM) -b $(DMAI_INSTALL_DIR)/packages/config.bld $< diff --git a/package/ti/ti-gst-plugin/ti-gst-plugin.mk b/package/ti/ti-gst-plugin/ti-gst-plugin.mk new file mode 100644 index 0000000..170e402 --- /dev/null +++ b/package/ti/ti-gst-plugin/ti-gst-plugin.mk @@ -0,0 +1,87 @@ +################################################################################ +# +# ti-gst-plugin +# +################################################################################ + +TI_GST_PLUGIN_VERSION:=1.01.00 +TI_GST_PLUGIN_SOURCE:=gst-ti-plugin-minimal-$(TI_GST_PLUGIN_VERSION).tar.gz +TI_GST_PLUGIN_SITE:=https://gforge.ti.com/gf/download/frsrelease/211/2821/ +TI_GST_PLUGIN_DIR:=$(BUILD_DIR)/gst-ti-plugin-minimal-$(TI_GST_PLUGIN_VERSION) + +TI_GST_PLUGIN_LIBTOOL_PATCH = NO +TI_GST_PLUGIN_DEPENDENCIES = gstreamer gst-plugins-base + +TI_GST_PLUGIN_PLATFORM=UNDEFINED +TI_GST_PLUGIN_XDC_PLATFORM=UNDEFINED +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omap3),y) + TI_GST_PLUGIN_PLATFORM=omap3530 + TI_GST_PLUGIN_XDC_PLATFORM=ti.platforms.evm3530 + TI_GST_PLUGIN_DEPENDENCIES += ti-codecs-omap3 ti-dmai + TI_GST_PLUGIN_ENV = \ + PLATFORM=$(TI_GST_PLUGIN_PLATFORM) \ + GST_TI_PLATFORM=$(TI_GST_PLUGIN_PLATFORM) \ + XDC_PLATFORM=$(TI_GST_PLUGIN_XDC_PLATFORM) \ + XDC_TARGET="gnu.targets.arm.GCArmv5T" \ + CROSS_COMPILE=$(TARGET_CROSS) \ + MVTOOL_DIR=$(dir $(TARGET_CROSS)) \ + LINK_XDC_ROOT=$(TI_DSPLINK_INSTALL_STAGING_DIR) \ + CODEC_SERVER=$(TI_CODECS_OMAP3_INSTALL_TARGET_DIR)/cs.x64P \ + XDC_INSTALL_DIR=$(TI_XDCTOOLS_INSTALL_DIR) \ + LINK_INSTALL_DIR=$(TI_DSPLINK_INSTALL_STAGING_DIR)/.. \ + FC_INSTALL_DIR=$(TI_FRAMEWORK_COMPONENTS_INSTALL_DIR) \ + CE_INSTALL_DIR=$(TI_CODEC_ENGINE_DIR) \ + XDAIS_INSTALL_DIR=$(TI_XDAIS_INSTALL_DIR) \ + CMEM_INSTALL_DIR=$(TI_LINUXUTILS_INSTALL_STAGING_DIR) \ + DMAI_INSTALL_DIR=$(TI_DMAI_INSTALL_STAGING_DIR)/dmai \ + LPM_INSTALL_DIR=$(TI_LOCAL_POWER_MANAGER_INSTALL_STAGING_DIR) \ + EDMA3_LLD_INSTALL_DIR=$(TI_EDMA3LLD_INSTALL_DIR) \ + CODEC_INSTALL_DIR=$(TI_CODECS_OMAP3_INSTALL_STAGING_DIR) \ + BIOSUTILS_INSTALL_DIR=$(TI_BIOSUTILS_INSTALL_DIR) \ + CFLAGS="$(TARGET_CFLAGS)" \ + LINUXKERNEL_INSTALL_DIR=$(BUILD_DIR)/linux-$(LINUX26_VERSION) +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm365),y) + TI_GST_PLUGIN_PLATFORM=dm365 + TI_GST_PLUGIN_XDC_PLATFORM=ti.platforms.evmDM365 + TI_GST_PLUGIN_DEPENDENCIES += ti-dvsdk-dm365 + TI_GST_PLUGIN_ENV = \ + PLATFORM=$(TI_GST_PLUGIN_PLATFORM) \ + GST_TI_PLATFORM=$(TI_GST_PLUGIN_PLATFORM) \ + XDC_PLATFORM=$(TI_GST_PLUGIN_XDC_PLATFORM) \ + XDC_TARGET="gnu.targets.arm.GCArmv5T" \ + CROSS_COMPILE=$(TARGET_CROSS) \ + MVTOOL_DIR=$(dir $(TARGET_CROSS))/.. \ + LINK_XDC_ROOT=$(TI_DVSDK_DM365_DM365MM_MODULE_INSTALL_DIR) \ + CODEC_SERVER=/usr/lib/ti-codecs\ + XDC_INSTALL_DIR=$(TI_DVSDK_DM365_XDC_INSTALL_DIR) \ + LINK_INSTALL_DIR=$(TI_DVSDK_DM365_DM365MM_MODULE_INSTALL_DIR)\ + FC_INSTALL_DIR=$(TI_DVSDK_DM365_FC_INSTALL_DIR) \ + CE_INSTALL_DIR=$(TI_DVSDK_DM365_CE_INSTALL_DIR) \ + XDAIS_INSTALL_DIR=$(TI_DVSDK_DM365_XDAIS_INSTALL_DIR) \ + CMEM_INSTALL_DIR=$(TI_DVSDK_DM365_LINUXUTILS_INSTALL_DIR) \ + DMAI_INSTALL_DIR=$(TI_DVSDK_DM365_DMAI_INSTALL_DIR) \ + LPM_INSTALL_DIR=$(TI_DVSDK_DM365_DM365MM_MODULE_INSTALL_DIR) \ + EDMA3_LLD_INSTALL_DIR=$(TI_EDMA3LLD_INSTALL_DIR) \ + CODEC_INSTALL_DIR=$(TI_DVSDK_DM365_CODEC_INSTALL_DIR) \ + BIOSUTILS_INSTALL_DIR= \ + CFLAGS="$(TARGET_CFLAGS)" \ + LINUXKERNEL_INSTALL_DIR=$(BUILD_DIR)/linux-$(LINUX26_VERSION) +endif + + +TI_GST_PLUGIN_CONF_ENV+=$(TI_GST_PLUGIN_ENV) +TI_GST_PLUGIN_MAKE_ENV+=$(TI_GST_PLUGIN_ENV) CPPFLAGS='-DPlatform_$(TI_GST_PLUGIN_PLATFORM)' + +define TI_GST_PLUGIN_AUTOGEN + (cd $(TI_GST_PLUGIN_DIR); \ + chmod +x ./autogen.sh; \ + chmod +x ./gst-autogen.sh; \ + $(HOST_CONFIGURE_OPTS) AUTOGEN_CONFIGURE_ARGS=--version ./autogen.sh; \ + $(HOST_CONFIGURE_OPTS) AUTOGEN_CONFIGURE_ARGS=--version ./gst-autogen.sh \ + ) +endef + +TI_GST_PLUGIN_POST_PATCH_HOOKS+=TI_GST_PLUGIN_AUTOGEN + +$(eval $(call AUTOTARGETS,package/ti,ti-gst-plugin)) -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 14/17] TI's MFP Linux utils 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (12 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 13/17] GStreamer Plugin (gstreamer-ti) for TI ARM/DSP processors Pierre-Luc Simard @ 2010-09-17 17:59 ` Pierre-Luc Simard 2010-09-17 18:00 ` [Buildroot] [PATCH 15/17] TI's Local Power Manager (LPM) Pierre-Luc Simard ` (3 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 17:59 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-linuxutils/Config.in | 8 +++ .../ti-linuxutils/ti-linuxutils-irqk_kmalloc.patch | 14 +++++ package/ti/ti-linuxutils/ti-linuxutils.mk | 61 ++++++++++++++++++++ 4 files changed, 84 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-linuxutils/Config.in create mode 100644 package/ti/ti-linuxutils/ti-linuxutils-irqk_kmalloc.patch create mode 100644 package/ti/ti-linuxutils/ti-linuxutils.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index 8e47e57..7ede23a 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -41,6 +41,7 @@ comment "Target components" source "package/ti/ti-codecs-omap3/Config.in" source "package/ti/ti-dsplink/Config.in" source "package/ti/ti-gst-plugin/Config.in" +source "package/ti/ti-linuxutils/Config.in" comment "Staging tools" source "package/ti/ti-biosutils/Config.in" diff --git a/package/ti/ti-linuxutils/Config.in b/package/ti/ti-linuxutils/Config.in new file mode 100644 index 0000000..c1872d8 --- /dev/null +++ b/package/ti/ti-linuxutils/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_TI_LINUXUTILS + bool "MFP Linux utils" + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + help + MFP Linux utils for TI ARM/DSP processors (a.k.a. ti-linuxutils). + You will need to add a startup script to load the different kernel + modules (cmemk,sdmak,etc.) manually as it is different for each platform + and usage. diff --git a/package/ti/ti-linuxutils/ti-linuxutils-irqk_kmalloc.patch b/package/ti/ti-linuxutils/ti-linuxutils-irqk_kmalloc.patch new file mode 100644 index 0000000..5b65104 --- /dev/null +++ b/package/ti/ti-linuxutils/ti-linuxutils-irqk_kmalloc.patch @@ -0,0 +1,14 @@ +diff -rupN a/packages/ti/sdo/linuxutils/irq/src/module/irqk.c b/packages/ti/sdo/linuxutils/irq/src/module/irqk.c +--- a/packages/ti/sdo/linuxutils/irq/src/module/irqk.c 2010-07-22 15:28:20.000000000 -0700 ++++ b/packages/ti/sdo/linuxutils/irq/src/module/irqk.c 2010-09-09 05:57:44.663063814 -0700 +@@ -56,6 +56,10 @@ + #include <mach/mux.h> + #endif /* defined(LSP_210) */ + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34) ++#include <linux/slab.h> ++#endif ++ + + #include "irqk.h" + diff --git a/package/ti/ti-linuxutils/ti-linuxutils.mk b/package/ti/ti-linuxutils/ti-linuxutils.mk new file mode 100644 index 0000000..f520c7a --- /dev/null +++ b/package/ti/ti-linuxutils/ti-linuxutils.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# ti-linuxutils +# +################################################################################ +TI_LINUXUTILS_VERSION:=2.25.05.11 +TI_LINUXUTILS_FILE_VERSION:=2_25_05_11 +TI_LINUXUTILS_SOURCE = linuxutils_$(TI_LINUXUTILS_FILE_VERSION).tar.gz +TI_LINUXUTILS_SITE = http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/linuxutils/$(TI_LINUXUTILS_FILE_VERSION)/exports +TI_LINUXUTILS_DIR:=$(BUILD_DIR)/ti-linuxutils-$(TI_LINUXUTILS_VERSION) + +TI_LINUXUTILS_INSTALL_STAGING = YES + +TI_LINUXUTILS_INSTALL_STAGING_DIR=$(STAGING_DIR)/ti/linuxutils-$(TI_LINUXUTILS_VERSION) + +TI_LINUXUTILS_DEPENDENCIES=linux26 + +TI_LINUXUTILS_BUILD_MAKE_ARGS = \ + CC=$(TARGET_CC) \ + LD=$(TARGET_LD) \ + MVTOOL_PREFIX=$(TARGET_CROSS) \ + UCTOOL_PREFIX=$(TARGET_CROSS)\ + LINUXKERNEL_INSTALL_DIR=$(BUILD_DIR)/linux-$(LINUX26_VERSION) \ + EXEC_DIR=$(TARGET_DIR)/usr/lib/ti-linuxutils + +TI_LINUXUTILS_MODULES = cmem +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omap3),y) + TI_LINUXUTILS_MODULES += sdma +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm365),y) + TI_LINUXUTILS_MODULES += edma irq +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm368),y) + #TODO: Verify this + TI_LINUXUTILS_MODULES += edma irq +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm355),y) + TI_LINUXUTILS_MODULES += edma irq +endif + +define TI_LINUXUTILS_BUILD_CMDS + for i in $(TI_LINUXUTILS_MODULES) ; do \ + $(MAKE) $(TI_LINUXUTILS_BUILD_MAKE_ARGS) -C $(@D)/packages/ti/sdo/linuxutils/$$i clean debug release; \ + done +endef + +define TI_LINUXUTILS_INSTALL_STAGING_CMDS + $(INSTALL) -d $(TI_LINUXUTILS_INSTALL_STAGING_DIR); + cp -pPrf $(TI_LINUXUTILS_DIR)/* $(TI_LINUXUTILS_INSTALL_STAGING_DIR); + chmod -R +w $(TI_LINUXUTILS_INSTALL_STAGING_DIR); +endef + +define TI_LINUXUTILS_INSTALL_TARGET_CMDS + $(INSTALL) -d $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp + for i in $(TI_LINUXUTILS_MODULES) ; do \ + $(INSTALL) -m 0644 $(@D)/packages/ti/sdo/linuxutils/$$i/src/module/$${i}k.ko $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp/$${i}k.ko ; \ + $(MAKE) $(TI_LINUXUTILS_BUILD_MAKE_ARGS) -C $(@D)/packages/ti/sdo/linuxutils/$${i} install ; \ + done +endef + +$(eval $(call GENTARGETS,package/ti,ti-linuxutils)) -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 15/17] TI's Local Power Manager (LPM) 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (13 preceding siblings ...) 2010-09-17 17:59 ` [Buildroot] [PATCH 14/17] TI's MFP Linux utils Pierre-Luc Simard @ 2010-09-17 18:00 ` Pierre-Luc Simard 2010-09-17 18:00 ` [Buildroot] [PATCH 16/17] TI's eXpress DSP Algorithm Interface Standard (XDAIS) Pierre-Luc Simard ` (2 subsequent siblings) 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 18:00 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-local-power-manager/Config.in | 11 +++ .../ti-local-power-manager-kmalloc.patch | 14 +++ .../ti-local-power-manager.mk | 85 ++++++++++++++++++++ 4 files changed, 111 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-local-power-manager/Config.in create mode 100644 package/ti/ti-local-power-manager/ti-local-power-manager-kmalloc.patch create mode 100644 package/ti/ti-local-power-manager/ti-local-power-manager.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index 7ede23a..474e0a9 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -42,6 +42,7 @@ source "package/ti/ti-codecs-omap3/Config.in" source "package/ti/ti-dsplink/Config.in" source "package/ti/ti-gst-plugin/Config.in" source "package/ti/ti-linuxutils/Config.in" +source "package/ti/ti-local-power-manager/Config.in" comment "Staging tools" source "package/ti/ti-biosutils/Config.in" diff --git a/package/ti/ti-local-power-manager/Config.in b/package/ti/ti-local-power-manager/Config.in new file mode 100644 index 0000000..a7bd264 --- /dev/null +++ b/package/ti/ti-local-power-manager/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TI_LOCAL_POWER_MANAGER + bool "Local Power Manager (LPM)" + depends on BR2_PACKAGE_TI_PLATFORM_omap3530 || BR2_PACKAGE_TI_PLATFORM_dm6446 + select BR2_PACKAGE_TI_DSPLINK + select BR2_PACKAGE_TI_XDCTOOLS + help + TI Local Power Manager (LPM) + http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/lpm + + Currently only make and install the lpm kernel module. + And you will need to add a startup script to load the kernel module... diff --git a/package/ti/ti-local-power-manager/ti-local-power-manager-kmalloc.patch b/package/ti/ti-local-power-manager/ti-local-power-manager-kmalloc.patch new file mode 100644 index 0000000..7b836ef --- /dev/null +++ b/package/ti/ti-local-power-manager/ti-local-power-manager-kmalloc.patch @@ -0,0 +1,14 @@ +diff -rupN a/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c b/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c +--- a/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c 2010-04-30 13:19:43.000000000 -0700 ++++ b/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c 2010-08-20 07:16:45.378243681 -0700 +@@ -41,6 +41,10 @@ + #endif + #include <linux/io.h> + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34) ++#include <linux/slab.h> ++#endif ++ + #include "lpm_driver.h" + #include "lpm_dev.h" + diff --git a/package/ti/ti-local-power-manager/ti-local-power-manager.mk b/package/ti/ti-local-power-manager/ti-local-power-manager.mk new file mode 100644 index 0000000..84c4876 --- /dev/null +++ b/package/ti/ti-local-power-manager/ti-local-power-manager.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# ti-local-power-manager +# +################################################################################ +TI_LOCAL_POWER_MANAGER_VERSION:=1.24.02.09 +TI_LOCAL_POWER_MANAGER_FILE_VERSION:=1_24_02_09 +TI_LOCAL_POWER_MANAGER_SOURCE = local_power_manager_linux_$(TI_LOCAL_POWER_MANAGER_FILE_VERSION).tar.gz +TI_LOCAL_POWER_MANAGER_SITE=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/lpm/$(TI_LOCAL_POWER_MANAGER_FILE_VERSION)/exports +TI_LOCAL_POWER_MANAGER_DIR:=$(BUILD_DIR)/ti-local-power-manager-$(TI_LOCAL_POWER_MANAGER_VERSION) + +TI_LOCAL_POWER_MANAGER_INSTALL_STAGING = YES + +TI_LOCAL_POWER_MANAGER_DEPENDENCIES = ti-xdctools ti-dsplink linux26 + +TI_LOCAL_POWER_MANAGER_INSTALL_STAGING_DIR=$(STAGING_DIR)/ti/local-power-manager-$(TI_LOCAL_POWER_MANAGER_VERSION) + +TI_LOCAL_POWER_MANAGER_PLATFORM=UNDEFINED +TI_LOCAL_POWER_MANAGER_XDC_PLATFORM=UNDEFINED +TI_LOCAL_POWER_MANAGER_XDC_PLATFORM_DIR=UNDEFINED +ifeq ($(BR2_PACKAGE_TI_PLATFORM_omap3),y) + TI_LOCAL_POWER_MANAGER_PLATFORM=omap3530 + TI_LOCAL_POWER_MANAGER_XDC_PLATFORM=ti.platforms.evm3530 + TI_LOCAL_POWER_MANAGER_XDC_PLATFORM_DIR=ti_platforms_evm3530 +endif +ifeq ($(BR2_PACKAGE_TI_PLATFORM_dm6446),y) + TI_LOCAL_POWER_MANAGER_PLATFORM=dm6446 + TI_LOCAL_POWER_MANAGER_XDC_PLATFORM=ti.platforms.evmDM6446 + TI_LOCAL_POWER_MANAGER_XDC_PLATFORM_DIR=ti_platforms_evmDM6446 +endif + +define TI_LOCAL_POWER_MANAGER_CONFIG + /* Generated by ti-local-power-manager.inc OE recipe */ + var Build = xdc.useModule('xdc.bld.BuildEnvironment'); + var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T'); + GCArmv5T.LONGNAME = "$(TARGET_CC)"; + GCArmv5T.rootDir = "$(TARGET_CROSS)"; + GCArmv5T.ccOpts.prefix += " -Wall -fno-strict-aliasing "; + GCArmv5T.lnkOpts.suffix = GCArmv5T.lnkOpts.suffix.replace("-lstdc++", ""); + GCArmv5T.lnkOpts.suffix += " -lpthread "; + GCArmv5T.platform = null; + GCArmv5T.platforms = [ "$(TI_LOCAL_POWER_MANAGER_XDC_PLATFORM)" ]; + /* remove unused profiles */ + delete GCArmv5T.profiles[\"coverage\"]; + delete GCArmv5T.profiles[\"profile\"]; + Build.targets.\$add(GCArmv5T); +endef +export TI_LOCAL_POWER_MANAGER_CONFIG + +define TI_LOCAL_POWER_MANAGER_CONFIGURE_CMDS + @echo "$$TI_LOCAL_POWER_MANAGER_CONFIG" > $(@D)/config.bld + (cd $(TI_LOCAL_POWER_MANAGER_DIR); XDCPATH=$(TI_XDCTOOLS_INSTALL_DIR) $(TI_XDCTOOLS_INSTALL_DIR)/xdc .make -PR .) + (cd $(TI_LOCAL_POWER_MANAGER_DIR); XDCPATH=$(TI_XDCTOOLS_INSTALL_DIR) $(TI_XDCTOOLS_INSTALL_DIR)/xdc clean -PR .) +endef + +define TI_LOCAL_POWER_MANAGER_BUILD_CMDS + # Build the gpp user space library + $(MAKE) -C $(@D)/packages/ti/bios/power/modules/$(TI_LOCAL_POWER_MANAGER_PLATFORM)/lpm \ + DSPLINK_REPO=$(TI_DSPLINK_INSTALL_STAGING_DIR) \ + LINUXKERNEL_INSTALL_DIR="$(BUILD_DIR)/linux-$(LINUX26_VERSION)" \ + MVTOOL_PREFIX="$(TARGET_CROSS)" \ + clean default + #TODO: Build the user space library + #TODO: Build the utilities (lpmON/OFF) + # (cd $(@D); XDCPATH=$(TI_XDCTOOLS_INSTALL_DIR) $(TI_XDCTOOLS_INSTALL_DIR)/xdc -PR .) +endef + +define TI_LOCAL_POWER_MANAGER_INSTALL_STAGING_CMDS + # Install/Stage the Source Tree + $(INSTALL) -d $(TI_LOCAL_POWER_MANAGER_INSTALL_STAGING_DIR) + cp -a $(TI_LOCAL_POWER_MANAGER_DIR)/* $(TI_LOCAL_POWER_MANAGER_INSTALL_STAGING_DIR) + chmod -R +w $(TI_LOCAL_POWER_MANAGER_INSTALL_STAGING_DIR) +endef + +define TI_LOCAL_POWER_MANAGER_INSTALL_TARGET_CMDS + # Install the kernel module + $(INSTALL) -d $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp + $(INSTALL) -m 0644 $(TI_LOCAL_POWER_MANAGER_DIR)/packages/ti/bios/power/modules/$(TI_LOCAL_POWER_MANAGER_PLATFORM)/lpm/*.ko $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/kernel/drivers/dsp + #TODO: Install the Utilities + # install -d $(TARGET_DIR)/usr/lib/ti-lpm-utils + # install -m 0755 $(TI_LOCAL_POWER_MANAGER_DIR)/packages/ti/bios/power/utils/bin/$(TI_LOCAL_POWER_MANAGER_XDC_PLATFORM_DIR)/linux/release/* $(TARGET_DIR)/usr/lib/ti-lpm-utils +endef + +$(eval $(call GENTARGETS,package/ti,ti-local-power-manager)) + -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 16/17] TI's eXpress DSP Algorithm Interface Standard (XDAIS) 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (14 preceding siblings ...) 2010-09-17 18:00 ` [Buildroot] [PATCH 15/17] TI's Local Power Manager (LPM) Pierre-Luc Simard @ 2010-09-17 18:00 ` Pierre-Luc Simard 2010-09-17 18:00 ` [Buildroot] [PATCH 17/17] XDCtools Pierre-Luc Simard 2011-10-18 9:23 ` [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Arnout Vandecappelle 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 18:00 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-xdais/Config.in | 6 ++++++ package/ti/ti-xdais/ti-xdais.mk | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-xdais/Config.in create mode 100644 package/ti/ti-xdais/ti-xdais.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index 474e0a9..fc18534 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -53,5 +53,6 @@ source "package/ti/ti-dspbios/Config.in" source "package/ti/ti-dvsdk-dm365/Config.in" source "package/ti/ti-edma3lld/Config.in" source "package/ti/ti-framework-components/Config.in" +source "package/ti/ti-xdais/Config.in" endif diff --git a/package/ti/ti-xdais/Config.in b/package/ti/ti-xdais/Config.in new file mode 100644 index 0000000..744a90c --- /dev/null +++ b/package/ti/ti-xdais/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TI_XDAIS + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + bool "eXpress DSP Algorithm Interface Standard (XDAIS)" + help + TI eXpress DSP Algorithm Interface Standard (XDAIS) specification + http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/xdais diff --git a/package/ti/ti-xdais/ti-xdais.mk b/package/ti/ti-xdais/ti-xdais.mk new file mode 100644 index 0000000..8135ad5 --- /dev/null +++ b/package/ti/ti-xdais/ti-xdais.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# ti-xdais +# +################################################################################ +TI_XDAIS_VERSION:=6.25.02.11 +TI_XDAIS_FILE_VERSION:=6_25_02_11 +TI_XDAIS_SOURCE:=xdais_$(TI_XDAIS_FILE_VERSION).tar.gz +TI_XDAIS_SITE:=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/xdais/$(TI_XDAIS_FILE_VERSION)/exports +TI_XDAIS_DIR:=$(BUILD_DIR)/ti-xdais-$(TI_XDAIS_VERSION) + +TI_XDAIS_INSTALL_TARGET = NO +TI_XDAIS_INSTALL_STAGING = YES + +TI_XDAIS_INSTALL_DIR:=$(STAGING_DIR)/ti/xdai-$(TI_XDAIS_VERSION) + + +$(DL_DIR)/$(TI_XDAIS_SOURCE): + $(call DOWNLOAD,$(TI_XDAIS_SITE),$(TI_XDAIS_SOURCE_BIN)) + +define TI_XDAIS_INSTALL_STAGING_CMDS + mkdir -p $(TI_XDAIS_INSTALL_DIR) + cp -r $(@D)/* $(TI_XDAIS_INSTALL_DIR) + chmod -R +w $(TI_XDAIS_INSTALL_DIR) +endef + +define TI_XDAIS_UNINSTALL_STAGING_CMDS + rm -rf $(TI_XDAIS_INSTALL_DIR) +endef + + +ti-xdais-source: $(DL_DIR)/$(TI_XDAIS_SOURCE) + +$(eval $(call GENTARGETS,package/ti,ti-xdais)) \ No newline at end of file -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] [PATCH 17/17] XDCtools 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (15 preceding siblings ...) 2010-09-17 18:00 ` [Buildroot] [PATCH 16/17] TI's eXpress DSP Algorithm Interface Standard (XDAIS) Pierre-Luc Simard @ 2010-09-17 18:00 ` Pierre-Luc Simard 2011-10-18 9:23 ` [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Arnout Vandecappelle 17 siblings, 0 replies; 25+ messages in thread From: Pierre-Luc Simard @ 2010-09-17 18:00 UTC (permalink / raw) To: buildroot --- package/ti/Config.in | 1 + package/ti/ti-xdctools/Config.in | 6 ++++ package/ti/ti-xdctools/ti-xdctools.mk | 48 +++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 0 deletions(-) create mode 100644 package/ti/ti-xdctools/Config.in create mode 100644 package/ti/ti-xdctools/ti-xdctools.mk diff --git a/package/ti/Config.in b/package/ti/Config.in index fc18534..0674bc1 100644 --- a/package/ti/Config.in +++ b/package/ti/Config.in @@ -54,5 +54,6 @@ source "package/ti/ti-dvsdk-dm365/Config.in" source "package/ti/ti-edma3lld/Config.in" source "package/ti/ti-framework-components/Config.in" source "package/ti/ti-xdais/Config.in" +source "package/ti/ti-xdctools/Config.in" endif diff --git a/package/ti/ti-xdctools/Config.in b/package/ti/ti-xdctools/Config.in new file mode 100644 index 0000000..ffc9188 --- /dev/null +++ b/package/ti/ti-xdctools/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_TI_XDCTOOLS + depends on BR2_PACKAGE_TI_PLATFORM_omap3 + bool "XDCtools" + help + XDCtools (RTSC - Real Time Software Components - http://rtsc.eclipse.org) + http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc diff --git a/package/ti/ti-xdctools/ti-xdctools.mk b/package/ti/ti-xdctools/ti-xdctools.mk new file mode 100644 index 0000000..28972fe --- /dev/null +++ b/package/ti/ti-xdctools/ti-xdctools.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# ti-xdctools +# +################################################################################ +TI_XDCTOOLS_VERSION:=3.20.01.51 +TI_XDCTOOLS_FILE_VERSION:=3_20_01_51 + +TI_XDCTOOLS_SOURCE:=ti-xdctools-$(TI_XDCTOOLS_VERSION).tar.gz +TI_XDCTOOLS_SOURCE_BIN:=xdctools_setuplinux_$(TI_XDCTOOLS_FILE_VERSION).bin +TI_XDCTOOLS_SOURCE_BIN_FOLDER:=xdctools_$(TI_XDCTOOLS_FILE_VERSION) +TI_XDCTOOLS_SITE:=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/$(TI_XDCTOOLS_FILE_VERSION)/exports +TI_XDCTOOLS_DIR:=$(BUILD_DIR)/ti-xdctools-$(TI_XDCTOOLS_VERSION) + +TI_XDCTOOLS_INSTALL_TARGET = NO +TI_XDCTOOLS_INSTALL_STAGING = YES + +TI_XDCTOOLS_INSTALL_DIR:=$(STAGING_DIR)/ti/xdctools-$(TI_XDCTOOLS_VERSION) + + + +$(DL_DIR)/$(TI_XDCTOOLS_SOURCE): + $(call DOWNLOAD,$(TI_XDCTOOLS_SITE),$(TI_XDCTOOLS_SOURCE_BIN)) + chmod +x $(DL_DIR)/$(TI_XDCTOOLS_SOURCE_BIN) + $(DL_DIR)/$(TI_XDCTOOLS_SOURCE_BIN) --S --prefix $(DL_DIR) + find $(DL_DIR)/$(TI_XDCTOOLS_SOURCE_BIN_FOLDER) -type f -not -readable -exec sudo chmod gou+r {} \; + find $(DL_DIR)/$(TI_XDCTOOLS_SOURCE_BIN_FOLDER) -type d -not -executable -exec sudo chmod gou+rx {} \; + (cd $(DL_DIR); \ + tar -czf $(TI_XDCTOOLS_SOURCE) $(TI_XDCTOOLS_SOURCE_BIN_FOLDER)\ + ) + rm -rf $(DL_DIR)/$(TI_XDCTOOLS_SOURCE_BIN_FOLDER) + +# It's install to the staging dir simply for consistency. +# Since it's a binary package it really does not need to be compiled or anything else. +define TI_XDCTOOLS_INSTALL_STAGING_CMDS + mkdir -p $(TI_XDCTOOLS_INSTALL_DIR) + cp -r $(@D)/* $(TI_XDCTOOLS_INSTALL_DIR) + chmod -R +w $(TI_XDCTOOLS_INSTALL_DIR) +endef + +define TI_XDCTOOLS_UNINSTALL_STAGING_CMDS + rm -rf $(TI_XDCTOOLS_INSTALL_DIR) +endef + +ti-xdctools-source: $(DL_DIR)/$(TI_XDCTOOLS_SOURCE) + + +$(eval $(call GENTARGETS,package/ti,ti-xdctools)) \ No newline at end of file -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard ` (16 preceding siblings ...) 2010-09-17 18:00 ` [Buildroot] [PATCH 17/17] XDCtools Pierre-Luc Simard @ 2011-10-18 9:23 ` Arnout Vandecappelle 2011-10-18 10:28 ` Peter Korsgaard 2011-10-18 12:33 ` Arnout Vandecappelle 17 siblings, 2 replies; 25+ messages in thread From: Arnout Vandecappelle @ 2011-10-18 9:23 UTC (permalink / raw) To: buildroot On Friday 17 September 2010 19:59:45, Pierre-Luc Simard wrote: > Hello All, > > I'd like some comment on the packages I've made to support TI's gstreamer > plugin for the OMAP3 and DM365 processors. All packages compile using > crosstool-ng and glibc, I have not yet tested them with BR's own internal > toolchain and the uclibc at the moment. If anybody wants to test these package > I'll provide as much assistance as I can. I've publish my working branch at > http://github.com/Admetric/buildroot Reviving a year-old thread... It seems these patches were never commented upon and also weren't accepted. I'm going to pick them up again. Although these patches still apply cleanly against the current master, there is probably some duplication with the TI things that were merged earlier this year. I will probably not find them all myself, so I hope there is someone on the list who can keep an eagle eye on such duplicates. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 31BB CF53 8660 6F88 345D 54CC A836 5879 20D7 CF43 ^ permalink raw reply [flat|nested] 25+ messages in thread
* [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors 2011-10-18 9:23 ` [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Arnout Vandecappelle @ 2011-10-18 10:28 ` Peter Korsgaard 2011-10-18 12:33 ` Arnout Vandecappelle 1 sibling, 0 replies; 25+ messages in thread From: Peter Korsgaard @ 2011-10-18 10:28 UTC (permalink / raw) To: buildroot >>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes: Hi, Arnout> Reviving a year-old thread... Arnout> It seems these patches were never commented upon and also Arnout> weren't accepted. I'm going to pick them up again. Thanks! It's not nice when I drop patches on the floor, but it does happen .. Arnout> Although these patches still apply cleanly against the current Arnout> master, there is probably some duplication with the TI things Arnout> that were merged earlier this year. I will probably not find Arnout> them all myself, so I hope there is someone on the list who Arnout> can keep an eagle eye on such duplicates. I'll take a look at them when you post. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 25+ messages in thread
* [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors 2011-10-18 9:23 ` [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Arnout Vandecappelle 2011-10-18 10:28 ` Peter Korsgaard @ 2011-10-18 12:33 ` Arnout Vandecappelle 2011-10-18 12:41 ` Peter Korsgaard 1 sibling, 1 reply; 25+ messages in thread From: Arnout Vandecappelle @ 2011-10-18 12:33 UTC (permalink / raw) To: buildroot On Tuesday 18 October 2011 11:23:03, Arnout Vandecappelle wrote: > On Friday 17 September 2010 19:59:45, Pierre-Luc Simard wrote: > > Hello All, > > > > I'd like some comment on the packages I've made to support TI's gstreamer > > plugin for the OMAP3 and DM365 processors. All packages compile using > > crosstool-ng and glibc, I have not yet tested them with BR's own internal > > toolchain and the uclibc at the moment. If anybody wants to test these > > package I'll provide as much assistance as I can. I've publish my working > > branch at http://github.com/Admetric/buildroot > > Reviving a year-old thread... > > It seems these patches were never commented upon and also weren't > accepted. I'm going to pick them up again. > > Although these patches still apply cleanly against the current master, > there is probably some duplication with the TI things that were merged > earlier this year. Looks like I spoke too soon... That TI stuff is an unholy mess of different libraries, usually binary-only. The patches that Pierre-Luc posted don't work anymore because things have been moved around on the TI website. But the worst thing of all, all packages use a binary installer that has to be executed to self-extract the source code and (binary) libraries. Fortunately, TI's license allows redistribution in any form. So we are allowed to repackage the extracted source/binary code. That would be my preferred approach: download a .tgz from the buildroot mirror instead of going through the mess of running installer binaries. Peter, is that an acceptable solution? Bottom line will be that nothing of Pierre-Luc's original patches will be left. For sure, I will limit my work to DM365 (that's the one I need myself). And finally, my project manager just bumped down the priority of having the gstreamer-ti plugins in our project, so I may never do it after all... Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 31BB CF53 8660 6F88 345D 54CC A836 5879 20D7 CF43 ^ permalink raw reply [flat|nested] 25+ messages in thread
* [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors 2011-10-18 12:33 ` Arnout Vandecappelle @ 2011-10-18 12:41 ` Peter Korsgaard 2011-10-18 12:49 ` Thomas Petazzoni 0 siblings, 1 reply; 25+ messages in thread From: Peter Korsgaard @ 2011-10-18 12:41 UTC (permalink / raw) To: buildroot >>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes: Hi, Arnout> Looks like I spoke too soon... Arnout> That TI stuff is an unholy mess of different libraries, Arnout> usually binary-only. The patches that Pierre-Luc posted don't Arnout> work anymore because things have been moved around on the TI Arnout> website. But the worst thing of all, all packages use a Arnout> binary installer that has to be executed to self-extract the Arnout> source code and (binary) libraries. Sigh :/ Arnout> Fortunately, TI's license allows redistribution in any form. Arnout> So we are allowed to repackage the extracted source/binary Arnout> code. That would be my preferred approach: download a .tgz Arnout> from the buildroot mirror instead of going through the mess of Arnout> running installer binaries. Arnout> Peter, is that an acceptable solution? Hmm, I would prefer not to, but if there's no other option.. Arnout> Bottom line will be that nothing of Pierre-Luc's original Arnout> patches will be left. For sure, I will limit my work to DM365 Arnout> (that's the one I need myself). And finally, my project Arnout> manager just bumped down the priority of having the Arnout> gstreamer-ti plugins in our project, so I may never do it Arnout> after all... :/ -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 25+ messages in thread
* [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors 2011-10-18 12:41 ` Peter Korsgaard @ 2011-10-18 12:49 ` Thomas Petazzoni 2011-10-18 13:32 ` Gustavo Zacarias 0 siblings, 1 reply; 25+ messages in thread From: Thomas Petazzoni @ 2011-10-18 12:49 UTC (permalink / raw) To: buildroot Le Tue, 18 Oct 2011 14:41:10 +0200, Peter Korsgaard <jacmet@uclibc.org> a ?crit : > Arnout> Fortunately, TI's license allows redistribution in any form. > Arnout> So we are allowed to repackage the extracted source/binary > Arnout> code. That would be my preferred approach: download a .tgz > Arnout> from the buildroot mirror instead of going through the mess of > Arnout> running installer binaries. > > Arnout> Peter, is that an acceptable solution? > > Hmm, I would prefer not to, but if there's no other option.. There is a similar problem with the TI OpenGL drivers. The Graphics SDK available from TI website is a huge auto-extractable binary which contains (amongst a ton of crap) the binary driver. Some embedded Linux build systems (such as OpenBricks) have re-packaged only the necessary bits, have put those tarballs online and use them in their package recipes instead of the original TI stuff. Ideally, I'd prefer to use the original TI stuff as well, but the size of the downloads are horribly huge, and they keep moving things around on their website all the time. It is not even simple to find what it the latest version of what. TI's management of software support is really horrible. Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 25+ messages in thread
* [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors 2011-10-18 12:49 ` Thomas Petazzoni @ 2011-10-18 13:32 ` Gustavo Zacarias 0 siblings, 0 replies; 25+ messages in thread From: Gustavo Zacarias @ 2011-10-18 13:32 UTC (permalink / raw) To: buildroot On 18.10.2011 09:49, Thomas Petazzoni wrote: > There is a similar problem with the TI OpenGL drivers. The Graphics > SDK > available from TI website is a huge auto-extractable binary which > contains (amongst a ton of crap) the binary driver. Some embedded > Linux > build systems (such as OpenBricks) have re-packaged only the > necessary > bits, have put those tarballs online and use them in their package > recipes instead of the original TI stuff. > > Ideally, I'd prefer to use the original TI stuff as well, but the > size > of the downloads are horribly huge, and they keep moving things > around > on their website all the time. It is not even simple to find what it > the latest version of what. TI's management of software support is > really horrible. > > Regards, > > Thomas I had a go at those bits some time ago for a customer reaching to the point of having OMAP3 OpenGL for Qt but it's a bit timerot now. Could be revived but i never did much about it because of the huge tarball problem and granular CPU integration: different OMAP3 processors have differing OpenGL capabilities/accelerators and it changes the build logic somewhat (different includes and libraries for each target). Doing an OMAP3 model selection in the OpenGL/Qt menu isn't clean IMHO since that same selection could possibly be used in the future for other package bits as well. Regards. ^ permalink raw reply [flat|nested] 25+ messages in thread
* [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors @ 2011-10-22 3:05 Damian Kaczmarek 0 siblings, 0 replies; 25+ messages in thread From: Damian Kaczmarek @ 2011-10-22 3:05 UTC (permalink / raw) To: buildroot > On Friday 17 September 2010 19:59:45, Pierre-Luc Simard wrote: > > Hello All, > > > > I'd like some comment on the packages I've made to support TI's gstreamer > > plugin for the OMAP3 and DM365 processors. All packages compile using > > crosstool-ng and glibc, I have not yet tested them with BR's own internal > > toolchain and the uclibc at the moment. If anybody wants to test these > package > > I'll provide as much assistance as I can. I've publish my working branch > at > > http://github.com/Admetric/buildroot > Reviving a year-old thread... > It seems these patches were never commented upon and also weren't > accepted. I'm going to pick them up again. > Although these patches still apply cleanly against the current master, there is probably some duplication with the TI things that were merged earlier this year. I will probably not find them all myself, so I hope there is someone on the list who can keep an eagle eye on such duplicates. Yes, the patches have applied cleanly and after doing fixes here and there most of them built cleanly. However, some things fail to work for me. I have no idea how to fix the below error which shows up during building of ti-codec-engine examples. The problem is that the binary is a static executable trying to call a rename syscall across filesystem boundaries. This obviously fails. There is no way to override it since LD_PRELOAD will not work (static executable). I have thought of a wrapper around this executable. Maybe not important but nice to have. <<<<<<<<<<<<<<<<< LOG START rush@rushpod:~/Programowanie/swiftlite/buildroot/output/build/ti-codec- engine-2.25.05.16/examples/ti/xdais/dm/examples/viddec1_copy> /home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/cgt6x-6.1.12/bin/cl6x -c -qq -pdsw225 -pden -pds=195 -mv64p -eo.o64P -ea.s64P -Dxdc_target_name__=C64P - Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_whole_program_debug - Dxdc_bld__vers_1_0_6_1_12 -oe --symdebug:dwarf -mo -I. - I/home/rush/Programowanie/swiftlite/buildroot/output/build/ti-codec- engine-2.25.05.16/examples/ti/sdo/ce/examples/codecs/viddec1_copy/../../../../../.. -I/home/rush/Programowanie/swiftlite/buildroot/output/build/ti-codec- engine-2.25.05.16/packages - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/xdai-6.25.02.11/packages - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/linuxutils-2.25.05.11/packages - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/framework-components-2.25.02.06/packages - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/biosutils-1.02.02.02/packages - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/local-power-manager-1.24.02.09/packages - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/edma3lld-01.11.00.03/packages - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/dspbios-5.41.04.18/packages - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/dsplink-1.65.00.03/packages - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/xdctools-3.20.01.51/packages -I../../../../.. - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/cgt6x-6.1.12/include - fs=./package/lib/lib/whole_program_debug/viddec1_copy/package - fr=./package/lib/lib/whole_program_debug/viddec1_copy/package -fc package/package_ti.xdais.dm.examples.viddec1_copy.c >> error: unable to rename /tmp/17342rJDaJD to ./package/lib/lib/whole_program_debug/viddec1_copy/package/package_ti.xdais.dm.examples.viddec1_copy.o64P: Invalid cross-device link >> Compilation failure <<<<<<<<<<<<<<<<< LOG END Another problem is the ti-codecs-omap3 and hence I am unable to test ti-gst- plugin. It fails on God knows what. Any ideas? <<<<<<<<<<<<<<<<< LOG START -I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/dspbios-5.41.04.18/packages/ti/bios/include - I/home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/cgt6x-6.1.12/include rm -f bin/cs.x64P # # lnk64P bin/cs.x64P ... rm -f package/cfg//bin/cs.x64P.map /home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/cgt6x-6.1.12/bin/lnk6x -w -q -u _c_int00 -l link.cmd -q -o bin/cs.x64P package/cfg/bin/cs/main.o64P package/cfg/bin/cs_x64P.o64P package/cfg/bin/cs_x64Pcfg_c.o64P package/cfg/bin/cs_x64Pcfg.o64P package/cfg/bin/cs_x64P.xdl -c -m package/cfg//bin/cs.x64P.map -l /home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux-gnueabi/sysroot/ti/cgt6x-6.1.12/lib/rts64plus.lib undefined first referenced symbol in file --------- ---------------- _RingIO_init /home/rush/Programowanie/swiftlite/buildroot/output/host/usr/arm-unknown- linux- gnueabi/sysroot/ti/dsplink-1.65.00.03/packages/dsplink/dsp/export/BIN/DspBios/OMAP3530/OMAP3530_0/RELEASE/dsplink.lib<dsplink.obj> error: unresolved symbols remain error: errors encountered during linking; "bin/cs.x64P" not built gmake[1]: *** [bin/cs.x64P] Error 1 gmake: *** [packages/ti/sdo/server/cs,.executables] Error 2 make[1]: *** [.all-packages] B??d 2 make[1]: Opuszczenie katalogu `/home/rush/Programowanie/swiftlite/buildroot/output/build/ti-codecs- omap3-1.01.00' <<<<<<<<<<<<<<<<< LOG END My patches are here: http://rushbase.net/buildroot/ One is an addition to the patch series from the original submitter made by me and other is a whole lot including my fixes. There is also a mirror of some files (including TI stuff) Anybody wants to try their magic? Best Regards, Damian Kaczmarek Btw. I have DM3730 / OMAP3530. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111022/b3e94bff/attachment.asc> ^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2011-10-22 3:05 UTC | newest] Thread overview: 25+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-17 17:59 [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 01/17] Basic frame to support TI's packages for OMAP and Davinci processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 02/17] TI's DSP/BIOS Utilities Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 03/17] TI's DSP Code Generation Tools Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 04/17] TI's Codec Engine for TI ARM/DSP processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 05/17] TI Codecs for the OMAP3 processor Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 06/17] TI's Davinci Multimedia Application Interface (DMAI) for TI ARM/DSP processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 07/17] TI's DSP/BIOS v5 Kernel Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 08/17] Corrected the position of the ti-dspbios package in the menu Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 09/17] DSPLink Inter-Processor Communications (IPC) for TI's processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 10/17] TI's DVSDK for DM365 processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 11/17] TI EDMA3 Low Level Driver (LLD) Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 12/17] TI Framework Components Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 13/17] GStreamer Plugin (gstreamer-ti) for TI ARM/DSP processors Pierre-Luc Simard 2010-09-17 17:59 ` [Buildroot] [PATCH 14/17] TI's MFP Linux utils Pierre-Luc Simard 2010-09-17 18:00 ` [Buildroot] [PATCH 15/17] TI's Local Power Manager (LPM) Pierre-Luc Simard 2010-09-17 18:00 ` [Buildroot] [PATCH 16/17] TI's eXpress DSP Algorithm Interface Standard (XDAIS) Pierre-Luc Simard 2010-09-17 18:00 ` [Buildroot] [PATCH 17/17] XDCtools Pierre-Luc Simard 2011-10-18 9:23 ` [Buildroot] Request for comments on packages for TI's OMAP3 and DM365 processors Arnout Vandecappelle 2011-10-18 10:28 ` Peter Korsgaard 2011-10-18 12:33 ` Arnout Vandecappelle 2011-10-18 12:41 ` Peter Korsgaard 2011-10-18 12:49 ` Thomas Petazzoni 2011-10-18 13:32 ` Gustavo Zacarias -- strict thread matches above, loose matches on Subject: below -- 2011-10-22 3:05 Damian Kaczmarek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox