kirkstone migration: delete deprecated or duplicated recipes

Remove deprecated versions of recipes updated in other general layers
(poky, meta-openembedded). Also remove duplicated IMX specific recipes that
are available in other BSP layers (meta-freescale, meta-fsl-demos, etc).

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2022-05-25 14:25:15 +02:00
parent 2452e85a6b
commit 8d123d7451
63 changed files with 5 additions and 6467 deletions

View File

@ -1 +0,0 @@
../../../../../meta-freescale/recipes-security/optee-imx/optee-client/tee-supplicant.service

View File

@ -1,3 +0,0 @@
inherit features_check
REQUIRED_MACHINE_FEATURES = "optee"

View File

@ -1,58 +0,0 @@
# Copyright (C) 2017-2021 NXP
SUMMARY = "OPTEE Client libs"
HOMEPAGE = "http://www.optee.org/"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
SRCBRANCH = "lf-5.10.72_2.2.0"
OPTEE_CLIENT_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-client.git;protocol=https"
SRC_URI = " \
${OPTEE_CLIENT_SRC};branch=${SRCBRANCH} \
file://tee-supplicant.service \
"
SRCREV = "182874320395787a389e5b0f7df02b32f3c0a1b0"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
inherit python3native systemd features_check
REQUIRED_MACHINE_FEATURES = "optee"
SYSTEMD_SERVICE:${PN} = "tee-supplicant.service"
OPTEE_ARCH ?= "arm32"
OPTEE_ARCH:armv7a = "arm32"
OPTEE_ARCH:aarch64 = "arm64"
EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH} -C ${S} O=${B}"
do_install () {
oe_runmake install
install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0.0
ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1
ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so
install -D -p -m0644 ${B}/export/usr/lib/libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1.0
ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0
ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so
install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant
cp -a ${B}/export/usr/include ${D}${includedir}
sed -i -e s:/etc:${sysconfdir}:g -e s:/usr/bin:${bindir}:g ${WORKDIR}/tee-supplicant.service
install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
}
PACKAGES += "tee-supplicant"
FILES:${PN} += "${libdir}/* ${includedir}/*"
FILES:tee-supplicant += "${bindir}/tee-supplicant"
INSANE_SKIP:${PN} = "ldflags dev-elf"
INSANE_SKIP:${PN}-dev = "ldflags dev-elf"
INSANE_SKIP:tee-supplicant = "ldflags"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"

View File

@ -1,3 +0,0 @@
inherit features_check
REQUIRED_MACHINE_FEATURES = "optee"

View File

@ -1,102 +0,0 @@
# Copyright (C) 2017-2021 NXP
SUMMARY = "OPTEE OS"
DESCRIPTION = "OPTEE OS"
HOMEPAGE = "http://www.optee.org/"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
DEPENDS = "python3-pycryptodomex-native python3-pyelftools-native u-boot-mkimage-native"
SRCBRANCH = "lf-5.10.72_2.2.0"
OPTEE_OS_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https"
SRC_URI = "${OPTEE_OS_SRC};branch=${SRCBRANCH}"
SRCREV = "c939619d64dea014ad1b8382356eee4d1cbfbb22"
S = "${WORKDIR}/git"
inherit deploy python3native autotools features_check
REQUIRED_MACHINE_FEATURES = "optee"
# The platform flavor corresponds to the Yocto machine without the leading 'i'.
PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}"
PLATFORM_FLAVOR_imx6qpdlsolox = "mx6qsabresd"
PLATFORM_FLAVOR_imx6ul7d = "mx6ulevk"
PLATFORM_FLAVOR_imx6ull14x14evk = "mx6ullevk"
PLATFORM_FLAVOR_imx6ull9x9evk = "mx6ullevk"
PLATFORM_FLAVOR_imx6ulz-14x14-evk = "mx6ulzevk"
PLATFORM_FLAVOR_mx8mq = "mx8mqevk"
PLATFORM_FLAVOR_mx8mm = "mx8mmevk"
PLATFORM_FLAVOR_mx8mn = "mx8mnevk"
PLATFORM_FLAVOR_mx8mp = "mx8mpevk"
PLATFORM_FLAVOR_mx8mpul = "mx8mpevk"
PLATFORM_FLAVOR_mx8qm = "mx8qmmek"
PLATFORM_FLAVOR_mx8qxp = "mx8qxpmek"
PLATFORM_FLAVOR_mx8dx = "mx8dxmek"
PLATFORM_FLAVOR_mx8dxl = "mx8dxlevk"
PLATFORM_FLAVOR_mx8mnul = "mx8mnevk"
PLATFORM_FLAVOR_mx8ulp = "mx8ulpevk"
OPTEE_ARCH ?= "arm32"
OPTEE_ARCH:armv7a = "arm32"
OPTEE_ARCH:aarch64 = "arm64"
# Optee-os can be built for 32 bits and 64 bits at the same time
# as long as the compilers are correctly defined.
# For 64bits, CROSS_COMPILE64 must be set
# When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that
# any 32 or 64 bits builds will pass
EXTRA_OEMAKE = " \
PLATFORM=imx \
PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \
CROSS_COMPILE=${HOST_PREFIX} \
CROSS_COMPILE64=${HOST_PREFIX} \
CFG_TEE_TA_LOG_LEVEL=0 \
CFG_TEE_CORE_LOG_LEVEL=0 \
-C ${S} O=${B}\
"
LDFLAGS = ""
CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
do_deploy () {
install -d ${DEPLOYDIR}
cp ${B}/core/tee-raw.bin ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin
if [ "${OPTEE_ARCH}" != "arm64" ]; then
IMX_LOAD_ADDR=`${TARGET_PREFIX}readelf -h ${B}/core/tee.elf | grep "Entry point address" | awk '{print $4}'`
uboot-mkimage -A arm -O linux -C none -a ${IMX_LOAD_ADDR} -e ${IMX_LOAD_ADDR} \
-d ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT}
fi
}
do_install () {
install -d ${D}${nonarch_base_libdir}/firmware/
install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
# Install the TA devkit
install -d ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/
for f in ${B}/export-ta_${OPTEE_ARCH}/*; do
cp -aR $f ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/
done
# Install embedded TAs
install -d ${D}${base_libdir}/optee_armtz
find ${B}/ta -name '*.ta' | while read name; do
install -m 444 $name ${D}${base_libdir}/optee_armtz/
done
}
addtask deploy after do_compile before do_install
FILES:${PN} = "${nonarch_base_libdir}/firmware/ /lib*/optee_armtz/"
FILES:${PN}-staticdev = "/usr/include/optee/"
RDEPENDS:${PN}-dev += "${PN}-staticdev"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(imx|imx-boot-container)"

View File

@ -1,64 +0,0 @@
# Copyright (C) 2017-2021 NXP
SUMMARY = "OPTEE test"
HOMEPAGE = "http://www.optee.org/"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
DEPENDS = "python3-pycrypto-native python3-pycryptodomex-native optee-os optee-client openssl"
SRCBRANCH = "lf-5.10.72_2.2.0"
OPTEE_TEST_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-test.git;protocol=https"
SRC_URI = "${OPTEE_TEST_SRC};branch=${SRCBRANCH}"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
SRCREV = "4d81b964a72e89a62d04187b3f055d8346b383c9"
inherit python3native
OPTEE_ARCH ?= "arm32"
OPTEE_ARCH:armv7a = "arm32"
OPTEE_ARCH:aarch64 = "arm64"
TA_DEV_KIT_DIR:arm = "${STAGING_INCDIR}/optee/export-user_ta:arm32/"
TA_DEV_KIT_DIR:aarch64 = "${STAGING_INCDIR}/optee/export-user_ta:arm64/"
CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
EXTRA_OEMAKE = " \
TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
ARCH=${OPTEE_ARCH} \
OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}/usr \
CROSS_COMPILE_HOST=${HOST_PREFIX} \
CROSS_COMPILE_TA=${HOST_PREFIX} \
CROSS_COMPILE=${HOST_PREFIX} \
OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \
-C ${S} O=${B} \
"
do_compile() {
oe_runmake all
}
do_compile[cleandirs] = "${B}"
do_install () {
install -d ${D}/usr/bin
install ${B}/xtest/xtest ${D}/usr/bin/
install -d ${D}/lib/optee_armtz
find ${B}/ta -name '*.ta' | while read name; do
install -m 444 $name ${D}/lib/optee_armtz/
done
install -d ${D}/usr/lib/tee-supplicant/plugins/
install ${B}/supp_plugin/*plugin ${D}/usr/lib/tee-supplicant/plugins/
}
FILES:${PN} = "/usr/bin/ /lib*/optee_armtz/ /usr/lib/tee-supplicant/plugins/"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"

View File

@ -1,66 +0,0 @@
# Copyright 2017-2020 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "Installs i.MX-specific kernel headers"
DESCRIPTION = "Installs i.MX-specific kernel headers to userspace. \
New headers are installed in ${includedir}/imx."
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
SRCBRANCH = "v5.4.70/master"
require recipes-kernel/linux/linux-dey-src.inc
S = "${WORKDIR}/git"
do_compile[noexec] = "1"
IMX_UAPI_HEADERS = " \
dma-buf.h \
hantrodec.h \
hx280enc.h \
ion.h \
ipu.h \
isl29023.h \
mxc_asrc.h \
mxc_dcic.h \
mxc_mlb.h \
mxc_sim_interface.h \
mxc_v4l2.h \
mxcfb.h \
pxp_device.h \
pxp_dma.h \
videodev2.h \
"
do_install() {
# We install all headers inside of B so we can copy only the
# whitelisted ones, and there is no risk of a new header to be
# installed by mistake.
oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix}
# FIXME: The ion.h is still on staging so "promote" it for now
cp ${S}/drivers/staging/android/uapi/ion.h ${B}${includedir}/linux
# Install whitelisted headers only
for h in ${IMX_UAPI_HEADERS}; do
install -D -m 0644 ${B}${includedir}/linux/$h \
${D}${includedir}/imx/linux/$h
done
}
DEPENDS += "rsync-native"
# Allow to build empty main package, this is required in order for -dev package
# to be propagated into the SDK
#
# Without this setting the RDEPENDS in other recipes fails to find this
# package, therefore causing the -dev package also to be skipped effectively not
# populating it into SDK
ALLOW_EMPTY:${PN} = "1"
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS += "unifdef-native bison-native rsync-native"
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
COMPATIBLE_MACHINE = "(ccimx6ul|ccimx8x|ccimx8m|ccimx6)"

View File

@ -1,140 +0,0 @@
From 45f48f8a5de59c04b0510c23853772bc970f411e Mon Sep 17 00:00:00 2001
From: Max Krummenacher <max.krummenacher@toradex.com>
Date: Thu, 9 Jan 2020 01:01:35 +0000
Subject: [PATCH] meson: add libdrm-vivante to the meson meta data
Upstream libdrm added the option to use meason as the buildsystem.
Integrate Vivante into the relevant meson build information.
Upstream-Status: Pending
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
meson.build | 14 +++++++++++++
meson_options.txt | 7 +++++++
vivante/meson.build | 50 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 71 insertions(+)
create mode 100644 vivante/meson.build
diff --git a/meson.build b/meson.build
index e292554a..f4740634 100644
--- a/meson.build
+++ b/meson.build
@@ -157,6 +157,15 @@ if _vc4 != 'false'
with_vc4 = _vc4 == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())
endif
+with_vivante = false
+_vivante = get_option('vivante')
+if _vivante == 'true'
+ if not with_atomics
+ error('libdrm_vivante requires atomics.')
+ endif
+ with_vivante = true
+endif
+
# XXX: Apparently only freebsd and dragonfly bsd actually need this (and
# gnu/kfreebsd), not openbsd and netbsd
with_libkms = false
@@ -312,6 +321,7 @@ install_headers(
'include/drm/savage_drm.h', 'include/drm/sis_drm.h',
'include/drm/tegra_drm.h', 'include/drm/vc4_drm.h',
'include/drm/via_drm.h', 'include/drm/virtgpu_drm.h',
+ 'include/drm/vivante_drm.h',
subdir : 'libdrm',
)
if with_vmwgfx
@@ -362,6 +372,9 @@ endif
if with_etnaviv
subdir('etnaviv')
endif
+if with_vivante
+ subdir('vivante')
+endif
if with_man_pages
subdir('man')
endif
@@ -382,5 +395,6 @@ message(' EXYNOS API @0@'.format(with_exynos))
message(' Freedreno API @0@ (kgsl: @1@)'.format(with_freedreno, with_freedreno_kgsl))
message(' Tegra API @0@'.format(with_tegra))
message(' VC4 API @0@'.format(with_vc4))
+message(' Vivante API @0@'.format(with_etnaviv))
message(' Etnaviv API @0@'.format(with_etnaviv))
message('')
diff --git a/meson_options.txt b/meson_options.txt
index 8af33f1c..dc69563d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -95,6 +95,13 @@ option(
choices : ['true', 'false', 'auto'],
description : '''Enable support for vc4's KMS API.''',
)
+option(
+ 'vivante',
+ type : 'combo',
+ value : 'false',
+ choices : ['true', 'false', 'auto'],
+ description : '''Enable support for vivante's propriatary experimental KMS API.''',
+)
option(
'etnaviv',
type : 'combo',
diff --git a/vivante/meson.build b/vivante/meson.build
new file mode 100644
index 00000000..f6adb598
--- /dev/null
+++ b/vivante/meson.build
@@ -0,0 +1,50 @@
+# Copyright © 2017-2018 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+
+libdrm_vivante = shared_library(
+ 'drm_vivante',
+ [
+ files(
+ 'vivante_bo.c',
+ ),
+ config_file
+ ],
+ include_directories : [inc_root, inc_drm],
+ link_with : libdrm,
+ c_args : libdrm_c_args,
+ dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops],
+ version : '1.0.0',
+ install : true,
+)
+
+pkg.generate(
+ name : 'libdrm_vivante',
+ libraries : libdrm_vivante,
+ subdirs : ['.', 'libdrm'],
+ version : meson.project_version(),
+ requires_private : 'libdrm',
+ description : 'Userspace interface to Vivante kernel DRM services',
+)
+
+ext_libdrm_vivante = declare_dependency(
+ link_with : [libdrm, libdrm_vivante],
+ include_directories : [inc_drm, include_directories('.')],
+)
--
2.20.1

View File

@ -1,73 +0,0 @@
SUMMARY = "Userspace interface to the kernel DRM services"
DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
stands for \"Direct Rendering Manager\", which is the kernel portion of the \
\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
accelerated OpenGL drivers."
HOMEPAGE = "http://dri.freedesktop.org"
SECTION = "x11/base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
PROVIDES = "drm"
DEPENDS = "libpthread-stubs"
IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1"
IMX_LIBDRM_BRANCH ?= "libdrm-imx-2.4.107"
SRC_URI = "${IMX_LIBDRM_SRC};branch=${IMX_LIBDRM_BRANCH} \
file://0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch "
SRCREV = "a7316e7d67b7708f40ffe469858dae07f14fe21a"
S = "${WORKDIR}/git"
DEFAULT_PREFERENCE = "-1"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
inherit meson pkgconfig manpages
PACKAGECONFIG ??= "libkms intel radeon amdgpu nouveau vmwgfx omap freedreno vc4 etnaviv install-test-programs"
PACKAGECONFIG[libkms] = "-Dlibkms=true,-Dlibkms=false"
PACKAGECONFIG[intel] = "-Dintel=true,-Dintel=false,libpciaccess"
PACKAGECONFIG[radeon] = "-Dradeon=true,-Dradeon=false"
PACKAGECONFIG[amdgpu] = "-Damdgpu=true,-Damdgpu=false"
PACKAGECONFIG[nouveau] = "-Dnouveau=true,-Dnouveau=false"
PACKAGECONFIG[vmwgfx] = "-Dvmwgfx=true,-Dvmwgfx=false"
PACKAGECONFIG[omap] = "-Domap=true,-Domap=false"
PACKAGECONFIG[exynos] = "-Dexynos=true,-Dexynos=false"
PACKAGECONFIG[freedreno] = "-Dfreedreno=true,-Dfreedreno=false"
PACKAGECONFIG[tegra] = "-Dtegra=true,-Dtegra=false"
PACKAGECONFIG[vc4] = "-Dvc4=true,-Dvc4=false"
PACKAGECONFIG[etnaviv] = "-Detnaviv=true,-Detnaviv=false"
PACKAGECONFIG[freedreno-kgsl] = "-Dfreedreno-kgsl=true,-Dfreedreno-kgsl=false"
PACKAGECONFIG[valgrind] = "-Dvalgrind=true,-Dvalgrind=false,valgrind"
PACKAGECONFIG[install-test-programs] = "-Dinstall-test-programs=true,-Dinstall-test-programs=false"
PACKAGECONFIG[cairo-tests] = "-Dcairo-tests=true,-Dcairo-tests=false"
PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,udev"
PACKAGECONFIG[manpages] = "-Dman-pages=true,-Dman-pages=false,libxslt-native xmlto-native python3-docutils-native"
ALLOW_EMPTY:${PN}-drivers = "1"
PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \
${PN}-etnaviv"
RRECOMMENDS:${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
${PN}-etnaviv"
FILES:${PN}-tests = "${bindir}/*"
FILES:${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
FILES:${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
FILES:${PN}-omap = "${libdir}/libdrm_omap.so.*"
FILES:${PN}-intel = "${libdir}/libdrm_intel.so.*"
FILES:${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
FILES:${PN}-kms = "${libdir}/libkms*.so.*"
FILES:${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
FILES:${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.* ${datadir}/${PN}/amdgpu.ids"
FILES:${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
BBCLASSEXTEND = "native nativesdk"
PACKAGES:prepend:imxgpu = "${PN}-vivante "
RRECOMMENDS:${PN}-drivers:append:imxgpu = " ${PN}-vivante"
FILES:${PN}-vivante = "${libdir}/libdrm_vivante.so.*"
PACKAGECONFIG:append:imxgpu = " vivante"
PACKAGECONFIG[vivante] = "-Dvivante=true,-Dvivante=false"
PACKAGE_ARCH = "${MACHINE_SOCARCH}"

View File

@ -1,24 +0,0 @@
SUMMARY = "Libav-based GStreamer 1.x plugin"
DESCRIPTION = "Contains a GStreamer plugin for using the encoders, decoders, \
muxers, and demuxers provided by FFmpeg."
HOMEPAGE = "http://gstreamer.freedesktop.org/"
SECTION = "multimedia"
# ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency
LICENSE_FLAGS = "commercial"
LICENSE = "LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz"
SRC_URI[sha256sum] = "822e008a910e9dd13aedbdd8dc63fedef4040c0ee2e927bab3112e9de693a548"
S = "${WORKDIR}/gst-libav-${PV}"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg"
inherit meson pkgconfig upstream-version-is-even
FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"

View File

@ -1,28 +0,0 @@
From f08ab3ac2ce43ac91d3bf65b26f26436690f499b Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 26 Jan 2016 15:16:01 -0800
Subject: [PATCH 1/4] fix maybe-uninitialized warnings when compiling with -Os
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
gst-libs/gst/codecparsers/gstvc1parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
index 2c60ced..e8226d8 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.c
+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
@@ -1730,7 +1730,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size,
GstVC1SeqLayer * seqlayer)
{
guint32 tmp;
- guint8 tmp8;
+ guint8 tmp8 = 0;
guint8 structA[8] = { 0, };
guint8 structB[12] = { 0, };
GstBitReader br;
--
2.28.0

View File

@ -1,30 +0,0 @@
From 3b05e91720c10fcf6e0e408595b7217f6fa145c2 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Wed, 3 Feb 2016 18:05:41 -0800
Subject: [PATCH 2/4] avoid including <sys/poll.h> directly
musl libc generates warnings if <sys/poll.h> is included directly.
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
sys/dvb/gstdvbsrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
index ca6b92a..b2772db 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
@@ -97,7 +97,7 @@
#include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <sys/ioctl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
--
2.28.0

View File

@ -1,88 +0,0 @@
From 5ed27de9f662fe063b8b3d5d4335aa64cd4718c9 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 9 Feb 2016 14:00:00 -0800
Subject: [PATCH 3/4] ensure valid sentinals for gst_structure_get() etc
For GStreamer functions declared with G_GNUC_NULL_TERMINATED,
ie __attribute__((__sentinel__)), gcc will generate a warning if the
last parameter passed to the function is not NULL (where a valid NULL
in this context is defined as zero with any pointer type).
The C callers to such functions within gst-plugins-bad use the C NULL
definition (ie ((void*)0)), which is a valid sentinel.
However the C++ NULL definition (ie 0L), is not a valid sentinel
without an explicit cast to a pointer type.
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
sys/decklink/gstdecklink.cpp | 10 +++++-----
sys/decklink/gstdecklinkaudiosrc.cpp | 2 +-
sys/decklink/gstdecklinkvideosink.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
index 4dac7e1..43762ce 100644
--- a/sys/decklink/gstdecklink.cpp
+++ b/sys/decklink/gstdecklink.cpp
@@ -674,7 +674,7 @@ gst_decklink_mode_get_generic_structure (GstDecklinkModeEnum e)
"pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
"interlace-mode", G_TYPE_STRING,
mode->interlaced ? "interleaved" : "progressive",
- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
+ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void*)NULL);
return s;
}
@@ -699,16 +699,16 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f,
case bmdFormat8BitYUV: /* '2vuy' */
gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
"colorimetry", G_TYPE_STRING, mode->colorimetry,
- "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
+ "chroma-site", G_TYPE_STRING, "mpeg2", (void*)NULL);
break;
case bmdFormat10BitYUV: /* 'v210' */
- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL);
+ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void*)NULL);
break;
case bmdFormat8BitARGB: /* 'ARGB' */
- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL);
+ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void*)NULL);
break;
case bmdFormat8BitBGRA: /* 'BGRA' */
- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL);
+ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void*)NULL);
break;
case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
index 2fef934..c47229a 100644
--- a/sys/decklink/gstdecklinkaudiosrc.cpp
+++ b/sys/decklink/gstdecklinkaudiosrc.cpp
@@ -379,7 +379,7 @@ gst_decklink_audio_src_start (GstDecklinkAudioSrc * self)
g_mutex_unlock (&self->input->lock);
if (videosrc) {
- g_object_get (videosrc, "connection", &vconn, NULL);
+ g_object_get (videosrc, "connection", &vconn, (void *) NULL);
gst_object_unref (videosrc);
switch (vconn) {
diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp
index e3a6775..f1a5aae 100644
--- a/sys/decklink/gstdecklinkvideosink.cpp
+++ b/sys/decklink/gstdecklinkvideosink.cpp
@@ -286,7 +286,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure,
gpointer user_data)
{
gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
- G_MAXINT, 1, NULL);
+ G_MAXINT, 1, (void *) NULL);
return TRUE;
}
--
2.28.0

View File

@ -1,49 +0,0 @@
From f19ff66640f2f472c4e9d9055253032d34e125c6 Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Mon, 27 Jan 2020 10:22:35 +0000
Subject: [PATCH 4/4] opencv: resolve missing opencv data dir in yocto build
When Yocto build is performed, opencv searches for data dir using simple
'test' command, this fails because pkg-config provides an absolute
path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR
in order for the 'test' utility to pick up the absolute path.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
ext/opencv/meson.build | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
index 0b0b3fc..0ed3344 100644
--- a/ext/opencv/meson.build
+++ b/ext/opencv/meson.build
@@ -78,20 +78,21 @@ else
endif
if opencv_found
+ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix')
gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"']
# Check the data dir used by opencv for its xml data files
# Use prefix from pkg-config to be compatible with cross-compilation
- r = run_command('test', '-d', opencv_prefix + '/share/opencv')
+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv')
if r.returncode() == 0
gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv"'
else
- r = run_command('test', '-d', opencv_prefix + '/share/OpenCV')
+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/OpenCV')
if r.returncode() == 0
gstopencv_cargs += '-DOPENCV_PATH_NAME="OpenCV"'
else
- r = run_command('test', '-d', opencv_prefix + '/share/opencv4')
+ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv4')
if r.returncode() == 0
gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv4"'
else
--
2.28.0

View File

@ -1,31 +0,0 @@
From 1f00d5026118ebd48e4ccf83d32d67155c4e7f60 Mon Sep 17 00:00:00 2001
From: Naveen Saini <naveen.kumar.saini@intel.com>
Date: Wed, 30 Dec 2020 16:37:47 +0800
Subject: [PATCH] msdk: fix includedir path
In cross compilation, need to prepend PKG_CONFIG_SYSROOT_DIR to the dir path.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
sys/msdk/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/msdk/meson.build b/sys/msdk/meson.build
index 6346c9451..068f38548 100644
--- a/sys/msdk/meson.build
+++ b/sys/msdk/meson.build
@@ -40,7 +40,9 @@ endif
mfx_dep = dependency('libmfx', required: false)
if mfx_dep.found()
+ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
mfx_incdir = mfx_dep.get_pkgconfig_variable('includedir')
+ mfx_incdir = pkgconf_sysroot + mfx_incdir
mfx_inc = []
else
# Old versions of MediaSDK don't provide a pkg-config file
--
2.17.1

View File

@ -1,197 +0,0 @@
# This recipe is for the i.MX fork of gstreamer1.0-plugins-bad. For ease of
# maintenance, the top section is a verbatim copy of an OE-core
# recipe. The second section customizes the recipe for i.MX.
########### OE-core copy ##################
# Upstream hash: 633739bc912cf84c78f5ae0f7fbcb41663a05c7f
require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
DESCRIPTION = "'Bad' GStreamer plugins and helper libraries "
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \
file://0002-avoid-including-sys-poll.h-directly.patch \
file://0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch \
file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
file://0005-msdk-fix-includedir-path.patch \
"
SRC_URI[sha256sum] = "74e806bc5595b18c70e9ca93571e27e79dfb808e5d2e7967afa952b52e99c85f"
S = "${WORKDIR}/gst-plugins-bad-${PV}"
LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
DEPENDS += "gstreamer1.0-plugins-base"
inherit gobject-introspection
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
bz2 closedcaption curl dash dtls hls rsvg sbc smoothstreaming sndfile \
ttml uvch264 webp \
"
PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom"
PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass"
PACKAGECONFIG[bluez] = "-Dbluez=enabled,-Dbluez=disabled,bluez5"
PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
PACKAGECONFIG[closedcaption] = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo"
PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl"
PACKAGECONFIG[dash] = "-Ddash=enabled,-Ddash=disabled,libxml2"
PACKAGECONFIG[dc1394] = "-Ddc1394=enabled,-Ddc1394=disabled,libdc1394"
PACKAGECONFIG[directfb] = "-Ddirectfb=enabled,-Ddirectfb=disabled,directfb"
PACKAGECONFIG[dtls] = "-Ddtls=enabled,-Ddtls=disabled,openssl"
PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac"
PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2"
PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth"
PACKAGECONFIG[hls] = "-Dhls=enabled -Dhls-crypto=nettle,-Dhls=disabled,nettle"
# the gl packageconfig enables OpenGL elements that haven't been ported
# to -base yet. They depend on the gstgl library in -base, so we do
# not add GL dependencies here, since these are taken care of in -base.
PACKAGECONFIG[gl] = "-Dgl=enabled,-Dgl=disabled,"
PACKAGECONFIG[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm"
PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265"
PACKAGECONFIG[libmms] = "-Dlibmms=enabled,-Dlibmms=disabled,libmms"
PACKAGECONFIG[libssh2] = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2"
PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms"
PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug"
PACKAGECONFIG[msdk] = "-Dmsdk=enabled,-Dmsdk=disabled,intel-mediasdk"
PACKAGECONFIG[neon] = "-Dneon=enabled,-Dneon=disabled,neon"
PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft"
PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv"
PACKAGECONFIG[openh264] = "-Dopenh264=enabled,-Dopenh264=disabled,openh264"
PACKAGECONFIG[openjpeg] = "-Dopenjpeg=enabled,-Dopenjpeg=disabled,openjpeg"
PACKAGECONFIG[openmpt] = "-Dopenmpt=enabled,-Dopenmpt=disabled,libopenmpt"
# the opus encoder/decoder elements are now in the -base package,
# but the opus parser remains in -bad
PACKAGECONFIG[opusparse] = "-Dopus=enabled,-Dopus=disabled,libopus"
PACKAGECONFIG[resindvd] = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav"
PACKAGECONFIG[rsvg] = "-Drsvg=enabled,-Drsvg=disabled,librsvg"
PACKAGECONFIG[rtmp] = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump"
PACKAGECONFIG[sbc] = "-Dsbc=enabled,-Dsbc=disabled,sbc"
PACKAGECONFIG[sctp] = "-Dsctp=enabled,-Dsctp=disabled"
PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2"
PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
PACKAGECONFIG[srt] = "-Dsrt=enabled,-Dsrt=disabled,srt"
PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp"
PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa"
PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo"
PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev"
PACKAGECONFIG[v4l2codecs] = "-Dv4l2codecs=enabled,-Dv4l2codecs=disabled,libgudev"
PACKAGECONFIG[va] = "-Dva=enabled,-Dva=disabled,libva"
PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc"
PACKAGECONFIG[voamrwbenc] = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc"
PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader shaderc-native"
PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm"
PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp"
PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice"
PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing"
PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar"
PACKAGECONFIG[x265] = "-Dx265=enabled,-Dx265=disabled,x265"
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Ddecklink=enabled \
-Ddvb=enabled \
-Dfbdev=enabled \
-Dipcpipeline=enabled \
-Dshm=enabled \
-Dtranscode=enabled \
-Dandroidmedia=disabled \
-Dapplemedia=disabled \
-Davtp=disabled \
-Dbs2b=disabled \
-Dchromaprint=disabled \
-Dd3dvideosink=disabled \
-Dd3d11=disabled \
-Ddirectsound=disabled \
-Ddts=disabled \
-Dfdkaac=disabled \
-Dflite=disabled \
-Dgme=disabled \
-Dgsm=disabled \
-Diqa=disabled \
-Dkate=disabled \
-Dladspa=disabled \
-Dlv2=disabled \
-Dmagicleap=disabled \
-Dmediafoundation=disabled \
-Dmicrodns=disabled \
-Dmpeg2enc=disabled \
-Dmplex=disabled \
-Dmusepack=disabled \
-Dnvcodec=disabled \
-Dofa=disabled \
-Dopenexr=disabled \
-Dopenni2=disabled \
-Dopensles=disabled \
-Dsoundtouch=disabled \
-Dspandsp=disabled \
-Dsvthevcenc=disabled \
-Dteletext=disabled \
-Dwasapi=disabled \
-Dwasapi2=disabled \
-Dwildmidi=disabled \
-Dwinks=disabled \
-Dwinscreencap=disabled \
-Dwpe=disabled \
-Dzxing=disabled \
"
export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
ARM_INSTRUCTION_SET:armv4 = "arm"
ARM_INSTRUCTION_SET:armv5 = "arm"
FILES:${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs"
FILES:${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
FILES:${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles"
FILES:${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs"
########### End of OE-core copy ###########
########### i.MX overrides ################
DEFAULT_PREFERENCE = "-1"
DEPENDS:append:imxgpu2d = " virtual/libg2d"
SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz"
GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https"
SRCBRANCH = "MM_04.06.03_2110_L5.10.y"
SRC_URI:prepend = "${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} "
SRCREV = "64ea74a49cc06da92126cc680968497df679da8c"
S = "${WORKDIR}/git"
inherit use-imx-headers
PACKAGE_ARCH:imxpxp = "${MACHINE_SOCARCH}"
PACKAGE_ARCH:mx8 = "${MACHINE_SOCARCH}"
PACKAGECONFIG_REMOVE ?= " \
dtls vulkan \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'gl', d)} \
"
PACKAGECONFIG:remove = "${PACKAGECONFIG_REMOVE}"
PACKAGECONFIG:append:mx8 = " kms tinycompress"
PACKAGECONFIG[tinycompress] = "-Dtinycompress=enabled,-Dtinycompress=disabled,tinycompress"
# Disable introspection to fix [GstPlayer-1.0.gir] Error
EXTRA_OEMESON += " \
-Dintrospection=disabled \
-Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \
"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
########### End of i.MX overrides #########

View File

@ -1,30 +0,0 @@
From 4b5c7f655bf10b8b58df5ed5647a711b3502d4d2 Mon Sep 17 00:00:00 2001
From: Carlos Rafael Giani <crg7475@mailbox.org>
Date: Tue, 21 May 2019 14:01:11 +0200
Subject: [PATCH] viv-fb: Make sure config.h is included
This prevents build errors due to missing GST_API_* symbols
Upstream-Status: Pending
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
---
gst-libs/gst/gl/gl-prelude.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h
index 05e1f6229..96ce5e685 100644
--- a/gst-libs/gst/gl/gl-prelude.h
+++ b/gst-libs/gst/gl/gl-prelude.h
@@ -22,6 +22,10 @@
#ifndef __GST_GL_PRELUDE_H__
#define __GST_GL_PRELUDE_H__
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <gst/gst.h>
#ifdef BUILDING_GST_GL

View File

@ -1,138 +0,0 @@
# This recipe is for the i.MX fork of gstreamer1.0-plugins-base. For ease of
# maintenance, the top section is a verbatim copy of an OE-core
# recipe. The second section customizes the recipe for i.MX.
########### OE-core copy ##################
# Upstream hash: 633739bc912cf84c78f5ae0f7fbcb41663a05c7f
require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
DESCRIPTION = "'Base' GStreamer plugins and helper libraries"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues"
LICENSE = "GPLv2+ & LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
file://0003-viv-fb-Make-sure-config.h-is-included.patch \
file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
file://0004-glimagesink-Downrank-to-marginal.patch \
"
SRC_URI[sha256sum] = "29e53229a84d01d722f6f6db13087231cdf6113dd85c25746b9b58c3d68e8323"
S = "${WORKDIR}/gst-plugins-base-${PV}"
DEPENDS += "iso-codes util-linux zlib"
inherit gobject-introspection
PACKAGES_DYNAMIC =+ "^libgst.*"
# opengl packageconfig factored out to make it easy for distros
# and BSP layers to choose OpenGL APIs/platforms/window systems
PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
${PACKAGECONFIG_GL} \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
jpeg ogg pango png theora vorbis \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
"
OPENGL_APIS = 'opengl gles2'
OPENGL_PLATFORMS = 'egl'
X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled"
PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib"
PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia"
PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg"
PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg"
PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus"
PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango"
PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng"
PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora"
PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor"
PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual"
PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis"
PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
# OpenGL API packageconfigs
PACKAGECONFIG[opengl] = ",,virtual/libgl libglu"
PACKAGECONFIG[gles2] = ",,virtual/libgles2"
# OpenGL platform packageconfigs
PACKAGECONFIG[egl] = ",,virtual/egl"
# OpenGL window systems (except for X11)
PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
OPENGL_WINSYS:append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', ' x11', '', d)}"
OPENGL_WINSYS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gbm', ' gbm', '', d)}"
OPENGL_WINSYS:append = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', ' wayland', '', d)}"
OPENGL_WINSYS:append = "${@bb.utils.contains('PACKAGECONFIG', 'dispmanx', ' dispmanx', '', d)}"
OPENGL_WINSYS:append = "${@bb.utils.contains('PACKAGECONFIG', 'egl', ' egl', '', d)}"
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Dgl-graphene=disabled \
${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \
${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \
${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \
"
FILES:${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h"
FILES:${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
def get_opengl_cmdline_list(switch_name, options, d):
selected_options = []
if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
for option in options.split():
if bb.utils.contains('PACKAGECONFIG', option, True, False, d):
selected_options += [option]
if selected_options:
return '-D' + switch_name + '=' + ','.join(selected_options)
else:
return ''
CVE_PRODUCT += "gst-plugins-base"
########### End of OE-core copy ###########
########### i.MX overrides ################
DEFAULT_PREFERENCE = "-1"
DEPENDS:append:imxgpu2d = " virtual/libg2d"
SRC_URI:remove = " \
https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
file://0004-glimagesink-Downrank-to-marginal.patch \
"
GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https"
SRCBRANCH = "MM_04.06.03_2110_L5.10.y"
SRC_URI:prepend = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} "
SRCREV = "5fe4c49ad969d0bc5e104212ad261911b15a0b83"
S = "${WORKDIR}/git"
inherit use-imx-headers
PACKAGECONFIG_REMOVE ?= "jpeg"
PACKAGECONFIG:remove = "${PACKAGECONFIG_REMOVE}"
PACKAGECONFIG_GL:append = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' viv-fb', '', d)}"
PACKAGECONFIG[viv-fb] = ",,virtual/libgles2"
OPENGL_WINSYS:append = "${@bb.utils.contains('PACKAGECONFIG', 'viv-fb', ' viv-fb', '', d)}"
EXTRA_OEMESON += "-Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}""
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
########### End of i.MX overrides #########

View File

@ -1,56 +0,0 @@
From bf8b2fa0f6870589d036f0f33c140a3f85b530a0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 31 Mar 2020 21:23:28 -0700
Subject: [PATCH] qt: include ext/qt/gstqtgl.h instead of gst/gl/gstglfuncs.h
gst/gl/gstglfuncs.h is included via ext/qt/gstqtgl.h which has logic to
prefer qt headers definitions for GLsync
This helps in fixing build errors like below
/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/QtGui/qopengles2ext.h:24:26: error: conflicting declaration 'typedef struct __GLsync* GLsync'
24 | typedef struct __GLsync *GLsync;
| ^~~~~~
In file included from /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:84,
from ../gst-plugins-good-1.16.2/ext/qt/gstqsgtexture.cc:30:
/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: note: previous declaration as 'typedef void* GLsync
'
40 | typedef gpointer GLsync;
| ^~~~~~
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ext/qt/gstqsgtexture.cc | 2 +-
ext/qt/qtwindow.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc
index a05d26e..4cc9fc6 100644
--- a/ext/qt/gstqsgtexture.cc
+++ b/ext/qt/gstqsgtexture.cc
@@ -27,7 +27,7 @@
#include <gst/video/video.h>
#include <gst/gl/gl.h>
-#include <gst/gl/gstglfuncs.h>
+#include <ext/qt/gstqtgl.h>
#include "gstqsgtexture.h"
#define GST_CAT_DEFAULT gst_qsg_texture_debug
diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
index 9360c33..0dfd3f1 100644
--- a/ext/qt/qtwindow.cc
+++ b/ext/qt/qtwindow.cc
@@ -25,7 +25,7 @@
#include <stdio.h>
#include <gst/video/video.h>
-#include <gst/gl/gstglfuncs.h>
+#include <ext/qt/gstqtgl.h>
#include "qtwindow.h"
#include "gstqsgtexture.h"
#include "gstqtglutility.h"
--
2.28.0

View File

@ -1,109 +0,0 @@
# This recipe is for the i.MX fork of gstreamer1.0-plugins-good. For ease of
# maintenance, the top section is a verbatim copy of an OE-core
# recipe. The second section customizes the recipe for i.MX.
########### OE-core copy ##################
# Upstream hash: 633739bc912cf84c78f5ae0f7fbcb41663a05c7f
require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
DESCRIPTION = "'Good' GStreamer plugins"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \
file://0002-rtpjitterbuffer-Fix-parsing-of-the-mediaclk-direct-f.patch \
"
SRC_URI[sha256sum] = "b6e50e3a9bbcd56ee6ec71c33aa8332cc9c926b0c1fae995aac8b3040ebe39b0"
S = "${WORKDIR}/gst-plugins-good-${PV}"
LICENSE = "GPLv2+ & LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
DEPENDS += "gstreamer1.0-plugins-base libcap zlib"
RPROVIDES:${PN}-pulseaudio += "${PN}-pulse"
RPROVIDES:${PN}-soup += "${PN}-souphttpsrc"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \
${@bb.utils.contains('TUNE_FEATURES', 'm64', 'asm', '', d)} \
bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 soup speex taglib v4l2 \
"
X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled"
X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled"
QT5WAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}"
PACKAGECONFIG[asm] = "-Dasm=enabled,-Dasm=disabled,nasm-native"
PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
PACKAGECONFIG[dv1394] = "-Ddv1394=enabled,-Ddv1394=disabled,libiec61883 libavc1394 libraw1394"
PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac"
PACKAGECONFIG[gdk-pixbuf] = "-Dgdk-pixbuf=enabled,-Dgdk-pixbuf=disabled,gdk-pixbuf"
PACKAGECONFIG[gtk] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk+3"
PACKAGECONFIG[gudev] = "-Dv4l2-gudev=enabled,-Dv4l2-gudev=disabled,libgudev"
PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack"
PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg"
PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame"
PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng"
PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils"
PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123"
PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio"
PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native ${QT5WAYLANDDEPENDS}"
PACKAGECONFIG[soup] = "-Dsoup=enabled,-Dsoup=disabled,libsoup-2.4"
PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex"
PACKAGECONFIG[rpi] = "-Drpicamsrc=enabled,-Drpicamsrc=disabled,userland"
PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib"
PACKAGECONFIG[v4l2] = "-Dv4l2=enabled -Dv4l2-probe=true,-Dv4l2=disabled -Dv4l2-probe=false"
PACKAGECONFIG[vpx] = "-Dvpx=enabled,-Dvpx=disabled,libvpx"
PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack"
PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Daalib=disabled \
-Ddirectsound=disabled \
-Ddv=disabled \
-Dlibcaca=disabled \
-Doss=enabled \
-Doss4=disabled \
-Dosxaudio=disabled \
-Dosxvideo=disabled \
-Dshout2=disabled \
-Dtwolame=disabled \
-Dwaveform=disabled \
"
FILES:${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
########### End of OE-core copy ###########
########### i.MX overrides ################
DEFAULT_PREFERENCE = "-1"
# fb implementation of v4l2 uses libdrm
DEPENDS_V4L2 = "${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'libdrm', d)}"
DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'v4l2', '${DEPENDS_V4L2}', '', d)}"
SRC_URI:remove = " \
https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
file://0002-rtpjitterbuffer-Fix-parsing-of-the-mediaclk-direct-f.patch \
"
GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https"
SRCBRANCH = "MM_04.06.03_2110_L5.10.y"
SRC_URI:prepend = "${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} "
SRCREV = "7113baa4dd681cf028b04ef4ebe70b06db4b0f08"
S = "${WORKDIR}/git"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
########### End of i.MX overrides #########

View File

@ -1,43 +0,0 @@
require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
DESCRIPTION = "'Ugly GStreamer plugins"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues"
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+"
LICENSE_FLAGS = "commercial"
SRC_URI = " \
https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
"
SRC_URI[sha256sum] = "df32803e98f8a9979373fa2ca7e05e62f977b1097576d3a80619d9f5c69f66d9"
S = "${WORKDIR}/gst-plugins-ugly-${PV}"
DEPENDS += "gstreamer1.0-plugins-base"
GST_PLUGIN_SET_HAS_EXAMPLES = "0"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
a52dec mpeg2dec \
"
PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52"
PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr"
PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr"
PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio"
PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread"
PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec"
PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264"
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Dsidplay=disabled \
"
FILES:${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
FILES:${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"

View File

@ -1,31 +0,0 @@
SUMMARY = "A library on top of GStreamer for building an RTSP server"
HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
SECTION = "multimedia"
LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
PNREAL = "gst-rtsp-server"
SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
SRC_URI[sha256sum] = "04d63bf48816c6f41c73f6de0f912a7cef0aab39c44162a7bcece1923dfc9d1f"
S = "${WORKDIR}/${PNREAL}-${PV}"
inherit meson pkgconfig upstream-version-is-even gobject-introspection
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Dexamples=disabled \
-Dtests=disabled \
"
GIR_MESON_ENABLE_FLAG = "enabled"
GIR_MESON_DISABLE_FLAG = "disabled"
# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
CVE_PRODUCT += "gst-rtsp-server"

View File

@ -1,64 +0,0 @@
From 14a8b5f82f70b7619e3b5596dec14fa6532919d5 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sat, 10 Oct 2020 19:09:03 +0000
Subject: [PATCH] gstpluginloader: when env var is set do not fall through to
system plugin scanner
If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
Falling through to the one installed on the system is problamatic in cross-compilation
environemnts, regardless of whether one pointed to by the env var succeeded or failed.
taken from:
http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch?id=0db7ba34ca41b107042306d13a6f0162885c123b
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
gst/gstpluginloader.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c
index 621b24349..4e0f64650 100644
--- a/gst/gstpluginloader.c
+++ b/gst/gstpluginloader.c
@@ -464,20 +464,19 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
if (loader->child_running)
return TRUE;
- /* Find the gst-plugin-scanner: first try the env-var if it is set,
- * otherwise use the installed version */
+ /* Find the gst-plugin-scanner */
env = g_getenv ("GST_PLUGIN_SCANNER_1_0");
if (env == NULL)
env = g_getenv ("GST_PLUGIN_SCANNER");
if (env != NULL && *env != '\0') {
+ /* use the env-var if it is set */
GST_LOG ("Trying GST_PLUGIN_SCANNER env var: %s", env);
helper_bin = g_strdup (env);
res = gst_plugin_loader_try_helper (loader, helper_bin);
g_free (helper_bin);
- }
-
- if (!res) {
+ } else {
+ /* use the installed version */
GST_LOG ("Trying installed plugin scanner");
#ifdef G_OS_WIN32
@@ -497,10 +496,10 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
#endif
res = gst_plugin_loader_try_helper (loader, helper_bin);
g_free (helper_bin);
+ }
- if (!res) {
- GST_INFO ("No gst-plugin-scanner available, or not working");
- }
+ if (!res) {
+ GST_INFO ("No gst-plugin-scanner available, or not working");
}
return loader->child_running;

View File

@ -1,30 +0,0 @@
From 30958cc93d4872926a7e8f139ad45d29b5be2520 Mon Sep 17 00:00:00 2001
From: Seungha Yang <seungha@centricular.com>
Date: Tue, 15 Sep 2020 00:54:58 +0900
Subject: [PATCH] tests: seek: Don't use too strict timeout for validation
Expected segment-done message might not be seen within expected
time if system is not powerful enough.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625>
Upstream-Status: Backport [https://cgit.freedesktop.org/gstreamer/gstreamer/commit?id=f44312ae5d831438fcf8041162079c65321c588c]
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
tests/check/pipelines/seek.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/check/pipelines/seek.c b/tests/check/pipelines/seek.c
index 28bb8846d..5f7447bc5 100644
--- a/tests/check/pipelines/seek.c
+++ b/tests/check/pipelines/seek.c
@@ -521,7 +521,7 @@ GST_START_TEST (test_loopback_2)
GST_INFO ("wait for segment done message");
- msg = gst_bus_timed_pop_filtered (bus, (GstClockTime) 2 * GST_SECOND,
+ msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR);
fail_unless (msg, "no message within the timed window");
fail_unless_equals_string (GST_MESSAGE_TYPE_NAME (msg), "segment-done");

View File

@ -1,110 +0,0 @@
From caa29d32c6729aa6a7005d6cf8ea5e36ff710272 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
Date: Fri, 14 Aug 2020 16:38:26 +0100
Subject: [PATCH] Remove unused valgrind detection
Having this just to log a debug message in case we're
running inside valgrind doesn't seem very useful, and
the code that used to use this no longer exists it seems.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595>
Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
gst/gst_private.h | 2 --
gst/gstinfo.c | 39 ---------------------------------------
meson.build | 1 -
3 files changed, 42 deletions(-)
diff --git a/gst/gst_private.h b/gst/gst_private.h
index eefd044d9..8252ede51 100644
--- a/gst/gst_private.h
+++ b/gst/gst_private.h
@@ -116,8 +116,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin
G_GNUC_INTERNAL gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin);
-G_GNUC_INTERNAL gboolean _priv_gst_in_valgrind (void);
-
/* init functions called from gst_init(). */
G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void);
G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void);
diff --git a/gst/gstinfo.c b/gst/gstinfo.c
index eea1a219d..d3035d6db 100644
--- a/gst/gstinfo.c
+++ b/gst/gstinfo.c
@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT;
static gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT;
static gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON;
-/* FIXME: export this? */
-gboolean
-_priv_gst_in_valgrind (void)
-{
- static enum
- {
- GST_VG_UNCHECKED,
- GST_VG_NO_VALGRIND,
- GST_VG_INSIDE
- }
- in_valgrind = GST_VG_UNCHECKED;
-
- if (in_valgrind == GST_VG_UNCHECKED) {
-#ifdef HAVE_VALGRIND_VALGRIND_H
- if (RUNNING_ON_VALGRIND) {
- GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind");
- in_valgrind = GST_VG_INSIDE;
- } else {
- GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff");
- in_valgrind = GST_VG_NO_VALGRIND;
- }
-#else
- in_valgrind = GST_VG_NO_VALGRIND;
-#endif
- g_assert (in_valgrind == GST_VG_NO_VALGRIND ||
- in_valgrind == GST_VG_INSIDE);
- }
- return (in_valgrind == GST_VG_INSIDE);
-}
-
static gchar *
_replace_pattern_in_gst_debug_file_name (gchar * name, const char *token,
guint val)
@@ -463,9 +433,6 @@ _priv_gst_debug_init (void)
_priv_GST_CAT_PROTECTION =
_gst_debug_category_new ("GST_PROTECTION", 0, "protection");
- /* print out the valgrind message if we're in valgrind */
- _priv_gst_in_valgrind ();
-
env = g_getenv ("GST_DEBUG_OPTIONS");
if (env != NULL) {
if (strstr (env, "full_tags") || strstr (env, "full-tags"))
@@ -2505,12 +2472,6 @@ gst_debug_construct_win_color (guint colorinfo)
return 0;
}
-gboolean
-_priv_gst_in_valgrind (void)
-{
- return FALSE;
-}
-
void
_gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file,
const gchar * func, gint line, GObject * obj, const gchar * msg,
diff --git a/meson.build b/meson.build
index 82a17282b..42ae61790 100644
--- a/meson.build
+++ b/meson.build
@@ -200,7 +200,6 @@ check_headers = [
'sys/wait.h',
'ucontext.h',
'unistd.h',
- 'valgrind/valgrind.h',
'sys/resource.h',
'sys/uio.h',
]

View File

@ -1,255 +0,0 @@
From 1453e8c73b8cb9414143df6a7dd164709d3c454c Mon Sep 17 00:00:00 2001
From: Carlos Rafael Giani <crg7475@mailbox.org>
Date: Fri, 25 Oct 2019 00:06:26 +0200
Subject: [PATCH] meson: Add option for installed tests
This adds an option for producing installed versions of the unit tests.
These versions don't need meson to run (only a small shell script). This
makes it easier to run cross compiled tests on a target machine.
Upstream-Status: Pending
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
---
build-aux/gen-installed-test-desc.py | 18 ++++++
build-aux/gen-installed-test-shscript.py | 25 ++++++++
meson_options.txt | 2 +
tests/check/meson.build | 46 +++++++++++++-
tests/files/testfile | 80 ++++++++++++++++++++++++
5 files changed, 170 insertions(+), 1 deletion(-)
create mode 100644 build-aux/gen-installed-test-desc.py
create mode 100644 build-aux/gen-installed-test-shscript.py
create mode 100644 tests/files/testfile
diff --git a/build-aux/gen-installed-test-desc.py b/build-aux/gen-installed-test-desc.py
new file mode 100644
index 000000000..69e8a0faf
--- /dev/null
+++ b/build-aux/gen-installed-test-desc.py
@@ -0,0 +1,18 @@
+import sys
+import os
+import argparse
+
+def write_template(filename, data):
+ with open(filename, 'w') as f:
+ f.write(data)
+
+def build_template(testdir, testname):
+ return "[Test]\nType=session\nExec={}\n".format(os.path.join(testdir, testname))
+
+argparser = argparse.ArgumentParser(description='Generate installed-test data.')
+argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory')
+argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name')
+argparser.add_argument('--output', metavar='file', required=True, help='Output file')
+args = argparser.parse_args()
+
+write_template(args.output, build_template(args.test_execdir, args.testname))
diff --git a/build-aux/gen-installed-test-shscript.py b/build-aux/gen-installed-test-shscript.py
new file mode 100644
index 000000000..5da86fb37
--- /dev/null
+++ b/build-aux/gen-installed-test-shscript.py
@@ -0,0 +1,25 @@
+import sys
+import os
+import argparse
+
+def write_template(filename, data):
+ with open(filename, 'w') as f:
+ f.write(data)
+
+def build_template(testdir, testname):
+ return ''.join([
+ "#!/usr/bin/env sh\n",
+ "export GST_STATE_IGNORE_ELEMENTS=''\n",
+ "export CK_DEFAULT_TIMEOUT=20\n",
+ "export GST_PLUGIN_LOADING_WHITELIST='gstreamer'\n",
+ "{}\n".format(os.path.join(testdir, testname)),
+ ])
+
+argparser = argparse.ArgumentParser(description='Generate installed-test data.')
+argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory')
+argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name')
+argparser.add_argument('--output', metavar='file', required=True, help='Output file')
+args = argparser.parse_args()
+
+write_template(args.output, build_template(args.test_execdir, args.testname))
+os.chmod(args.output, 0o755)
diff --git a/meson_options.txt b/meson_options.txt
index 72c3997e2..346c423d4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -15,6 +15,8 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
option('memory-alignment', type: 'combo',
choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
value: 'malloc')
+option('installed-tests', type : 'boolean', value : false, description : 'enable installed tests')
+option('test-files-path', type : 'string', description : 'Path where to find test files')
# Feature options
option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
diff --git a/tests/check/meson.build b/tests/check/meson.build
index a617cf159..e629131c5 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
@@ -120,11 +120,17 @@ if add_languages('cpp', native: false, required: false)
]
endif
+test_files_path = get_option('test-files-path')
+if test_files_path == ''
+ test_files_path = meson.current_source_dir() + '/../files'
+endif
+message('Using path "@0@" as the path to read test files from'.format(test_files_path))
+
test_defines = [
'-UG_DISABLE_ASSERT',
'-UG_DISABLE_CAST_CHECKS',
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
+ '-DTESTFILE="@0@"'.format(test_files_path + '/testfile'),
'-DGST_DISABLE_DEPRECATED',
]
@@ -138,6 +144,14 @@ endif
glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep]
gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep]
+installed_tests_datadir = join_paths(prefix, get_option('datadir'), 'installed-tests', 'gstreamer-1.0')
+installed_tests_execdir = join_paths(prefix, libexecdir, 'installed-tests', 'gstreamer-1.0')
+installed_tests_enabled = get_option('installed-tests')
+
+python = import('python').find_installation()
+gen_installed_test_desc = files('../../build-aux/gen-installed-test-desc.py')
+gen_installed_test_shscript = files('../../build-aux/gen-installed-test-shscript.py')
+
foreach t : core_tests
fname = t[0]
test_name = fname.split('.')[0].underscorify()
@@ -151,8 +165,38 @@ foreach t : core_tests
include_directories : [configinc],
link_with : link_with_libs,
dependencies : test_deps + glib_deps + gst_deps,
+ install_dir: installed_tests_execdir,
+ install: installed_tests_enabled
)
+ if installed_tests_enabled
+ installed_test_shscript = test_name + '.sh'
+ shscript = custom_target (test_name + '_shscript',
+ output: installed_test_shscript,
+ command: [
+ python,
+ gen_installed_test_shscript,
+ '--test-execdir=@0@'.format(installed_tests_execdir),
+ '--testname=@0@'.format(test_name),
+ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_shscript)),
+ ],
+ install: true,
+ install_dir: installed_tests_execdir)
+
+ installed_test_desc = test_name + '.test'
+ data = custom_target(test_name + '_desc',
+ output: installed_test_desc,
+ command: [
+ python,
+ gen_installed_test_desc,
+ '--test-execdir=@0@'.format(installed_tests_execdir),
+ '--testname=@0@'.format(installed_test_shscript),
+ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_desc)),
+ ],
+ install: true,
+ install_dir: installed_tests_datadir)
+ endif
+
env = environment()
env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
diff --git a/tests/files/testfile b/tests/files/testfile
new file mode 100644
index 000000000..89954e0e2
--- /dev/null
+++ b/tests/files/testfile
@@ -0,0 +1,80 @@
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................
+................................................................................

View File

@ -1,97 +0,0 @@
# This recipe is for the i.MX fork of gstreamer1.0. For ease of
# maintenance, the top section is a verbatim copy of an OE-core
# recipe. The second section customizes the recipe for i.MX.
########### OE-core copy ##################
# Upstream hash: 633739bc912cf84c78f5ae0f7fbcb41663a05c7f
SUMMARY = "GStreamer 1.0 multimedia framework"
DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \
It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime."
HOMEPAGE = "http://gstreamer.freedesktop.org/"
BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
SECTION = "multimedia"
LICENSE = "LGPLv2+"
DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native"
inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection
LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
S = "${WORKDIR}/gstreamer-${PV}"
SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
file://0002-Remove-unused-valgrind-detection.patch \
file://0003-meson-Add-option-for-installed-tests.patch \
file://0001-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch \
"
SRC_URI[sha256sum] = "9aeec99b38e310817012aa2d1d76573b787af47f8a725a65b833880a094dfbc5"
PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
check \
debug \
tools"
PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false"
PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false"
PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled"
PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled"
PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false"
PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils"
PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion"
PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled"
PACKAGECONFIG[setcap] = "-Dptp-helper-permissions=capabilities,,libcap libcap-native"
# TODO: put this in a gettext.bbclass patch
def gettext_oemeson(d):
if d.getVar('USE_NLS') == 'no':
return '-Dnls=disabled'
# Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
return '-Dnls=disabled'
return '-Dnls=enabled'
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Dexamples=disabled \
-Ddbghelp=disabled \
${@gettext_oemeson(d)} \
"
GIR_MESON_ENABLE_FLAG = "enabled"
GIR_MESON_DISABLE_FLAG = "disabled"
PACKAGES += "${PN}-bash-completion"
# Add the core element plugins to the main package
FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb"
CVE_PRODUCT = "gstreamer"
require recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc
########### End of OE-core copy ###########
########### i.MX overrides ################
DEFAULT_PREFERENCE = "-1"
# Use i.MX fork of GST for customizations
SRC_URI:remove = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz"
GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https"
SRCBRANCH = "MM_04.06.03_2110_L5.10.y"
SRC_URI:prepend = "${GST1.0_SRC};branch=${SRCBRANCH} "
SRCREV = "a55998c70940bd183d25d29e1b82fd3bc9f43df3"
S = "${WORKDIR}/git"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
########### End of i.MX overrides #########

View File

@ -17,10 +17,10 @@ https://jira.digi.com/browse/DEL-3399
1 file changed, 1 insertion(+)
diff --git a/libs/v4l2_core/gstimxv4l2.c b/libs/v4l2_core/gstimxv4l2.c
index 52f43794a71d..633f267df4b8 100755
index 257a60422e76..58cdcdad3ffd 100755
--- a/libs/v4l2_core/gstimxv4l2.c
+++ b/libs/v4l2_core/gstimxv4l2.c
@@ -208,6 +208,7 @@ static guint g_camera_format_PXP[] = {
@@ -212,6 +212,7 @@ static guint g_camera_format_PXP[] = {
static IMXV4l2DeviceMap g_device_maps[] = {
{"/dev/video0", FALSE, "/dev/fb0"},

View File

@ -9,7 +9,7 @@ Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/gplay2/gplay2.c b/tools/gplay2/gplay2.c
index 3fa056a86307..a6e5db5535d2 100755
index 1e37521a06cc..f001a883d74f 100755
--- a/tools/gplay2/gplay2.c
+++ b/tools/gplay2/gplay2.c
@@ -26,7 +26,6 @@
@ -21,7 +21,7 @@ index 3fa056a86307..a6e5db5535d2 100755
#include <pthread.h>
#include <stdio.h>
diff --git a/tools/grecorder/grecorder.c b/tools/grecorder/grecorder.c
index 1fec19f900fe..dc912d36e056 100644
index c8eff2f53efd..841a0aa83fba 100644
--- a/tools/grecorder/grecorder.c
+++ b/tools/grecorder/grecorder.c
@@ -24,7 +24,9 @@

View File

@ -1,4 +1,4 @@
# Copyright (C) 2016-2020 Digi International Inc.
# Copyright (C) 2016-2022 Digi International Inc.
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"

View File

@ -1,82 +0,0 @@
# Copyright (C) 2014,2016 Freescale Semiconductor
# Copyright 2017-2021 NXP
# Copyright (C) 2012-2015 O.S. Systems Software LTDA.
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Gstreamer freescale plugins"
LICENSE = "GPLv2 & LGPLv2 & LGPLv2.1"
SECTION = "multimedia"
DEPENDS = "imx-codec imx-parser libdrm gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
DEPENDS:append:mx6 = " imx-lib"
DEPENDS:append:mx7 = " imx-lib"
DEPENDS:append:mx8ulp = " imx-lib"
DEPENDS:append:imxvpu = " imx-vpuwrap"
# For backwards compatibility
RREPLACES:${PN} = "gst1.0-fsl-plugin"
RPROVIDES:${PN} = "gst1.0-fsl-plugin"
RCONFLICTS:${PN} = "gst1.0-fsl-plugin"
LIC_FILES_CHKSUM = "file://COPYING-LGPL-2;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24"
IMXGST_SRC ?= "git://source.codeaurora.org/external/imx/imx-gst1.0-plugin.git;protocol=https"
SRCBRANCH = "MM_04.06.03_2110_L5.10.y"
SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH} \
"
SRCREV = "9f7bae2a59c06480e4bbf4b8f84718811b9eb812"
S = "${WORKDIR}/git"
inherit meson pkgconfig use-imx-headers
PLATFORM_mx6 = "MX6"
PLATFORM_mx6sl = "MX6SL"
PLATFORM_mx6sx = "MX6SX"
PLATFORM_mx6ul = "MX6UL"
PLATFORM_mx6sll = "MX6SLL"
PLATFORM_mx7= "MX7D"
PLATFORM_mx7ulp= "MX7ULP"
PLATFORM_mx8 = "MX8"
# Todo add a mechanism to map possible build targets
EXTRA_OEMESON = "-Dplatform=${PLATFORM} \
-Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \
"
PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine"
# Add codec list that the beep plugin run-time depended
BEEP_RDEPENDS = "imx-codec-aac imx-codec-mp3 imx-codec-oggvorbis"
RDEPENDS:${PN} += "imx-parser ${BEEP_RDEPENDS} gstreamer1.0-plugins-good-id3demux "
RDEPENDS:${PN}:append:mx8qm = " imx-dsp"
RDEPENDS:${PN}:append:mx8qxp = " imx-dsp"
RDEPENDS:${PN}:append:mx8mp = " imx-dsp"
RDEPENDS:${PN}:append:mx8ulp = " imx-dsp"
PACKAGECONFIG ?= ""
# FIXME: Add all features
# feature from excluded mm packages
PACKAGECONFIG[ac3] += ",,imx-ac3codec,imx-ac3codec"
# feature from special mm packages
PACKAGECONFIG[aacp] += ",,imx-aacpcodec,imx-aacpcodec"
MSDEPENDS = "imx-msparser imx-mscodec"
PACKAGECONFIG[wma10dec] += ",,${MSDEPENDS},${MSDEPENDS}"
PACKAGECONFIG[wma8enc] += ",,${MSDEPENDS},${MSDEPENDS}"
FILES:${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}"
FILES:${PN}-dbg += "${libdir}/gstreamer-1.0/.debug"
FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/pkgconfig/*.pc"
FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
FILES:${PN}-gplay = "${bindir}/gplay-1.0"
FILES:${PN}-libgplaycore = "${libdir}/libgplaycore-1.0${SOLIBS}"
FILES:${PN}-libgstfsl = "${libdir}/libgstfsl-1.0${SOLIBS}"
FILES:${PN}-grecorder = "${bindir}/grecorder-1.0"
FILES:${PN}-librecorder-engine = "${libdir}/librecorder_engine-1.0${SOLIBS}"
FILES:${PN}-libplayengine = "${libdir}/libplayengine-1.0${SOLIBS}"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"

View File

@ -1,221 +0,0 @@
From 4d4bc0a958fe254531920095fbabc241aad88113 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <shengjiu.wang@nxp.com>
Date: Tue, 28 Jul 2020 13:00:36 +0800
Subject: [PATCH] cplay: Support wave file
The supported format is mono/stereo, S16_LE/S32_LE, 8kHz-192kHz.
Command is:
cplay -c x -I PCM test.wav
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
include/tinycompress/wave_formats.h | 51 +++++++++++++
src/utils/cplay.c | 107 ++++++++++++++++++++++++++++
2 files changed, 158 insertions(+)
create mode 100644 include/tinycompress/wave_formats.h
diff --git a/include/tinycompress/wave_formats.h b/include/tinycompress/wave_formats.h
new file mode 100644
index 000000000000..4e2e009206cf
--- /dev/null
+++ b/include/tinycompress/wave_formats.h
@@ -0,0 +1,51 @@
+#ifndef WAVE_FORMATS_H
+#define WAVE_FORMATS_H 1
+
+#define COMPOSE_ID(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24))
+
+#define WAV_RIFF COMPOSE_ID('R','I','F','F')
+#define WAV_RIFX COMPOSE_ID('R','I','F','X')
+#define WAV_WAVE COMPOSE_ID('W','A','V','E')
+#define WAV_FMT COMPOSE_ID('f','m','t',' ')
+#define WAV_DATA COMPOSE_ID('d','a','t','a')
+
+/* WAVE fmt block constants from Microsoft mmreg.h header */
+#define WAV_FMT_PCM 0x0001
+#define WAV_FMT_IEEE_FLOAT 0x0003
+#define WAV_FMT_DOLBY_AC3_SPDIF 0x0092
+#define WAV_FMT_EXTENSIBLE 0xfffe
+
+/* Used with WAV_FMT_EXTENSIBLE format */
+#define WAV_GUID_TAG "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71"
+
+typedef struct {
+ u_int magic; /* 'RIFF' */
+ u_int length; /* filelen */
+ u_int type; /* 'WAVE' */
+} WaveHeader;
+
+typedef struct {
+ u_short format; /* see WAV_FMT_* */
+ u_short channels;
+ u_int sample_fq; /* frequence of sample */
+ u_int byte_p_sec;
+ u_short byte_p_spl; /* samplesize; 1 or 2 bytes */
+ u_short bit_p_spl; /* 8, 12 or 16 bit */
+} WaveFmtBody;
+
+typedef struct {
+ WaveFmtBody format;
+ u_short ext_size;
+ u_short bit_p_spl;
+ u_int channel_mask;
+ u_short guid_format; /* WAV_FMT_* */
+ u_char guid_tag[14]; /* WAV_GUID_TAG */
+} WaveFmtExtensibleBody;
+
+typedef struct {
+ u_int type; /* 'data' */
+ u_int length; /* samplecount */
+} WaveChunkHeader;
+
+
+#endif /* FORMATS */
diff --git a/src/utils/cplay.c b/src/utils/cplay.c
index 5b749419e731..8882f4d9746d 100644
--- a/src/utils/cplay.c
+++ b/src/utils/cplay.c
@@ -1,4 +1,6 @@
/*
+ * Copyright 2020 NXP
+ *
* This file is provided under a dual BSD/LGPLv2.1 license. When using or
* redistributing this file, you may do so under either license.
*
@@ -73,6 +75,8 @@
#include "tinycompress/tinycompress.h"
#include "tinycompress/tinymp3.h"
#include "tinycompress/id3_tag_decode.h"
+#include "tinycompress/wave_formats.h"
+#include <alsa/asoundlib.h>
static int verbose;
static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM;
@@ -166,6 +170,77 @@ static int parse_mp3_header(struct mp3_header *header, unsigned int *num_channel
return 0;
}
+static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate,
+ unsigned int *format) {
+ WaveHeader wave_header;
+ WaveChunkHeader chunk_header;
+ WaveFmtBody fmt_body;
+ int more_chunks = 1;
+
+ fread(&wave_header, sizeof(WaveHeader), 1, file);
+ if ((wave_header.magic != WAV_RIFF) ||
+ (wave_header.type != WAV_WAVE)) {
+ fprintf(stderr, "Error: it is not a riff/wave file\n");
+ return -1;
+ }
+
+ do {
+ fread(&chunk_header, sizeof(WaveChunkHeader), 1, file);
+ switch (chunk_header.type) {
+ case WAV_FMT:
+ fread(&fmt_body, sizeof(WaveFmtBody), 1, file);
+ /* If the format header is larger, skip the rest */
+ if (chunk_header.length > sizeof(WaveFmtBody))
+ fseek(file, chunk_header.length - sizeof(WaveFmtBody), SEEK_CUR);
+
+ *num_channels = fmt_body.channels;
+ *sample_rate = fmt_body.sample_fq;
+
+ switch (fmt_body.bit_p_spl) {
+ case 8:
+ *format = SND_PCM_FORMAT_U8;
+ break;
+ case 16:
+ *format = SND_PCM_FORMAT_S16_LE;
+ break;
+ case 24:
+ switch (fmt_body.byte_p_spl / fmt_body.channels) {
+ case 3:
+ *format = SND_PCM_FORMAT_S24_3LE;
+ break;
+ case 4:
+ *format = SND_PCM_FORMAT_S24_LE;
+ break;
+ default:
+ fprintf(stderr, "format error\n");
+ return -1;
+ }
+ break;
+ case 32:
+ if (fmt_body.format == WAV_FMT_PCM) {
+ *format = SND_PCM_FORMAT_S32_LE;
+ } else if (fmt_body.format == WAV_FMT_IEEE_FLOAT) {
+ *format = SND_PCM_FORMAT_FLOAT_LE;
+ }
+ break;
+ default:
+ fprintf(stderr, "format error\n");
+ return -1;
+ }
+ break;
+ case WAV_DATA:
+ /* Stop looking for chunks */
+ more_chunks = 0;
+ break;
+ default:
+ /* Unknown chunk, skip bytes */
+ fseek(file, chunk_header.length, SEEK_CUR);
+ }
+ } while (more_chunks);
+
+ return 0;
+}
+
static int print_time(struct compress *compress)
{
unsigned int avail;
@@ -385,6 +460,35 @@ void get_codec_iec(FILE *file, struct compr_config *config,
codec->format = 0;
}
+void get_codec_pcm(FILE *file, struct compr_config *config,
+ struct snd_codec *codec)
+{
+ unsigned int channels, rate, format;
+
+ if (parse_wav_header(file, &channels, &rate, &format) == -1) {
+ fclose(file);
+ exit(EXIT_FAILURE);
+ }
+
+ if (channels > 2 || (format != SND_PCM_FORMAT_S16_LE && format != SND_PCM_FORMAT_S32_LE) ||
+ rate > 192000) {
+ fprintf(stderr, "unsupported wave file\n");
+ fclose(file);
+ exit(EXIT_FAILURE);
+ }
+
+ codec->id = SND_AUDIOCODEC_PCM;
+ codec->ch_in = channels;
+ codec->ch_out = channels;
+ codec->sample_rate = rate;
+ codec->bit_rate = 0;
+ codec->rate_control = 0;
+ codec->profile = SND_AUDIOPROFILE_PCM;
+ codec->level = 0;
+ codec->ch_mode = 0;
+ codec->format = format;
+}
+
void play_samples(char *name, unsigned int card, unsigned int device,
unsigned long buffer_size, unsigned int frag,
unsigned long codec_id)
@@ -411,6 +515,9 @@ void play_samples(char *name, unsigned int card, unsigned int device,
case SND_AUDIOCODEC_IEC61937:
get_codec_iec(file, &config, &codec);
break;
+ case SND_AUDIOCODEC_PCM:
+ get_codec_pcm(file, &config, &codec);
+ break;
default:
fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
exit(EXIT_FAILURE);
--
2.27.0

View File

@ -1,147 +0,0 @@
From 6f778c21ee357a662cdd758cff578a3e4b85eedf Mon Sep 17 00:00:00 2001
From: Zhang Peng <peng.zhang_8@nxp.com>
Date: Tue, 4 Aug 2020 15:29:29 +0800
Subject: [PATCH] cplay: Add pause feature
Add option: -p pause
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
---
src/utils/cplay.c | 56 +++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 52 insertions(+), 4 deletions(-)
diff --git a/src/utils/cplay.c b/src/utils/cplay.c
index 8882f4d..8e3dcbb 100644
--- a/src/utils/cplay.c
+++ b/src/utils/cplay.c
@@ -117,6 +117,9 @@ static void usage(void)
"-f\tfragments\n\n"
"-v\tverbose mode\n"
"-h\tPrints this help list\n\n"
+ "-p\tpause\n"
+ "-m\tpause blocks\n"
+ "-n\tpause time duration\n"
"Example:\n"
"\tcplay -c 1 -d 2 test.mp3\n"
"\tcplay -f 5 test.mp3\n\n"
@@ -133,7 +136,8 @@ static void usage(void)
void play_samples(char *name, unsigned int card, unsigned int device,
unsigned long buffer_size, unsigned int frag,
- unsigned long codec_id);
+ unsigned long codec_id, int pause_count, int pause_block,
+ int pause_duration);
struct mp3_header {
uint16_t sync;
@@ -262,12 +266,15 @@ int main(int argc, char **argv)
int c, i;
unsigned int card = 0, device = 0, frag = 0;
unsigned int codec_id = SND_AUDIOCODEC_MP3;
+ int pause_count = 0;
+ int pause_block = 6;
+ int pause_duration = 10;
if (argc < 2)
usage();
verbose = 0;
- while ((c = getopt(argc, argv, "hvb:f:c:d:I:")) != -1) {
+ while ((c = getopt(argc, argv, "hvb:f:c:d:I:p:m:n:")) != -1) {
switch (c) {
case 'h':
usage();
@@ -306,6 +313,23 @@ int main(int argc, char **argv)
case 'v':
verbose = 1;
break;
+ case 'p':
+ pause_count = strtol(optarg, NULL, 10);
+ break;
+ case 'm':
+ pause_block = strtol(optarg, NULL, 10);
+ if (pause_duration < 0) {
+ printf("Set wrong paramter! Set duration default 6.\n");
+ pause_duration = 6;
+ }
+ break;
+ case 'n':
+ pause_duration = strtol(optarg, NULL, 10);
+ if (pause_duration < 0) {
+ printf("Set wrong paramter! Set duration default 10.\n");
+ pause_duration = 10;
+ }
+ break;
default:
exit(EXIT_FAILURE);
}
@@ -315,7 +339,7 @@ int main(int argc, char **argv)
file = argv[optind];
- play_samples(file, card, device, buffer_size, frag, codec_id);
+ play_samples(file, card, device, buffer_size, frag, codec_id, pause_count, pause_block, pause_duration);
fprintf(stderr, "Finish Playing.... Close Normally\n");
exit(EXIT_SUCCESS);
@@ -491,7 +515,8 @@ void get_codec_pcm(FILE *file, struct compr_config *config,
void play_samples(char *name, unsigned int card, unsigned int device,
unsigned long buffer_size, unsigned int frag,
- unsigned long codec_id)
+ unsigned long codec_id, int pause_count, int pause_block,
+ int pause_duration)
{
struct compr_config config;
struct snd_codec codec;
@@ -499,6 +524,7 @@ void play_samples(char *name, unsigned int card, unsigned int device,
FILE *file;
char *buffer;
int size, num_read, wrote;
+ int write_count = 0;
if (verbose)
printf("%s: entry\n", __func__);
@@ -574,6 +600,13 @@ void play_samples(char *name, unsigned int card, unsigned int device,
if (verbose)
printf("%s: You should hear audio NOW!!!\n", __func__);
+ if (pause_count > 0) {
+ printf("sleep...\n");
+ compress_pause(compress);
+ sleep(pause_duration);
+ compress_resume(compress);
+ }
+
do {
num_read = fread(buffer, 1, size, file);
if (num_read > 0) {
@@ -592,8 +625,23 @@ void play_samples(char *name, unsigned int card, unsigned int device,
printf("%s: wrote %d\n", __func__, wrote);
}
}
+ write_count++;
+ if ((pause_count > 0) && (write_count % pause_block == 0)) {
+ printf("pause...\n");
+ compress_pause(compress);
+ sleep(pause_duration);
+ printf("pause release...\n");
+ compress_resume(compress);
+ pause_count--;
+ }
} while (num_read > 0);
+ if (pause_count > 0) {
+ compress_pause(compress);
+ sleep(5);
+ compress_resume(compress);
+ }
+
if (verbose)
printf("%s: exit success\n", __func__);
/* issue drain if it supports */
--
2.17.1

View File

@ -1,41 +0,0 @@
From a2892bf5db7520689fa9cb1d1589fa804bd9dc1a Mon Sep 17 00:00:00 2001
From: Bing Song <bing.song@nxp.com>
Date: Tue, 18 Aug 2020 15:26:51 +0800
Subject: [PATCH] tinycompress: pass NULL buffer with 0 size to driver.
The NULL buffer with 0 size to indecate driver drain input data with
non-block mode. The defaul drain is block mode.
upstream status: imx specific
Signed-off-by: Bing Song <bing.song@nxp.com>
---
src/lib/compress.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lib/compress.c b/src/lib/compress.c
index bba4fcf..d66df0b 100644
--- a/src/lib/compress.c
+++ b/src/lib/compress.c
@@ -315,7 +315,8 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size
fds.events = POLLOUT;
/*TODO: treat auto start here first */
- while (size) {
+ /* NULL buffer with 0 size for non-block drain */
+ do {
if (ioctl(compress->fd, SNDRV_COMPRESS_AVAIL, &avail))
return oops(compress, errno, "cannot get avail");
@@ -357,7 +358,7 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size
size -= written;
cbuf += written;
total += written;
- }
+ } while (size);
return total;
}
--
2.17.1

View File

@ -1,252 +0,0 @@
From 2912f8573cea25fbd38ac7a8b68af2ea6a05e599 Mon Sep 17 00:00:00 2001
From: Zhang Peng <peng.zhang_8@nxp.com>
Date: Wed, 28 Oct 2020 19:08:53 +0800
Subject: [PATCH] cplay: Support aac streams
Support run aac format streams for cplay.
upstream status: imx specific
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
---
src/utils/cplay.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 210 insertions(+)
diff --git a/src/utils/cplay.c b/src/utils/cplay.c
index 8e3dcbb..2a1464a 100644
--- a/src/utils/cplay.c
+++ b/src/utils/cplay.c
@@ -245,6 +245,190 @@ static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int
return 0;
}
+int find_adts_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
+{
+ int ret;
+ unsigned char buf[5];
+
+ ret = fread(buf, sizeof(buf), 1, file);
+ if (ret < 0) {
+ fprintf(stderr, "open file error: %d\n", ret);
+ return 0;
+ }
+ fseek(file, 0, SEEK_SET);
+
+ if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0))
+ return 0;
+ /* mpeg id */
+ switch (buf[1]>>3 & 0x1) {
+ case 0x0:
+ *format = SND_AUDIOSTREAMFORMAT_MP4ADTS;
+ break;
+ case 0x1:
+ *format = SND_AUDIOSTREAMFORMAT_MP2ADTS;
+ break;
+ default:
+ fprintf(stderr, "can't find stream format\n");
+ break;
+ }
+ /* sample_rate */
+ switch (buf[2]>>2 & 0xf) {
+ case 0x0:
+ *sample_rate = 96000;
+ break;
+ case 0x1:
+ *sample_rate = 88200;
+ break;
+ case 0x2:
+ *sample_rate = 64000;
+ break;
+ case 0x3:
+ *sample_rate = 48000;
+ break;
+ case 0x4:
+ *sample_rate = 44100;
+ break;
+ case 0x5:
+ *sample_rate = 32000;
+ break;
+ case 0x6:
+ *sample_rate = 24000;
+ break;
+ case 0x7:
+ *sample_rate = 22050;
+ break;
+ case 0x8:
+ *sample_rate = 16000;
+ break;
+ case 0x9:
+ *sample_rate = 12000;
+ break;
+ case 0xa:
+ *sample_rate = 11025;
+ break;
+ case 0xb:
+ *sample_rate = 8000;
+ break;
+ case 0xc:
+ *sample_rate = 7350;
+ break;
+ default:
+ break;
+ }
+ /* channel */
+ switch (((buf[2]&0x1) << 2) | (buf[3]>>6)) {
+ case 1:
+ *num_channels = 1;
+ break;
+ case 2:
+ *num_channels = 2;
+ break;
+ case 3:
+ *num_channels = 3;
+ break;
+ case 4:
+ *num_channels = 4;
+ break;
+ case 5:
+ *num_channels = 5;
+ break;
+ case 6:
+ *num_channels = 6;
+ break;
+ case 7:
+ *num_channels = 7;
+ break;
+ default:
+ break;
+ }
+ return 1;
+}
+
+static const int aac_sample_rates[] = { 96000, 88200, 64000, 48000, 44100,
+ 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350
+};
+
+#define MAX_SR_NUM sizeof(aac_sample_rates)/sizeof(aac_sample_rates[0])
+
+static int get_sample_rate_from_index(int sr_index)
+{
+ if (sr_index >= 0 && sr_index < MAX_SR_NUM)
+ return aac_sample_rates[sr_index];
+
+ return 0;
+}
+
+int find_adif_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
+{
+ int ret;
+ unsigned char adif_id[4];
+ unsigned char adif_header[20];
+ int bitstream_type;
+ int bitrate;
+ int object_type;
+ int sr_index;
+ int skip_size = 0;
+
+ ret = fread(adif_id, sizeof(unsigned char), 4, file);
+ if (ret < 0) {
+ fprintf(stderr, "read data from file err: %d\n", ret);
+ return 0;
+ }
+ /* adif id */
+ if ((adif_id[0] != 0x41) || (adif_id[1] != 0x44) ||
+ (adif_id[2] != 0x49) || (adif_id[3] != 0x46))
+ return 0;
+
+ fread(adif_header, sizeof(unsigned char), 20, file);
+
+ /* copyright string */
+ if (adif_header[0] & 0x80)
+ skip_size = 9;
+
+ bitstream_type = adif_header[0 + skip_size] & 0x10;
+ bitrate =
+ ((unsigned int) (adif_header[0 + skip_size] & 0x0f) << 19) |
+ ((unsigned int) adif_header[1 + skip_size] << 11) |
+ ((unsigned int) adif_header[2 + skip_size] << 3) |
+ ((unsigned int) adif_header[3 + skip_size] & 0xe0);
+
+ if (bitstream_type == 0) {
+ object_type = ((adif_header[6 + skip_size] & 0x01) << 1) |
+ ((adif_header[7 + skip_size] & 0x80) >> 7);
+ sr_index = (adif_header[7 + skip_size] & 0x78) >> 3;
+ }
+ /* VBR */
+ else {
+ object_type = (adif_header[4 + skip_size] & 0x18) >> 3;
+ sr_index = ((adif_header[4 + skip_size] & 0x07) << 1) |
+ ((adif_header[5 + skip_size] & 0x80) >> 7);
+ }
+
+ /* sample rate */
+ *sample_rate = get_sample_rate_from_index(sr_index);
+
+ /* FIXME: assume channels is 2 */
+ *num_channels = 2;
+
+ *format = SND_AUDIOSTREAMFORMAT_ADIF;
+ fseek(file, 0, SEEK_SET);
+ return 1;
+}
+
+static int parse_aac_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
+{
+ if (find_adts_header(file, num_channels, sample_rate, format))
+ return 1;
+ else if (find_adif_header(file, num_channels, sample_rate, format))
+ return 1;
+ else {
+ fprintf(stderr, "can't find streams format\n");
+ return 0;
+ }
+
+ return 1;
+}
+
static int print_time(struct compress *compress)
{
unsigned int avail;
@@ -513,6 +697,29 @@ void get_codec_pcm(FILE *file, struct compr_config *config,
codec->format = format;
}
+void get_codec_aac(FILE *file, struct compr_config *config,
+ struct snd_codec *codec)
+{
+ unsigned int channels, rate, format;
+
+ if (parse_aac_header(file, &channels, &rate, &format) == 0) {
+ fclose(file);
+ exit(EXIT_FAILURE);
+ };
+ fseek(file, 0, SEEK_SET);
+
+ codec->id = SND_AUDIOCODEC_AAC;
+ codec->ch_in = channels;
+ codec->ch_out = channels;
+ codec->sample_rate = rate;
+ codec->bit_rate = 0;
+ codec->rate_control = 0;
+ codec->profile = SND_AUDIOPROFILE_AAC;
+ codec->level = 0;
+ codec->ch_mode = 0;
+ codec->format = format;
+
+}
void play_samples(char *name, unsigned int card, unsigned int device,
unsigned long buffer_size, unsigned int frag,
unsigned long codec_id, int pause_count, int pause_block,
@@ -544,6 +751,9 @@ void play_samples(char *name, unsigned int card, unsigned int device,
case SND_AUDIOCODEC_PCM:
get_codec_pcm(file, &config, &codec);
break;
+ case SND_AUDIOCODEC_AAC:
+ get_codec_aac(file, &config, &codec);
+ break;
default:
fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
exit(EXIT_FAILURE);
--
2.17.1

View File

@ -1,19 +0,0 @@
SUMMARY = "tinycompress library for compress audio offload in alsa"
DESCRIPTION = "A library to handle compressed formats like MP3 etc"
LICENSE = "BSD-3-Clause"
inherit autotools pkgconfig
LIC_FILES_CHKSUM = "file://COPYING;md5=cf9105c1a2d4405cbe04bbe3367373a0"
DEPENDS:append = " alsa-lib"
SRC_URI = "git://git.alsa-project.org/tinycompress.git;protocol=git;branch=master \
file://0001-tinycompress-Add-id3-decoding.patch \
file://0002-cplay-Support-wave-file.patch \
file://0003-cplay-Add-pause-feature.patch \
file://0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch \
file://0005-cplay-Support-aac-streams.patch \
"
SRCREV = "995f2ed91045dad8c20485ab1a64727d22cd92e5"
S = "${WORKDIR}/git"

View File

@ -1 +0,0 @@
export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf"

View File

@ -1,40 +0,0 @@
From: Gabriel Valcazar <gabriel.valcazar@digi.com>
Date: Tue, 12 Nov 2019 12:00:07 +0100
Subject: [PATCH] Modify openssl.cnf to automatically load the pkcs11 engine
https://jira.digi.com/browse/DEL-6835
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
---
apps/openssl.cnf | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/apps/openssl.cnf b/apps/openssl.cnf
index 4acca4b..2261048 100644
--- a/apps/openssl.cnf
+++ b/apps/openssl.cnf
@@ -7,6 +7,8 @@
# file using the .include directive.
#.include filename
+openssl_conf = openssl_init
+
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
@@ -348,3 +350,15 @@ ess_cert_id_chain = no # Must the ESS cert id chain be included?
# (optional, default: no)
ess_cert_id_alg = sha1 # algorithm to compute certificate
# identifier (optional, default: sha1)
+
+[ openssl_init ]
+engines = engine_section
+
+[ engine_section ]
+pkcs11 = pkcs11_config
+
+[ pkcs11_config ]
+engine_id = pkcs11
+dynamic_path = /usr/lib/engines-1.1/pkcs11.so
+MODULE_PATH = /usr/lib/libcryptoauth.so.2018.10.26
+init = 0

View File

@ -1,76 +0,0 @@
From 3e1d00481093e10775eaf69d619c45b32a4aa7dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com>
Date: Tue, 6 Nov 2018 14:50:47 +0100
Subject: [PATCH] buildinfo: strip sysroot and debug-prefix-map from compiler
info
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The openssl build system generates buildinf.h containing the full
compiler command line used to compile objects. This breaks
reproducibility, as the compile command is baked into libcrypto, where
it is used when running `openssl version -f`.
Add stripped build variables for the compiler and cflags lines, and use
those when generating buildinfo.h.
This is based on a similar patch for older openssl versions:
https://patchwork.openembedded.org/patch/147229/
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Martin Hundebøll <martin@geanix.com>
Update to fix buildpaths qa issue for '-fmacro-prefix-map'.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
Configurations/unix-Makefile.tmpl | 10 +++++++++-
crypto/build.info | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 16af4d2087..54c162784c 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -317,13 +317,22 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (),
'$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
-# CPPFLAGS_Q is used for one thing only: to build up buildinf.h
+# *_Q variables are used for one thing only: to build up buildinf.h
CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g;
$cppflags2 =~ s|([\\"])|\\$1|g;
$lib_cppflags =~ s|([\\"])|\\$1|g;
join(' ', $lib_cppflags || (), $cppflags2 || (),
$cppflags1 || ()) -}
+CFLAGS_Q={- for (@{$config{CFLAGS}}) {
+ s|-fdebug-prefix-map=[^ ]+|-fdebug-prefix-map=|g;
+ s|-fmacro-prefix-map=[^ ]+|-fmacro-prefix-map=|g;
+ }
+ join(' ', @{$config{CFLAGS}}) -}
+
+CC_Q={- $config{CC} =~ s|--sysroot=[^ ]+|--sysroot=recipe-sysroot|g;
+ join(' ', $config{CC}) -}
+
PERLASM_SCHEME= {- $target{perlasm_scheme} -}
# For x86 assembler: Set PROCESSOR to 386 if you want to support
diff --git a/crypto/build.info b/crypto/build.info
index b515b7318e..8c9cee2a09 100644
--- a/crypto/build.info
+++ b/crypto/build.info
@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl
DEPEND[cversion.o]=buildinf.h
-GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
+GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC_Q) $(CFLAGS_Q) $(CPPFLAGS_Q)" "$(PLATFORM)"
DEPEND[buildinf.h]=../configdata.pm
GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME)
--
2.19.1

View File

@ -1,46 +0,0 @@
From a9401b2289656c5a36dd1b0ecebf0d23e291ce70 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 2 Oct 2018 23:58:24 +0800
Subject: [PATCH] skip test_symbol_presence
We cannot skip `01-test_symbol_presence.t' by configuring option `no-shared'
as INSTALL told us the shared libraries will not be built.
[INSTALL snip]
Notes on shared libraries
-------------------------
For most systems the OpenSSL Configure script knows what is needed to
build shared libraries for libcrypto and libssl. On these systems
the shared libraries will be created by default. This can be suppressed and
only static libraries created by using the "no-shared" option. On systems
where OpenSSL does not know how to build shared libraries the "no-shared"
option will be forced and only static libraries will be created.
[INSTALL snip]
Hence directly modification the case to skip it.
Upstream-Status: Inappropriate [OE Specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
test/recipes/01-test_symbol_presence.t | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t
index 7f2a2d7..0b93745 100644
--- a/test/recipes/01-test_symbol_presence.t
+++ b/test/recipes/01-test_symbol_presence.t
@@ -14,8 +14,7 @@ use OpenSSL::Test::Utils;
setup("test_symbol_presence");
-plan skip_all => "Only useful when building shared libraries"
- if disabled("shared");
+plan skip_all => "The case needs debug symbols then we just disable it";
my @libnames = ("crypto", "ssl");
my $testcount = scalar @libnames;
--
2.7.4

View File

@ -1,31 +0,0 @@
Don't refuse to build afalgeng if cross-compiling or the host kernel is too old.
Upstream-Status: Submitted [hhttps://github.com/openssl/openssl/pull/7688]
Signed-off-by: Ross Burton <ross.burton@intel.com>
diff --git a/Configure b/Configure
index 3baa8ce..9ef52ed 100755
--- a/Configure
+++ b/Configure
@@ -1550,20 +1550,7 @@ unless ($disabled{"crypto-mdebug-backtrace"})
unless ($disabled{afalgeng}) {
$config{afalgeng}="";
if (grep { $_ eq 'afalgeng' } @{$target{enable}}) {
- my $minver = 4*10000 + 1*100 + 0;
- if ($config{CROSS_COMPILE} eq "") {
- my $verstr = `uname -r`;
- my ($ma, $mi1, $mi2) = split("\\.", $verstr);
- ($mi2) = $mi2 =~ /(\d+)/;
- my $ver = $ma*10000 + $mi1*100 + $mi2;
- if ($ver < $minver) {
- disable('too-old-kernel', 'afalgeng');
- } else {
- push @{$config{engdirs}}, "afalg";
- }
- } else {
- disable('cross-compiling', 'afalgeng');
- }
+ push @{$config{engdirs}}, "afalg";
} else {
disable('not-linux', 'afalgeng');
}

View File

@ -1,22 +0,0 @@
Using localtime() means the output can depend on the timezone of the build machine.
Using gmtime() is safer. For complete reproducibility use SOURCE_DATE_EPOCH if set.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Upstream-Status: Pending [should be suitable]
Index: openssl-3.0.1/apps/progs.pl
===================================================================
--- openssl-3.0.1.orig/apps/progs.pl
+++ openssl-3.0.1/apps/progs.pl
@@ -21,7 +21,10 @@ die "Unrecognised option, must be -C or
my %commands = ();
my $cmdre = qr/^\s*int\s+([a-z_][a-z0-9_]*)_main\(\s*int\s+argc\s*,/;
my $apps_openssl = shift @ARGV;
-my $YEAR = [localtime()]->[5] + 1900;
+my $YEAR = [gmtime()]->[5] + 1900;
+if (defined($ENV{SOURCE_DATE_EPOCH}) && $ENV{SOURCE_DATE_EPOCH} !~ /\D/) {
+ $YEAR = [gmtime($ENV{SOURCE_DATE_EPOCH})]->[5] + 1900;
+}
# because the program apps/openssl has object files as sources, and
# they then have the corresponding C files as source, we need to chain

View File

@ -1,32 +0,0 @@
The value for perl_archname can vary depending on the host, e.g.
x86_64-linux-gnu-thread-multi or x86_64-linux-thread-multi which
makes the ptest package non-reproducible. Its unused other than
these references so drop it.
RP 2020/2/6
Upstream-Status: Pending
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Index: openssl-1.1.1d/Configure
===================================================================
--- openssl-1.1.1d.orig/Configure
+++ openssl-1.1.1d/Configure
@@ -286,7 +286,7 @@ if (defined env($local_config_envname))
# Save away perl command information
$config{perl_cmd} = $^X;
$config{perl_version} = $Config{version};
-$config{perl_archname} = $Config{archname};
+#$config{perl_archname} = $Config{archname};
$config{prefix}="";
$config{openssldir}="";
@@ -2517,7 +2517,7 @@ _____
@{$config{perlargv}}), "\n";
print "\nPerl information:\n\n";
print ' ',$config{perl_cmd},"\n";
- print ' ',$config{perl_version},' for ',$config{perl_archname},"\n";
+ print ' ',$config{perl_version},"\n";
}
if ($dump || $options) {
my $longest = 0;

View File

@ -1,12 +0,0 @@
#!/bin/sh
set -e
# Optional arguments are 'list' to lists all tests, or the test name (base name
# ie test_evp, not 03_test_evp.t).
export TOP=.
# OPENSSL_ENGINES is relative from the test binaries
export OPENSSL_ENGINES=../engines
perl ./test/run_tests.pl $* | perl -0pe 's#(.*) \.*.ok#PASS: \1#g; s#(.*) \.*.skipped: (.*)#SKIP: \1 (\2)#g; s#(.*) \.*.\nDubious#FAIL: \1#;'

View File

@ -1,21 +0,0 @@
# Copyright (C) 2016-2019 Digi International.
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
CRYPTOCHIP_COMMON_PATCHES = " \
file://0001-Modify-openssl.cnf-to-automatically-load-the-pkcs11-.patch \
"
SRC_URI:remove = " \
file://debian1.0.2/version-script.patch \
file://debian1.0.2/soname.patch \
"
SRC_URI += " \
${@bb.utils.contains("MACHINE_FEATURES", "cryptochip", "${CRYPTOCHIP_COMMON_PATCHES}", "", d)} \
"
# Add the openssl binary whenever the base package is pulled in via a dependency
RRECOMMENDS:libcrypto += "openssl-bin"
PACKAGECONFIG += "cryptodev-linux"

View File

@ -1,219 +0,0 @@
SUMMARY = "Secure Socket Layer"
DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
HOMEPAGE = "http://www.openssl.org/"
BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
SECTION = "libs/network"
# "openssl" here actually means both OpenSSL and SSLeay licenses apply
# (see meta/files/common-licenses/OpenSSL to which "openssl" is SPDXLICENSEMAPped)
LICENSE = "openssl"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d343e62fc9c833710bbbed25f27364c8"
DEPENDS = "hostperl-runtime-native"
SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
file://run-ptest \
file://0001-skip-test_symbol_presence.patch \
file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
file://afalg.patch \
file://reproducible.patch \
file://reproducibility.patch \
"
SRC_URI:append:class-nativesdk = " \
file://environment.d-openssl.sh \
"
SRC_URI[sha256sum] = "40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a"
inherit lib_package multilib_header multilib_script ptest
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
PACKAGECONFIG ?= ""
PACKAGECONFIG:class-native = ""
PACKAGECONFIG:class-nativesdk = ""
PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module"
B = "${WORKDIR}/build"
do_configure[cleandirs] = "${B}"
#| ./libcrypto.so: undefined reference to `getcontext'
#| ./libcrypto.so: undefined reference to `setcontext'
#| ./libcrypto.so: undefined reference to `makecontext'
EXTRA_OECONF:append:libc-musl = " no-async"
EXTRA_OECONF:append:libc-musl:powerpc64 = " no-asm"
# adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions
# (native versions can be built with newer glibc, but then relocated onto a system with older glibc)
EXTRA_OECONF:class-native = "--with-rand-seed=os,devrandom"
EXTRA_OECONF:class-nativesdk = "--with-rand-seed=os,devrandom"
# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate.
CFLAGS:append:class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
CFLAGS:append:class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
do_configure () {
os=${HOST_OS}
case $os in
linux-gnueabi |\
linux-gnuspe |\
linux-musleabi |\
linux-muslspe |\
linux-musl )
os=linux
;;
*)
;;
esac
target="$os-${HOST_ARCH}"
case $target in
linux-arm*)
target=linux-armv4
;;
linux-aarch64*)
target=linux-aarch64
;;
linux-i?86 | linux-viac3)
target=linux-x86
;;
linux-gnux32-x86_64 | linux-muslx32-x86_64 )
target=linux-x32
;;
linux-gnu64-x86_64)
target=linux-x86_64
;;
linux-mips | linux-mipsel)
# specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags
target="linux-mips32 ${TARGET_CC_ARCH}"
;;
linux-gnun32-mips*)
target=linux-mips64
;;
linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el)
target=linux64-mips64
;;
linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*)
target=linux-generic32
;;
linux-powerpc)
target=linux-ppc
;;
linux-powerpc64)
target=linux-ppc64
;;
linux-powerpc64le)
target=linux-ppc64le
;;
linux-riscv32)
target=linux-generic32
;;
linux-riscv64)
target=linux-generic64
;;
linux-sparc | linux-supersparc)
target=linux-sparcv9
;;
esac
useprefix=${prefix}
if [ "x$useprefix" = "x" ]; then
useprefix=/
fi
# WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the
# environment variables set by bitbake. Adjust the environment variables instead.
HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \
perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
perl ${B}/configdata.pm --dump
}
do_install () {
oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
oe_multilib_header openssl/opensslconf.h
# Create SSL structure for packages such as ca-certificates which
# contain hard-coded paths to /etc/ssl. Debian does the same.
install -d ${D}${sysconfdir}/ssl
mv ${D}${libdir}/ssl-1.1/certs \
${D}${libdir}/ssl-1.1/private \
${D}${libdir}/ssl-1.1/openssl.cnf \
${D}${sysconfdir}/ssl/
# Although absolute symlinks would be OK for the target, they become
# invalid if native or nativesdk are relocated from sstate.
ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-1.1/certs
ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-1.1/private
ln -sf ${@oe.path.relative('${libdir}/ssl-1.1', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-1.1/openssl.cnf
}
do_install:append:class-native () {
create_wrapper ${D}${bindir}/openssl \
OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \
SSL_CERT_DIR=${libdir}/ssl-1.1/certs \
SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \
OPENSSL_ENGINES=${libdir}/engines-1.1
}
do_install:append:class-nativesdk () {
mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
}
PTEST_BUILD_HOST_FILES += "configdata.pm"
PTEST_BUILD_HOST_PATTERN = "perl_version ="
do_install_ptest () {
# Prune the build tree
rm -f ${B}/fuzz/*.* ${B}/test/*.*
cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH}
cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH}
# For test_shlibload
ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/
ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/
install -d ${D}${PTEST_PATH}/apps
ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps
install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps
install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps
install -d ${D}${PTEST_PATH}/engines
install -m755 ${B}/engines/dasync.so ${D}${PTEST_PATH}/engines
install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines
}
# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
# package RRECOMMENDS on this package. This will enable the configuration
# file to be installed for both the openssl-bin package and the libcrypto
# package since the openssl-bin package depends on the libcrypto package.
PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc"
FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}"
FILES:libssl = "${libdir}/libssl${SOLIBS}"
FILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf \
${libdir}/ssl-1.1/openssl.cnf* \
"
FILES:${PN}-engines = "${libdir}/engines-1.1"
FILES:${PN}-misc = "${libdir}/ssl-1.1/misc"
FILES:${PN} =+ "${libdir}/ssl-1.1/*"
FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh"
CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
RRECOMMENDS:libcrypto += "openssl-conf"
RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash"
RDEPENDS:${PN}-bin += "openssl-conf"
BBCLASSEXTEND = "native nativesdk"
CVE_PRODUCT = "openssl:openssl"
CVE_VERSION_SUFFIX = "alphabetical"
# Only affects OpenSSL >= 1.1.1 in combination with Apache < 2.4.37
# Apache in meta-webserver is already recent enough
CVE_CHECK_WHITELIST += "CVE-2019-0190"

View File

@ -1,20 +0,0 @@
SUMMARY = "single-file public domain (or MIT licensed) libraries for C/C++"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://stb.h;beginline=14418;endline=14433;md5=b10975d4c8155af1811ab611586f01d2"
PV = "0.0+git${SRCPV}"
SRCREV = "f67165c2bb2af3060ecae7d20d6f731173485ad0"
SRC_URI = "git://github.com/nothings/stb.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
do_install() {
install -d ${D}${includedir}
for hdr in ${S}/*.h; do
install -m 0644 $hdr ${D}${includedir}
done
}
# This is a header-only library, so the main package will be empty.
ALLOW_EMPTY:${PN} = "1"

View File

@ -1,11 +0,0 @@
# Undo customization in meta-freescale that doesn't apply to 8DXL
PACKAGECONFIG:remove:mx8dxl = "osmesa"
DRIDRIVERS:remove:mx8dxl = "swrast"
PACKAGECONFIG:remove:mx8phantomdxl = "osmesa"
DRIDRIVERS:remove:mx8phantomdxl = "swrast"
PACKAGECONFIG:remove:mx8mnlite = "osmesa"
DRIDRIVERS:remove:mx8mnlite = "swrast"
do_install:append:imxgpu3d () {
rm -f ${D}${includedir}/GL/glcorearb.h
}

View File

@ -1,38 +0,0 @@
From 4f7fd011b47cb65c58b0a1ffaa3830f0b63b5b1d Mon Sep 17 00:00:00 2001
From: Ella <ella.feng@nxp.com>
Date: Thu, 7 Mar 2019 17:18:26 +0800
Subject: [PATCH] STDIO-844 No need to change the App's apiVersion to ICD
version
There is no need to do so, otherwise we won't catch the App's error and
Vulkan CTS will fail to reject the invalid api version.
Date: 7th Mar, 2019
Signed-off-by: Ella Feng <ella.feng@nxp.com>
---
loader/loader.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/loader/loader.c b/loader/loader.c
index 281851584..f2033b6ad 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -5741,6 +5741,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateInstance(const VkInstanceCreateI
}
// Create an instance, substituting the version to 1.0 if necessary
+#if 0
VkApplicationInfo icd_app_info;
uint32_t icd_version_nopatch = VK_MAKE_VERSION(VK_VERSION_MAJOR(icd_version), VK_VERSION_MINOR(icd_version), 0);
uint32_t requested_version = pCreateInfo == NULL || pCreateInfo->pApplicationInfo == NULL ? VK_API_VERSION_1_0 : pCreateInfo->pApplicationInfo->apiVersion;
@@ -5753,6 +5754,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateInstance(const VkInstanceCreateI
icd_app_info.apiVersion = icd_version;
icd_create_info.pApplicationInfo = &icd_app_info;
}
+#endif
icd_result = ptr_instance->icd_tramp_list.scanned_list[i].CreateInstance(&icd_create_info, pAllocator, &(icd_term->instance));
if (VK_ERROR_OUT_OF_HOST_MEMORY == icd_result) {
// If out of memory, bail immediately.
--
2.21.0

View File

@ -1,8 +0,0 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-STDIO-844-No-need-to-change-the-App-s-apiVersion-to-.patch"
# libvulkan.so is loaded dynamically, so put it in the main package
FILES_SOLIBSDEV = ""
FILES:${PN} += "${libdir}/lib*${SOLIBSDEV}"
INSANE_SKIP:${PN} += "dev-so"

View File

@ -1,221 +0,0 @@
From cc06048dcd722049f92ab17958760bd798fb4781 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <b02247@freescale.com>
Date: Thu, 5 Jun 2014 17:37:47 +0800
Subject: [PATCH] add conf for multichannel support in imx
Upstream Status: Inappropriate [platform specific]
Signed-off-by: Shengjiu Wang <b02247@freescale.com>
---
src/conf/cards/CS42888.conf | 94 ++++++++++++++++++++++++++++++++++++++++++++
src/conf/cards/IMX-HDMI.conf | 67 +++++++++++++++++++++++++++++++
src/conf/cards/Makefile.am | 4 +-
src/conf/cards/aliases.conf | 2 +
4 files changed, 166 insertions(+), 1 deletion(-)
create mode 100644 src/conf/cards/CS42888.conf
create mode 100644 src/conf/cards/IMX-HDMI.conf
diff --git a/src/conf/cards/CS42888.conf b/src/conf/cards/CS42888.conf
new file mode 100644
index 0000000..671a284
--- /dev/null
+++ b/src/conf/cards/CS42888.conf
@@ -0,0 +1,94 @@
+#
+# Configuration for the CS42888 chip
+#
+
+# default with dmix & dsnoop
+CS42888.pcm.default {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type asym
+ playback.pcm {
+ type plug
+ slave.pcm {
+ @func concat
+ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
+ }
+ }
+ capture.pcm {
+ type plug
+ slave.pcm {
+ @func concat
+ strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
+ }
+ }
+}
+
+<confdir:pcm/surround40.conf>
+
+CS42888.pcm.surround40.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type plug
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ slave.channels 4
+ ttable.0.0 1
+ ttable.1.2 1
+ ttable.2.1 1
+ ttable.3.3 1
+}
+
+
+<confdir:pcm/surround41.conf>
+<confdir:pcm/surround50.conf>
+<confdir:pcm/surround51.conf>
+
+CS42888.pcm.surround51.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type plug
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ slave.channels 6
+ ttable.0.0 1
+ ttable.1.3 1
+ ttable.2.1 1
+ ttable.3.4 1
+ ttable.4.2 1
+ ttable.5.5 1
+}
+
+<confdir:pcm/surround71.conf>
+
+CS42888.pcm.surround71.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type plug
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ slave.channels 8
+ ttable.0.0 1
+ ttable.1.4 1
+ ttable.2.1 1
+ ttable.3.5 1
+ ttable.4.2 1
+ ttable.5.6 1
+ ttable.6.3 1
+ ttable.7.7 1
+}
+
+# vim: ft=alsaconf
diff --git a/src/conf/cards/IMX-HDMI.conf b/src/conf/cards/IMX-HDMI.conf
new file mode 100644
index 0000000..a51509e
--- /dev/null
+++ b/src/conf/cards/IMX-HDMI.conf
@@ -0,0 +1,67 @@
+#
+# Configuration for the CS42888 chip
+#
+
+# default with dmix & dsnoop
+IMX-HDMI.pcm.default {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type asym
+ playback.pcm {
+ type plug
+ slave.pcm {
+ @func concat
+ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
+ }
+ }
+ capture.pcm {
+ type plug
+ slave.pcm {
+ @func concat
+ strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
+ }
+ }
+}
+
+<confdir:pcm/surround40.conf>
+
+IMX-HDMI.pcm.surround40.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type hw
+ card $CARD
+ channels 4
+}
+
+
+<confdir:pcm/surround41.conf>
+<confdir:pcm/surround50.conf>
+<confdir:pcm/surround51.conf>
+
+IMX-HDMI.pcm.surround51.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type hw
+ card $CARD
+ channels 6
+}
+
+<confdir:pcm/surround71.conf>
+
+IMX-HDMI.pcm.surround71.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type hw
+ card $CARD
+ channels 8
+}
+
+# vim: ft=alsaconf
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
index 00999f0..fbf0697 100644
--- a/src/conf/cards/Makefile.am
+++ b/src/conf/cards/Makefile.am
@@ -58,7 +58,9 @@ cfg_files = aliases.conf \
VIA8237.conf \
VX222.conf \
VXPocket.conf \
- VXPocket440.conf
+ VXPocket440.conf \
+ CS42888.conf \
+ IMX-HDMI.conf
if BUILD_ALISP
cfg_files += aliases.alisp
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
index 18a920f..2c422ee 100644
--- a/src/conf/cards/aliases.conf
+++ b/src/conf/cards/aliases.conf
@@ -57,6 +57,8 @@ CMI8786 cards.CMI8788
CMI8787 cards.CMI8788
pistachio cards.pistachio-card
VC4-HDMI cards.vc4-hdmi
+imx-cs42888 cards.CS42888
+imx-hdmi-soc cards.IMX-HDMI
<confdir:pcm/default.conf>
<confdir:pcm/dmix.conf>
--
2.7.4

View File

@ -1,46 +0,0 @@
From 67be50a9d95c8659d4821d0cd8c228e4f57b2c32 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 30 Dec 2020 09:31:10 +0100
Subject: [PATCH 1/2] pcm: plugin status - fix the return value (regression)
The snd_pcm_plugin_avail_update() error code in snd_pcm_plugin_status()
should not be reported to the caller. The state errors can be determined
using the state member in the status structure.
Fixes: 4f90392f07e ("pcm: fix the snd_pcm_plugin_status() avail and delay fields")
BugLink: https://github.com/alsa-project/alsa-lib/issues/107
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/pcm/pcm_plugin.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
index 5739cfc2eb07..76a524fa801d 100644
--- a/src/pcm/pcm_plugin.c
+++ b/src/pcm/pcm_plugin.c
@@ -541,19 +541,17 @@ static snd_pcm_sframes_t snd_pcm_plugin_avail_update(snd_pcm_t *pcm)
static int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
{
snd_pcm_plugin_t *plugin = pcm->private_data;
- snd_pcm_sframes_t err, avail;
+ snd_pcm_sframes_t err;
/* sync with the latest hw and appl ptrs */
- avail = snd_pcm_plugin_avail_update(pcm);
- if (avail < 0)
- return avail;
+ snd_pcm_plugin_avail_update(pcm);
err = snd_pcm_status(plugin->gen.slave, status);
if (err < 0)
return err;
status->appl_ptr = *pcm->appl.ptr;
status->hw_ptr = *pcm->hw.ptr;
- status->avail = avail;
+ status->avail = snd_pcm_mmap_avail(pcm);
status->delay = snd_pcm_mmap_delay(pcm);
return 0;
}
--
2.27.0

View File

@ -1,34 +0,0 @@
From eeea1c8c352e54908f464e8dfd7a06b0f7ce0e6e Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sun, 3 Jan 2021 16:16:10 +0100
Subject: [PATCH 2/2] pcm: plugin status - revert the recent changes
It's no reason to sync the avail/delay fields using the mirrored
buffer pointers. The slave information must be valid.
The original report probably tries to fix something for
the specific plugin. Revert all changes.
Fixes: afe6ff3b33e ("pcm: plugin status - fix the return value (regression)")
Fixes: 4f90392f07e ("pcm: fix the snd_pcm_plugin_status() avail and delay fields")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/pcm/pcm_plugin.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
index 76a524fa801d..ea60eb98986e 100644
--- a/src/pcm/pcm_plugin.c
+++ b/src/pcm/pcm_plugin.c
@@ -551,8 +551,6 @@ static int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
return err;
status->appl_ptr = *pcm->appl.ptr;
status->hw_ptr = *pcm->hw.ptr;
- status->avail = snd_pcm_mmap_avail(pcm);
- status->delay = snd_pcm_mmap_delay(pcm);
return 0;
}
--
2.27.0

View File

@ -1,123 +0,0 @@
From 1641ce8c724018365d7fa598f9a70c6492e7c271 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <shengjiu.wang@nxp.com>
Date: Wed, 31 Jan 2018 15:06:53 +0800
Subject: [PATCH] add ak4458 conf for multichannel support
one limitation is that ALSA and pulseaudio only support
maximum 8 channels, but ak4458 may support 16 channels
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
src/conf/cards/AK4458.conf | 74 +++++++++++++++++++++++++++++++++++++++++++++
src/conf/cards/Makefile.am | 3 +-
src/conf/cards/aliases.conf | 1 +
3 files changed, 77 insertions(+), 1 deletion(-)
create mode 100644 src/conf/cards/AK4458.conf
Index: alsa-lib-1.1.6/src/conf/cards/AK4458.conf
===================================================================
--- /dev/null
+++ alsa-lib-1.1.6/src/conf/cards/AK4458.conf
@@ -0,0 +1,74 @@
+#
+# Configuration for the AK4458 chip
+#
+
+# default with dmix & dsnoop
+AK4458.pcm.default {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type asym
+ playback.pcm {
+ type plug
+ slave.pcm {
+ @func concat
+ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
+ }
+ }
+ capture.pcm {
+ type plug
+ slave.pcm {
+ @func concat
+ strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
+ }
+ }
+}
+
+<confdir:pcm/surround40.conf>
+
+AK4458.pcm.surround40.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type plug
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ slave.channels 4
+}
+
+
+<confdir:pcm/surround41.conf>
+<confdir:pcm/surround50.conf>
+<confdir:pcm/surround51.conf>
+
+AK4458.pcm.surround51.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type plug
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ slave.channels 6
+}
+
+<confdir:pcm/surround71.conf>
+
+AK4458.pcm.surround71.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type plug
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ slave.channels 8
+}
Index: alsa-lib-1.1.6/src/conf/cards/Makefile.am
===================================================================
--- alsa-lib-1.1.6.orig/src/conf/cards/Makefile.am
+++ alsa-lib-1.1.6/src/conf/cards/Makefile.am
@@ -60,7 +60,8 @@ cfg_files = aliases.conf \
VXPocket.conf \
VXPocket440.conf \
CS42888.conf \
- IMX-HDMI.conf
+ IMX-HDMI.conf \
+ AK4458.conf
if BUILD_ALISP
cfg_files += aliases.alisp
Index: alsa-lib-1.1.6/src/conf/cards/aliases.conf
===================================================================
--- alsa-lib-1.1.6.orig/src/conf/cards/aliases.conf
+++ alsa-lib-1.1.6/src/conf/cards/aliases.conf
@@ -59,6 +59,7 @@ pistachio cards.pistachio-card
VC4-HDMI cards.vc4-hdmi
imx-cs42888 cards.CS42888
imx-hdmi-soc cards.IMX-HDMI
+ak4458-audio cards.AK4458
<confdir:pcm/default.conf>
<confdir:pcm/dmix.conf>

View File

@ -1,89 +0,0 @@
From d2be0f650f9fec265f0f0b4ba646a157f2a4cb7c Mon Sep 17 00:00:00 2001
From: Viorel Suman <viorel.suman@nxp.com>
Date: Mon, 9 Mar 2020 14:25:46 +0200
Subject: [PATCH] add conf for iMX XCVR sound card
Upstream Status: Pending
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
---
src/conf/cards/IMX-XCVR.conf | 39 +++++++++++++++++++++++++++++++++++++++
src/conf/cards/Makefile.am | 3 ++-
src/conf/cards/aliases.conf | 1 +
3 files changed, 42 insertions(+), 1 deletion(-)
create mode 100755 src/conf/cards/IMX-XCVR.conf
diff --git a/src/conf/cards/IMX-XCVR.conf b/src/conf/cards/IMX-XCVR.conf
new file mode 100755
index 0000000..009000c
--- /dev/null
+++ b/src/conf/cards/IMX-XCVR.conf
@@ -0,0 +1,39 @@
+#
+# Configuration for the IMX-XCVR sound card using software IEC958
+# subframe conversion
+#
+IMX-XCVR.pcm.default {
+ @args [ CARD ]
+ @args.CARD { type string }
+ type plug
+ slave.pcm {
+ @func concat
+ strings [ "iec958:" $CARD ]
+ }
+}
+
+<confdir:pcm/iec958.conf>
+
+IMX-XCVR.pcm.iec958.0 {
+ @args [ CARD AES0 AES1 AES2 AES3 ]
+ @args.CARD { type string }
+ @args.AES0 { type integer }
+ @args.AES1 { type integer }
+ @args.AES2 { type integer }
+ @args.AES3 { type integer }
+ type iec958
+ slave {
+ format IEC958_SUBFRAME_LE
+ pcm {
+ type plug
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ }
+ }
+ status [ $AES0 $AES1 $AES2 $AES3 ]
+ preamble.z 0x0
+ preamble.x 0x1
+ preamble.y 0x3
+}
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
index 34fa5a3..70b9bab 100644
--- a/src/conf/cards/Makefile.am
+++ b/src/conf/cards/Makefile.am
@@ -61,7 +61,8 @@ cfg_files = aliases.conf \
VXPocket440.conf \
CS42888.conf \
IMX-HDMI.conf \
- AK4458.conf
+ AK4458.conf \
+ IMX-XCVR.conf
if BUILD_ALISP
cfg_files += aliases.alisp
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
index 5d92ac7..c195848 100644
--- a/src/conf/cards/aliases.conf
+++ b/src/conf/cards/aliases.conf
@@ -60,6 +60,7 @@ VC4-HDMI cards.vc4-hdmi
imx-cs42888 cards.CS42888
imx-hdmi-soc cards.IMX-HDMI
ak4458-audio cards.AK4458
+imx-audio-xcvr cards.IMX-XCVR
<confdir:pcm/default.conf>
<confdir:pcm/dmix.conf>
--
2.7.4

View File

@ -1,8 +0,0 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
IMX_PATCH += " \
file://0001-pcm-plugin-status-fix-the-return-value-regression.patch \
file://0002-pcm-plugin-status-revert-the-recent-changes.patch \
"
PACKAGE_ARCH_imx = "${TUNE_PKGARCH}"

View File

@ -1,221 +0,0 @@
From 4d4bc0a958fe254531920095fbabc241aad88113 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <shengjiu.wang@nxp.com>
Date: Tue, 28 Jul 2020 13:00:36 +0800
Subject: [PATCH] cplay: Support wave file
The supported format is mono/stereo, S16_LE/S32_LE, 8kHz-192kHz.
Command is:
cplay -c x -I PCM test.wav
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
include/tinycompress/wave_formats.h | 51 +++++++++++++
src/utils/cplay.c | 107 ++++++++++++++++++++++++++++
2 files changed, 158 insertions(+)
create mode 100644 include/tinycompress/wave_formats.h
diff --git a/include/tinycompress/wave_formats.h b/include/tinycompress/wave_formats.h
new file mode 100644
index 000000000000..4e2e009206cf
--- /dev/null
+++ b/include/tinycompress/wave_formats.h
@@ -0,0 +1,51 @@
+#ifndef WAVE_FORMATS_H
+#define WAVE_FORMATS_H 1
+
+#define COMPOSE_ID(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24))
+
+#define WAV_RIFF COMPOSE_ID('R','I','F','F')
+#define WAV_RIFX COMPOSE_ID('R','I','F','X')
+#define WAV_WAVE COMPOSE_ID('W','A','V','E')
+#define WAV_FMT COMPOSE_ID('f','m','t',' ')
+#define WAV_DATA COMPOSE_ID('d','a','t','a')
+
+/* WAVE fmt block constants from Microsoft mmreg.h header */
+#define WAV_FMT_PCM 0x0001
+#define WAV_FMT_IEEE_FLOAT 0x0003
+#define WAV_FMT_DOLBY_AC3_SPDIF 0x0092
+#define WAV_FMT_EXTENSIBLE 0xfffe
+
+/* Used with WAV_FMT_EXTENSIBLE format */
+#define WAV_GUID_TAG "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71"
+
+typedef struct {
+ u_int magic; /* 'RIFF' */
+ u_int length; /* filelen */
+ u_int type; /* 'WAVE' */
+} WaveHeader;
+
+typedef struct {
+ u_short format; /* see WAV_FMT_* */
+ u_short channels;
+ u_int sample_fq; /* frequence of sample */
+ u_int byte_p_sec;
+ u_short byte_p_spl; /* samplesize; 1 or 2 bytes */
+ u_short bit_p_spl; /* 8, 12 or 16 bit */
+} WaveFmtBody;
+
+typedef struct {
+ WaveFmtBody format;
+ u_short ext_size;
+ u_short bit_p_spl;
+ u_int channel_mask;
+ u_short guid_format; /* WAV_FMT_* */
+ u_char guid_tag[14]; /* WAV_GUID_TAG */
+} WaveFmtExtensibleBody;
+
+typedef struct {
+ u_int type; /* 'data' */
+ u_int length; /* samplecount */
+} WaveChunkHeader;
+
+
+#endif /* FORMATS */
diff --git a/src/utils/cplay.c b/src/utils/cplay.c
index 5b749419e731..8882f4d9746d 100644
--- a/src/utils/cplay.c
+++ b/src/utils/cplay.c
@@ -1,4 +1,6 @@
/*
+ * Copyright 2020 NXP
+ *
* This file is provided under a dual BSD/LGPLv2.1 license. When using or
* redistributing this file, you may do so under either license.
*
@@ -73,6 +75,8 @@
#include "tinycompress/tinycompress.h"
#include "tinycompress/tinymp3.h"
#include "tinycompress/id3_tag_decode.h"
+#include "tinycompress/wave_formats.h"
+#include <alsa/asoundlib.h>
static int verbose;
static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM;
@@ -166,6 +170,77 @@ static int parse_mp3_header(struct mp3_header *header, unsigned int *num_channel
return 0;
}
+static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate,
+ unsigned int *format) {
+ WaveHeader wave_header;
+ WaveChunkHeader chunk_header;
+ WaveFmtBody fmt_body;
+ int more_chunks = 1;
+
+ fread(&wave_header, sizeof(WaveHeader), 1, file);
+ if ((wave_header.magic != WAV_RIFF) ||
+ (wave_header.type != WAV_WAVE)) {
+ fprintf(stderr, "Error: it is not a riff/wave file\n");
+ return -1;
+ }
+
+ do {
+ fread(&chunk_header, sizeof(WaveChunkHeader), 1, file);
+ switch (chunk_header.type) {
+ case WAV_FMT:
+ fread(&fmt_body, sizeof(WaveFmtBody), 1, file);
+ /* If the format header is larger, skip the rest */
+ if (chunk_header.length > sizeof(WaveFmtBody))
+ fseek(file, chunk_header.length - sizeof(WaveFmtBody), SEEK_CUR);
+
+ *num_channels = fmt_body.channels;
+ *sample_rate = fmt_body.sample_fq;
+
+ switch (fmt_body.bit_p_spl) {
+ case 8:
+ *format = SND_PCM_FORMAT_U8;
+ break;
+ case 16:
+ *format = SND_PCM_FORMAT_S16_LE;
+ break;
+ case 24:
+ switch (fmt_body.byte_p_spl / fmt_body.channels) {
+ case 3:
+ *format = SND_PCM_FORMAT_S24_3LE;
+ break;
+ case 4:
+ *format = SND_PCM_FORMAT_S24_LE;
+ break;
+ default:
+ fprintf(stderr, "format error\n");
+ return -1;
+ }
+ break;
+ case 32:
+ if (fmt_body.format == WAV_FMT_PCM) {
+ *format = SND_PCM_FORMAT_S32_LE;
+ } else if (fmt_body.format == WAV_FMT_IEEE_FLOAT) {
+ *format = SND_PCM_FORMAT_FLOAT_LE;
+ }
+ break;
+ default:
+ fprintf(stderr, "format error\n");
+ return -1;
+ }
+ break;
+ case WAV_DATA:
+ /* Stop looking for chunks */
+ more_chunks = 0;
+ break;
+ default:
+ /* Unknown chunk, skip bytes */
+ fseek(file, chunk_header.length, SEEK_CUR);
+ }
+ } while (more_chunks);
+
+ return 0;
+}
+
static int print_time(struct compress *compress)
{
unsigned int avail;
@@ -385,6 +460,35 @@ void get_codec_iec(FILE *file, struct compr_config *config,
codec->format = 0;
}
+void get_codec_pcm(FILE *file, struct compr_config *config,
+ struct snd_codec *codec)
+{
+ unsigned int channels, rate, format;
+
+ if (parse_wav_header(file, &channels, &rate, &format) == -1) {
+ fclose(file);
+ exit(EXIT_FAILURE);
+ }
+
+ if (channels > 2 || (format != SND_PCM_FORMAT_S16_LE && format != SND_PCM_FORMAT_S32_LE) ||
+ rate > 192000) {
+ fprintf(stderr, "unsupported wave file\n");
+ fclose(file);
+ exit(EXIT_FAILURE);
+ }
+
+ codec->id = SND_AUDIOCODEC_PCM;
+ codec->ch_in = channels;
+ codec->ch_out = channels;
+ codec->sample_rate = rate;
+ codec->bit_rate = 0;
+ codec->rate_control = 0;
+ codec->profile = SND_AUDIOPROFILE_PCM;
+ codec->level = 0;
+ codec->ch_mode = 0;
+ codec->format = format;
+}
+
void play_samples(char *name, unsigned int card, unsigned int device,
unsigned long buffer_size, unsigned int frag,
unsigned long codec_id)
@@ -411,6 +515,9 @@ void play_samples(char *name, unsigned int card, unsigned int device,
case SND_AUDIOCODEC_IEC61937:
get_codec_iec(file, &config, &codec);
break;
+ case SND_AUDIOCODEC_PCM:
+ get_codec_pcm(file, &config, &codec);
+ break;
default:
fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
exit(EXIT_FAILURE);
--
2.27.0

View File

@ -1,147 +0,0 @@
From 6f778c21ee357a662cdd758cff578a3e4b85eedf Mon Sep 17 00:00:00 2001
From: Zhang Peng <peng.zhang_8@nxp.com>
Date: Tue, 4 Aug 2020 15:29:29 +0800
Subject: [PATCH] cplay: Add pause feature
Add option: -p pause
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
---
src/utils/cplay.c | 56 +++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 52 insertions(+), 4 deletions(-)
diff --git a/src/utils/cplay.c b/src/utils/cplay.c
index 8882f4d..8e3dcbb 100644
--- a/src/utils/cplay.c
+++ b/src/utils/cplay.c
@@ -117,6 +117,9 @@ static void usage(void)
"-f\tfragments\n\n"
"-v\tverbose mode\n"
"-h\tPrints this help list\n\n"
+ "-p\tpause\n"
+ "-m\tpause blocks\n"
+ "-n\tpause time duration\n"
"Example:\n"
"\tcplay -c 1 -d 2 test.mp3\n"
"\tcplay -f 5 test.mp3\n\n"
@@ -133,7 +136,8 @@ static void usage(void)
void play_samples(char *name, unsigned int card, unsigned int device,
unsigned long buffer_size, unsigned int frag,
- unsigned long codec_id);
+ unsigned long codec_id, int pause_count, int pause_block,
+ int pause_duration);
struct mp3_header {
uint16_t sync;
@@ -262,12 +266,15 @@ int main(int argc, char **argv)
int c, i;
unsigned int card = 0, device = 0, frag = 0;
unsigned int codec_id = SND_AUDIOCODEC_MP3;
+ int pause_count = 0;
+ int pause_block = 6;
+ int pause_duration = 10;
if (argc < 2)
usage();
verbose = 0;
- while ((c = getopt(argc, argv, "hvb:f:c:d:I:")) != -1) {
+ while ((c = getopt(argc, argv, "hvb:f:c:d:I:p:m:n:")) != -1) {
switch (c) {
case 'h':
usage();
@@ -306,6 +313,23 @@ int main(int argc, char **argv)
case 'v':
verbose = 1;
break;
+ case 'p':
+ pause_count = strtol(optarg, NULL, 10);
+ break;
+ case 'm':
+ pause_block = strtol(optarg, NULL, 10);
+ if (pause_duration < 0) {
+ printf("Set wrong paramter! Set duration default 6.\n");
+ pause_duration = 6;
+ }
+ break;
+ case 'n':
+ pause_duration = strtol(optarg, NULL, 10);
+ if (pause_duration < 0) {
+ printf("Set wrong paramter! Set duration default 10.\n");
+ pause_duration = 10;
+ }
+ break;
default:
exit(EXIT_FAILURE);
}
@@ -315,7 +339,7 @@ int main(int argc, char **argv)
file = argv[optind];
- play_samples(file, card, device, buffer_size, frag, codec_id);
+ play_samples(file, card, device, buffer_size, frag, codec_id, pause_count, pause_block, pause_duration);
fprintf(stderr, "Finish Playing.... Close Normally\n");
exit(EXIT_SUCCESS);
@@ -491,7 +515,8 @@ void get_codec_pcm(FILE *file, struct compr_config *config,
void play_samples(char *name, unsigned int card, unsigned int device,
unsigned long buffer_size, unsigned int frag,
- unsigned long codec_id)
+ unsigned long codec_id, int pause_count, int pause_block,
+ int pause_duration)
{
struct compr_config config;
struct snd_codec codec;
@@ -499,6 +524,7 @@ void play_samples(char *name, unsigned int card, unsigned int device,
FILE *file;
char *buffer;
int size, num_read, wrote;
+ int write_count = 0;
if (verbose)
printf("%s: entry\n", __func__);
@@ -574,6 +600,13 @@ void play_samples(char *name, unsigned int card, unsigned int device,
if (verbose)
printf("%s: You should hear audio NOW!!!\n", __func__);
+ if (pause_count > 0) {
+ printf("sleep...\n");
+ compress_pause(compress);
+ sleep(pause_duration);
+ compress_resume(compress);
+ }
+
do {
num_read = fread(buffer, 1, size, file);
if (num_read > 0) {
@@ -592,8 +625,23 @@ void play_samples(char *name, unsigned int card, unsigned int device,
printf("%s: wrote %d\n", __func__, wrote);
}
}
+ write_count++;
+ if ((pause_count > 0) && (write_count % pause_block == 0)) {
+ printf("pause...\n");
+ compress_pause(compress);
+ sleep(pause_duration);
+ printf("pause release...\n");
+ compress_resume(compress);
+ pause_count--;
+ }
} while (num_read > 0);
+ if (pause_count > 0) {
+ compress_pause(compress);
+ sleep(5);
+ compress_resume(compress);
+ }
+
if (verbose)
printf("%s: exit success\n", __func__);
/* issue drain if it supports */
--
2.17.1

View File

@ -1,41 +0,0 @@
From a2892bf5db7520689fa9cb1d1589fa804bd9dc1a Mon Sep 17 00:00:00 2001
From: Bing Song <bing.song@nxp.com>
Date: Tue, 18 Aug 2020 15:26:51 +0800
Subject: [PATCH] tinycompress: pass NULL buffer with 0 size to driver.
The NULL buffer with 0 size to indecate driver drain input data with
non-block mode. The defaul drain is block mode.
upstream status: imx specific
Signed-off-by: Bing Song <bing.song@nxp.com>
---
src/lib/compress.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lib/compress.c b/src/lib/compress.c
index bba4fcf..d66df0b 100644
--- a/src/lib/compress.c
+++ b/src/lib/compress.c
@@ -315,7 +315,8 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size
fds.events = POLLOUT;
/*TODO: treat auto start here first */
- while (size) {
+ /* NULL buffer with 0 size for non-block drain */
+ do {
if (ioctl(compress->fd, SNDRV_COMPRESS_AVAIL, &avail))
return oops(compress, errno, "cannot get avail");
@@ -357,7 +358,7 @@ int compress_write(struct compress *compress, const void *buf, unsigned int size
size -= written;
cbuf += written;
total += written;
- }
+ } while (size);
return total;
}
--
2.17.1

View File

@ -1,252 +0,0 @@
From 2912f8573cea25fbd38ac7a8b68af2ea6a05e599 Mon Sep 17 00:00:00 2001
From: Zhang Peng <peng.zhang_8@nxp.com>
Date: Wed, 28 Oct 2020 19:08:53 +0800
Subject: [PATCH] cplay: Support aac streams
Support run aac format streams for cplay.
upstream status: imx specific
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
---
src/utils/cplay.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 210 insertions(+)
diff --git a/src/utils/cplay.c b/src/utils/cplay.c
index 8e3dcbb..2a1464a 100644
--- a/src/utils/cplay.c
+++ b/src/utils/cplay.c
@@ -245,6 +245,190 @@ static int parse_wav_header(FILE *file, unsigned int *num_channels, unsigned int
return 0;
}
+int find_adts_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
+{
+ int ret;
+ unsigned char buf[5];
+
+ ret = fread(buf, sizeof(buf), 1, file);
+ if (ret < 0) {
+ fprintf(stderr, "open file error: %d\n", ret);
+ return 0;
+ }
+ fseek(file, 0, SEEK_SET);
+
+ if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0))
+ return 0;
+ /* mpeg id */
+ switch (buf[1]>>3 & 0x1) {
+ case 0x0:
+ *format = SND_AUDIOSTREAMFORMAT_MP4ADTS;
+ break;
+ case 0x1:
+ *format = SND_AUDIOSTREAMFORMAT_MP2ADTS;
+ break;
+ default:
+ fprintf(stderr, "can't find stream format\n");
+ break;
+ }
+ /* sample_rate */
+ switch (buf[2]>>2 & 0xf) {
+ case 0x0:
+ *sample_rate = 96000;
+ break;
+ case 0x1:
+ *sample_rate = 88200;
+ break;
+ case 0x2:
+ *sample_rate = 64000;
+ break;
+ case 0x3:
+ *sample_rate = 48000;
+ break;
+ case 0x4:
+ *sample_rate = 44100;
+ break;
+ case 0x5:
+ *sample_rate = 32000;
+ break;
+ case 0x6:
+ *sample_rate = 24000;
+ break;
+ case 0x7:
+ *sample_rate = 22050;
+ break;
+ case 0x8:
+ *sample_rate = 16000;
+ break;
+ case 0x9:
+ *sample_rate = 12000;
+ break;
+ case 0xa:
+ *sample_rate = 11025;
+ break;
+ case 0xb:
+ *sample_rate = 8000;
+ break;
+ case 0xc:
+ *sample_rate = 7350;
+ break;
+ default:
+ break;
+ }
+ /* channel */
+ switch (((buf[2]&0x1) << 2) | (buf[3]>>6)) {
+ case 1:
+ *num_channels = 1;
+ break;
+ case 2:
+ *num_channels = 2;
+ break;
+ case 3:
+ *num_channels = 3;
+ break;
+ case 4:
+ *num_channels = 4;
+ break;
+ case 5:
+ *num_channels = 5;
+ break;
+ case 6:
+ *num_channels = 6;
+ break;
+ case 7:
+ *num_channels = 7;
+ break;
+ default:
+ break;
+ }
+ return 1;
+}
+
+static const int aac_sample_rates[] = { 96000, 88200, 64000, 48000, 44100,
+ 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350
+};
+
+#define MAX_SR_NUM sizeof(aac_sample_rates)/sizeof(aac_sample_rates[0])
+
+static int get_sample_rate_from_index(int sr_index)
+{
+ if (sr_index >= 0 && sr_index < MAX_SR_NUM)
+ return aac_sample_rates[sr_index];
+
+ return 0;
+}
+
+int find_adif_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
+{
+ int ret;
+ unsigned char adif_id[4];
+ unsigned char adif_header[20];
+ int bitstream_type;
+ int bitrate;
+ int object_type;
+ int sr_index;
+ int skip_size = 0;
+
+ ret = fread(adif_id, sizeof(unsigned char), 4, file);
+ if (ret < 0) {
+ fprintf(stderr, "read data from file err: %d\n", ret);
+ return 0;
+ }
+ /* adif id */
+ if ((adif_id[0] != 0x41) || (adif_id[1] != 0x44) ||
+ (adif_id[2] != 0x49) || (adif_id[3] != 0x46))
+ return 0;
+
+ fread(adif_header, sizeof(unsigned char), 20, file);
+
+ /* copyright string */
+ if (adif_header[0] & 0x80)
+ skip_size = 9;
+
+ bitstream_type = adif_header[0 + skip_size] & 0x10;
+ bitrate =
+ ((unsigned int) (adif_header[0 + skip_size] & 0x0f) << 19) |
+ ((unsigned int) adif_header[1 + skip_size] << 11) |
+ ((unsigned int) adif_header[2 + skip_size] << 3) |
+ ((unsigned int) adif_header[3 + skip_size] & 0xe0);
+
+ if (bitstream_type == 0) {
+ object_type = ((adif_header[6 + skip_size] & 0x01) << 1) |
+ ((adif_header[7 + skip_size] & 0x80) >> 7);
+ sr_index = (adif_header[7 + skip_size] & 0x78) >> 3;
+ }
+ /* VBR */
+ else {
+ object_type = (adif_header[4 + skip_size] & 0x18) >> 3;
+ sr_index = ((adif_header[4 + skip_size] & 0x07) << 1) |
+ ((adif_header[5 + skip_size] & 0x80) >> 7);
+ }
+
+ /* sample rate */
+ *sample_rate = get_sample_rate_from_index(sr_index);
+
+ /* FIXME: assume channels is 2 */
+ *num_channels = 2;
+
+ *format = SND_AUDIOSTREAMFORMAT_ADIF;
+ fseek(file, 0, SEEK_SET);
+ return 1;
+}
+
+static int parse_aac_header(FILE *file, unsigned int *num_channels, unsigned int *sample_rate, unsigned int *format)
+{
+ if (find_adts_header(file, num_channels, sample_rate, format))
+ return 1;
+ else if (find_adif_header(file, num_channels, sample_rate, format))
+ return 1;
+ else {
+ fprintf(stderr, "can't find streams format\n");
+ return 0;
+ }
+
+ return 1;
+}
+
static int print_time(struct compress *compress)
{
unsigned int avail;
@@ -513,6 +697,29 @@ void get_codec_pcm(FILE *file, struct compr_config *config,
codec->format = format;
}
+void get_codec_aac(FILE *file, struct compr_config *config,
+ struct snd_codec *codec)
+{
+ unsigned int channels, rate, format;
+
+ if (parse_aac_header(file, &channels, &rate, &format) == 0) {
+ fclose(file);
+ exit(EXIT_FAILURE);
+ };
+ fseek(file, 0, SEEK_SET);
+
+ codec->id = SND_AUDIOCODEC_AAC;
+ codec->ch_in = channels;
+ codec->ch_out = channels;
+ codec->sample_rate = rate;
+ codec->bit_rate = 0;
+ codec->rate_control = 0;
+ codec->profile = SND_AUDIOPROFILE_AAC;
+ codec->level = 0;
+ codec->ch_mode = 0;
+ codec->format = format;
+
+}
void play_samples(char *name, unsigned int card, unsigned int device,
unsigned long buffer_size, unsigned int frag,
unsigned long codec_id, int pause_count, int pause_block,
@@ -544,6 +751,9 @@ void play_samples(char *name, unsigned int card, unsigned int device,
case SND_AUDIOCODEC_PCM:
get_codec_pcm(file, &config, &codec);
break;
+ case SND_AUDIOCODEC_AAC:
+ get_codec_aac(file, &config, &codec);
+ break;
default:
fprintf(stderr, "codec ID %ld is not supported\n", codec_id);
exit(EXIT_FAILURE);
--
2.17.1

View File

@ -1,19 +0,0 @@
SUMMARY = "tinycompress library for compress audio offload in alsa"
DESCRIPTION = "A library to handle compressed formats like MP3 etc"
LICENSE = "BSD-3-Clause"
inherit autotools pkgconfig
LIC_FILES_CHKSUM = "file://COPYING;md5=cf9105c1a2d4405cbe04bbe3367373a0"
DEPENDS:append = " alsa-lib"
SRC_URI = "git://git.alsa-project.org/tinycompress.git;protocol=git;branch=master \
file://0001-tinycompress-Add-id3-decoding.patch \
file://0002-cplay-Support-wave-file.patch \
file://0003-cplay-Add-pause-feature.patch \
file://0004-tinycompress-pass-NULL-buffer-with-0-size-to-driver.patch \
file://0005-cplay-Support-aac-streams.patch \
"
SRCREV = "995f2ed91045dad8c20485ab1a64727d22cd92e5"
S = "${WORKDIR}/git"