From 3e34fba3f6b8389074f64203299fa60ec0fc18e1 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Fri, 5 Mar 2021 15:21:55 -0600 Subject: meta-raspberrypi: subtree update:f5fe02c30c..853ccd7440 Chris Laplante (8): python3-adafruit-blinka: add recipe python3-adafruit-circuitpython-busdevice: add recipe python3-adafruit-circuitpython-motor: add recipe python3-adafruit-circuitpython-motorkit: add recipe python3-adafruit-circuitpython-pca9685: add recipe python3-adafruit-circuitpython-register: add recipe python3-adafruit-platformdetect: add recipe python3-adafruit-pureio: add recipe Jose Quaresma (3): gstreamer1.0-omx: drop custom cflags gstreamer1.0-omx: consolidate the append usage and only use one gstreamer1.0-omx: drop config-files-path.patch Khem Raj (2): python3-adafruit-blinka: Make rpi-gpio dependency conditional python3-adafruit-blinka: Delete microcontroller/bcm283x for non arm32 machines Martin Jansa (2): sdcard_image-rpi.bbclass: increase default boot partition size from 40MiB to 48MiB sdcard_image-rpi.bbclass: shorten the default BOOTDD_VOLUME_ID Mike Looijmans (1): overlays: Add "vc4-kms-dsi-7inch.dtbo" Signed-off-by: Andrew Geissler Change-Id: If81a2227cc45daf24cd0b2466651658bb1b71eb0 --- meta-raspberrypi/classes/sdcard_image-rpi.bbclass | 10 +- meta-raspberrypi/conf/machine/include/rpi-base.inc | 1 + .../python/python3-adafruit-blinka_6.2.2.bb | 30 +++++ ...thon3-adafruit-circuitpython-busdevice_5.0.5.bb | 18 +++ .../python3-adafruit-circuitpython-motor_3.2.6.bb | 18 +++ ...ython3-adafruit-circuitpython-motorkit_1.6.1.bb | 22 +++ ...python3-adafruit-circuitpython-pca9685_3.3.4.bb | 20 +++ ...ython3-adafruit-circuitpython-register_1.9.4.bb | 15 +++ .../python3-adafruit-platformdetect_3.1.1.bb | 15 +++ .../python/python3-adafruit-pureio_1.1.8.bb | 19 +++ ...o-acquire-buffer-when-src-pad-isn-t-activ.patch | 48 ------- .../0001-config-files-path.patch | 150 --------------------- .../0003-no-timeout-on-get-state.patch | 24 ---- ...erly-handle-drain-requests-while-flushing.patch | 30 ----- ...-gst_omx_video_dec_set_format-if-there-s-.patch | 36 ----- ...o-acquire-buffer-when-src-pad-isn-t-activ.patch | 48 +++++++ .../0003-no-timeout-on-get-state.patch | 24 ++++ ...erly-handle-drain-requests-while-flushing.patch | 30 +++++ ...-gst_omx_video_dec_set_format-if-there-s-.patch | 36 +++++ .../gstreamer/gstreamer1.0-omx_%.bbappend | 16 ++- .../gstreamer/gstreamer1.0-omx_1.18%.bbappend | 12 -- 21 files changed, 312 insertions(+), 310 deletions(-) create mode 100644 meta-raspberrypi/recipes-devtools/python/python3-adafruit-blinka_6.2.2.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-busdevice_5.0.5.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motor_3.2.6.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motorkit_1.6.1.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-pca9685_3.3.4.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-register_1.9.4.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/python3-adafruit-platformdetect_3.1.1.bb create mode 100644 meta-raspberrypi/recipes-devtools/python/python3-adafruit-pureio_1.1.8.bb delete mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch delete mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0001-config-files-path.patch delete mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0003-no-timeout-on-get-state.patch delete mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0004-Properly-handle-drain-requests-while-flushing.patch delete mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch create mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch create mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch create mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch create mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch delete mode 100644 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.18%.bbappend (limited to 'meta-raspberrypi') diff --git a/meta-raspberrypi/classes/sdcard_image-rpi.bbclass b/meta-raspberrypi/classes/sdcard_image-rpi.bbclass index 0ae98cdab..e803a0da9 100644 --- a/meta-raspberrypi/classes/sdcard_image-rpi.bbclass +++ b/meta-raspberrypi/classes/sdcard_image-rpi.bbclass @@ -13,14 +13,14 @@ inherit image_types # Default Free space = 1.3x # Use IMAGE_OVERHEAD_FACTOR to add more space # <---------> -# 4MiB 40MiB SDIMG_ROOTFS +# 4MiB 48MiB SDIMG_ROOTFS # <-----------------------> <----------> <----------------------> # ------------------------ ------------ ------------------------ # | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | # ------------------------ ------------ ------------------------ # ^ ^ ^ ^ # | | | | -# 0 4MiB 4MiB + 40MiB 4MiB + 40Mib + SDIMG_ROOTFS +# 0 4MiB 4MiB + 48MiB 4MiB + 48Mib + SDIMG_ROOTFS # This image depends on the rootfs image IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" @@ -31,10 +31,12 @@ SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img" SDIMG_KERNELIMAGE_raspberrypi3-64 ?= "kernel8.img" # Boot partition volume id -BOOTDD_VOLUME_ID ?= "${MACHINE}" +# Shorten raspberrypi to just rpi to keep it under 11 characters +# now enforced by mkfs.vfat from dosfstools-4.2 +BOOTDD_VOLUME_ID ?= "${@d.getVar('MACHINE').replace('raspberrypi', 'rpi')}" # Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT) -BOOT_SPACE ?= "40960" +BOOT_SPACE ?= "49152" # Set alignment to 4MB [in KiB] IMAGE_ROOTFS_ALIGNMENT = "4096" diff --git a/meta-raspberrypi/conf/machine/include/rpi-base.inc b/meta-raspberrypi/conf/machine/include/rpi-base.inc index ac945f6a2..8b33a0fb7 100644 --- a/meta-raspberrypi/conf/machine/include/rpi-base.inc +++ b/meta-raspberrypi/conf/machine/include/rpi-base.inc @@ -44,6 +44,7 @@ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \ overlays/rpi-poe.dtbo \ overlays/vc4-fkms-v3d.dtbo \ overlays/vc4-kms-v3d.dtbo \ + overlays/vc4-kms-dsi-7inch.dtbo \ overlays/w1-gpio.dtbo \ overlays/w1-gpio-pullup.dtbo \ " diff --git a/meta-raspberrypi/recipes-devtools/python/python3-adafruit-blinka_6.2.2.bb b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-blinka_6.2.2.bb new file mode 100644 index 000000000..7d3120f76 --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-blinka_6.2.2.bb @@ -0,0 +1,30 @@ +SUMMARY = "CircuitPython APIs for non-CircuitPython versions of Python such as CPython on Linux and MicroPython." +HOMEPAGE = "https://github.com/adafruit/Adafruit_Blinka" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=660e614bc7efb0697cc793d8a22a55c2" + +SRC_URI = "git://github.com/adafruit/Adafruit_Blinka.git" +SRCREV = "dc688f354fe779c9267c208b99f310af87e79272" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +do_install_append() { +# it ships ./bcm283x/pulseio/libgpiod_pulsein which is a prebuilt +# 32bit binary therefore we should make this specific to 32bit rpi machines (based on bcm283x) only + if [ ${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '1', '0', d)} = "0" ]; then + rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/adafruit_blinka/microcontroller/bcm283x + fi +} + +RDEPENDS_${PN} += " \ + libgpiod \ + python3-adafruit-platformdetect \ + python3-adafruit-pureio \ + python3-core \ +" + +RDEPENDS_${PN}_append_rpi = " rpi-gpio" diff --git a/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-busdevice_5.0.5.bb b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-busdevice_5.0.5.bb new file mode 100644 index 000000000..c14d6f3d6 --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-busdevice_5.0.5.bb @@ -0,0 +1,18 @@ +SUMMARY = "CircuitPython bus device classes to manage bus sharing." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_BusDevice" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6ec69d6e9e6c85adfb7799d7f8cf044e" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_BusDevice.git" +SRCREV = "1bfe8005293205e2f7b2cc498ab5a946f1133b40" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-adafruit-blinka \ + python3-core \ +" diff --git a/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motor_3.2.6.bb b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motor_3.2.6.bb new file mode 100644 index 000000000..e05e2ab5e --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motor_3.2.6.bb @@ -0,0 +1,18 @@ +SUMMARY = "CircuitPython helper library provides higher level objects to control motors and servos." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_Motor" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b72678307cc7c10910b5ef460216af07" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_Motor.git" +SRCREV = "2251bfc0501d0acfb96c0a43f4f2b4c6a10ca14e" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-adafruit-blinka \ + python3-core \ +" diff --git a/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motorkit_1.6.1.bb b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motorkit_1.6.1.bb new file mode 100644 index 000000000..f35d48cf2 --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-motorkit_1.6.1.bb @@ -0,0 +1,22 @@ +SUMMARY = "CircuitPython helper library for DC & Stepper Motor FeatherWing, Shield, and Pi Hat kits." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_MotorKit" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6ad4a8854b39ad474755ef1aea813bac" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_MotorKit.git" +SRCREV = "8c1462b4129b21f6db156d1517abb017bb74b982" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-adafruit-blinka \ + python3-adafruit-circuitpython-busdevice \ + python3-adafruit-circuitpython-motor \ + python3-adafruit-circuitpython-pca9685 \ + python3-adafruit-circuitpython-register \ + python3-core \ +" diff --git a/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-pca9685_3.3.4.bb b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-pca9685_3.3.4.bb new file mode 100644 index 000000000..0b65c81ea --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-pca9685_3.3.4.bb @@ -0,0 +1,20 @@ +SUMMARY = "CircuitPython driver for motor, stepper, and servo based on PCA9685." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_PCA9685" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e7eb6b599fb0cfb06485c64cd4242f62" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_PCA9685.git" +SRCREV = "2780c4102f4c23fbab252aa1198b61ba7e2d1b2c" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-adafruit-blinka \ + python3-adafruit-circuitpython-busdevice \ + python3-adafruit-circuitpython-register \ + python3-core \ +" diff --git a/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-register_1.9.4.bb b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-register_1.9.4.bb new file mode 100644 index 000000000..f1af80bea --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-circuitpython-register_1.9.4.bb @@ -0,0 +1,15 @@ +SUMMARY = "CircuitPython data descriptor classes to represent hardware registers on I2C and SPI devices." +HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_Register" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6ec69d6e9e6c85adfb7799d7f8cf044e" + +SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_Register.git" + +S = "${WORKDIR}/git" +SRCREV = "5fee6e0c3878110844bc51e16063eeae7d94c457" + +DEPENDS += "python3-setuptools-scm-native" + +inherit setuptools3 + +RDEPENDS_${PN} += "python3-core" diff --git a/meta-raspberrypi/recipes-devtools/python/python3-adafruit-platformdetect_3.1.1.bb b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-platformdetect_3.1.1.bb new file mode 100644 index 000000000..4454d247d --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-platformdetect_3.1.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "Platform detection for use by libraries like Adafruit-Blinka." +HOMEPAGE = "https://github.com/adafruit/Adafruit_Python_PlatformDetect" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fccd531dce4b989c05173925f0bbb76c" + +SRC_URI = "git://github.com/adafruit/Adafruit_Python_PlatformDetect.git" +SRCREV = "e0fe1b012898fa824944d6805ca74be0fa027968" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += "python3-core" diff --git a/meta-raspberrypi/recipes-devtools/python/python3-adafruit-pureio_1.1.8.bb b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-pureio_1.1.8.bb new file mode 100644 index 000000000..82415f954 --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/python/python3-adafruit-pureio_1.1.8.bb @@ -0,0 +1,19 @@ +SUMMARY = "Pure python (i.e. no native extensions) access to Linux IO including I2C and SPI. Drop in replacement for smbus and spidev modules." +HOMEPAGE = "https://github.com/adafruit/Adafruit_Python_PureIO" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2a21fcca821a506d4c36f7bbecc0d009" + +SRC_URI = "git://github.com/adafruit/Adafruit_Python_PureIO.git" +SRCREV = "f4d0973da05b8b21905ff6bab69cdb652128f342" + +S = "${WORKDIR}/git" + +inherit setuptools3 + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS_${PN} += " \ + python3-core \ + python3-ctypes \ + python3-fcntl \ +" diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch deleted file mode 100644 index c8af7da0e..000000000 --- a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 160181edf5fc73288abfe99fa04de4a550cd9c65 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 11 Feb 2016 12:53:20 -0800 -Subject: [PATCH] Don't try to acquire buffer when src pad isn't active - -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= - -This solves a race condition when setting the pipeline from PAUSE to -NULL while the decoder loop is still running. Without this patch, the -thread which interacts with the decode sink pad gets blocked here: - - gst_element_change_state() - gst_element_change_state_func() - gst_element_pads_activate() --> Deactivating pads - activate_pads() - gst_pad_set_active() - gst_pad_activate_mode() - post_activate() - GST_PAD_STREAM_LOCK() - -while gst_omx_port_acquire_buffer() gets stalled forever in -gst_omx_component_wait_message() waiting for a message that will never -arrive: - - gst_omx_video_dec_loop() - gst_omx_port_acquire_buffer() - gst_omx_component_wait_message() - ---- - omx/gstomxvideodec.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index abe6e30..c4dc33f 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -1598,6 +1598,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self) - GstOMXAcquireBufferReturn acq_return; - OMX_ERRORTYPE err; - -+ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) { -+ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead"); -+ goto flushing; -+ } -+ - #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) - port = self->eglimage ? self->egl_out_port : self->dec_out_port; - #else diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0001-config-files-path.patch b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0001-config-files-path.patch deleted file mode 100644 index 6903c1770..000000000 --- a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0001-config-files-path.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 0dc88ed881eb8420dad4cf0934a900d85b6ef313 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 11 Feb 2016 12:53:20 -0800 - ---- - config/bellagio/gstomx.conf | 8 ++++---- - config/rpi/gstomx.conf | 22 +++++++++++----------- - 2 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/config/bellagio/gstomx.conf b/config/bellagio/gstomx.conf -index 5ca8ba6..8931255 100644 ---- a/config/bellagio/gstomx.conf -+++ b/config/bellagio/gstomx.conf -@@ -1,6 +1,6 @@ - [omxmpeg4videodec] - type-name=GstOMXMPEG4VideoDec --core-name=/usr/local/lib/libomxil-bellagio.so.0 -+core-name=/usr/lib/libomxil-bellagio.so.0 - component-name=OMX.st.video_decoder.mpeg4 - rank=257 - in-port-index=0 -@@ -9,7 +9,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang - - [omxh264dec] - type-name=GstOMXH264Dec --core-name=/usr/local/lib/libomxil-bellagio.so.0 -+core-name=/usr/lib/libomxil-bellagio.so.0 - component-name=OMX.st.video_decoder.avc - rank=257 - in-port-index=0 -@@ -18,7 +18,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang - - [omxmpeg4videoenc] - type-name=GstOMXMPEG4VideoEnc --core-name=/usr/local/lib/libomxil-bellagio.so.0 -+core-name=/usr/lib/libomxil-bellagio.so.0 - component-name=OMX.st.video_encoder.mpeg4 - rank=0 - in-port-index=0 -@@ -27,7 +27,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;video-framerate-integer;s - - [omxaacenc] - type-name=GstOMXAACEnc --core-name=/usr/local/lib/libomxil-bellagio.so.0 -+core-name=/usr/lib/libomxil-bellagio.so.0 - component-name=OMX.st.audio_encoder.aac - rank=0 - in-port-index=0 -diff --git a/config/rpi/gstomx.conf b/config/rpi/gstomx.conf -index d3ea56a..2508dae 100644 ---- a/config/rpi/gstomx.conf -+++ b/config/rpi/gstomx.conf -@@ -1,6 +1,6 @@ - [omxmpeg2videodec] - type-name=GstOMXMPEG2VideoDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -9,7 +9,7 @@ hacks=no-component-role - - [omxmpeg4videodec] - type-name=GstOMXMPEG4VideoDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -18,7 +18,7 @@ hacks=no-component-role - - [omxh263dec] - type-name=GstOMXH263Dec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -27,7 +27,7 @@ hacks=no-component-role - - [omxh264dec] - type-name=GstOMXH264Dec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -36,7 +36,7 @@ hacks=no-component-role;signals-premature-eos - - [omxtheoradec] - type-name=GstOMXTheoraDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -45,7 +45,7 @@ hacks=no-component-role - - [omxvp8dec] - type-name=GstOMXVP8Dec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -54,7 +54,7 @@ hacks=no-component-role - - [omxmjpegdec] - type-name=GstOMXMJPEGDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -63,7 +63,7 @@ hacks=no-component-role - - [omxvc1dec] - type-name=GstOMXWMVDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -73,7 +73,7 @@ sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},widt - - [omxh264enc] - type-name=GstOMXH264Enc --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_encode - rank=257 - in-port-index=200 -@@ -82,7 +82,7 @@ hacks=no-component-role;no-component-reconfigure - - [omxanalogaudiosink] - type-name=GstOMXAnalogAudioSink --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.audio_render - rank=257 - in-port-index=100 -@@ -92,7 +92,7 @@ sink-template-caps=audio/x-raw,format=(string){S16LE,S32LE},layout=(string)inter - - [omxhdmiaudiosink] - type-name=GstOMXHdmiAudioSink --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.audio_render - rank=258 - in-port-index=100 diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0003-no-timeout-on-get-state.patch b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0003-no-timeout-on-get-state.patch deleted file mode 100644 index 434232661..000000000 --- a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0003-no-timeout-on-get-state.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 21f776bff596bc0bd09708efa6497f8bdcd065c0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 13 Feb 2016 11:42:29 -0800 - ---- - omx/gstomxvideodec.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index c4dc33f..ba5304f 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -2021,9 +2021,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder) - g_cond_broadcast (&self->drain_cond); - g_mutex_unlock (&self->drain_lock); - -- gst_omx_component_get_state (self->dec, 5 * GST_SECOND); -+ gst_omx_component_get_state (self->dec, 0); - #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) -- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND); -+ gst_omx_component_get_state (self->egl_render, 0); - #endif - - gst_buffer_replace (&self->codec_data, NULL); diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0004-Properly-handle-drain-requests-while-flushing.patch b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0004-Properly-handle-drain-requests-while-flushing.patch deleted file mode 100644 index 144ced6ab..000000000 --- a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0004-Properly-handle-drain-requests-while-flushing.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 140bf8548843a98b0af2ddc1765ab59c16c8994c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= -Date: Tue, 17 Nov 2015 16:51:27 +0000 -Subject: [PATCH] Properly handle drain requests while flushing - -Without this commit the decoder streaming thread stops without ever attending -the drain request, leaving the decoder input thread waiting forever. - ---- - omx/gstomx.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/omx/gstomx.c b/omx/gstomx.c -index 038ce32..5202d33 100644 ---- a/omx/gstomx.c -+++ b/omx/gstomx.c -@@ -1011,6 +1011,13 @@ gst_omx_component_new (GstObject * parent, const gchar * core_name, - - g_mutex_lock (&comp->lock); - gst_omx_component_handle_messages (comp); -+ -+ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) { -+ GST_ERROR_OBJECT (comp->parent, -+ "Last operation returned an error. Setting last_error manually."); -+ comp->last_error = err; -+ } -+ - g_mutex_unlock (&comp->lock); - - return comp; diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch deleted file mode 100644 index 3245294ea..000000000 --- a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.18/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cf6cf2060c5a7a7ddc0396a0c20c234fc56c79b6 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Tue, 28 May 2019 18:02:24 +0100 -Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a - timeout releasing the buffers taken by the egl_render out port - -From 0d2ad639e6158c8023c157e206ef3ff7abdc089c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= - -Date: Fri, 4 Dec 2015 18:39:59 +0100 -Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a -timeout releasing the buffers taken by the egl_render out port - -Upstream-status: Pending -Signed-off-by: Andrei Gherzan ---- - omx/gstomxvideodec.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index ba5304f..8bd5d3d 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -2229,7 +2229,9 @@ gst_omx_video_dec_disable (GstOMXVideoDec * self) - return FALSE; - if (gst_omx_port_wait_buffers_released (out_port, - 1 * GST_SECOND) != OMX_ErrorNone) -+#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)) - return FALSE; -+#endif - if (!gst_omx_video_dec_deallocate_output_buffers (self)) - return FALSE; - if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone) --- -2.17.1 - diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch new file mode 100644 index 000000000..c8af7da0e --- /dev/null +++ b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch @@ -0,0 +1,48 @@ +From 160181edf5fc73288abfe99fa04de4a550cd9c65 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 11 Feb 2016 12:53:20 -0800 +Subject: [PATCH] Don't try to acquire buffer when src pad isn't active + +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= + +This solves a race condition when setting the pipeline from PAUSE to +NULL while the decoder loop is still running. Without this patch, the +thread which interacts with the decode sink pad gets blocked here: + + gst_element_change_state() + gst_element_change_state_func() + gst_element_pads_activate() --> Deactivating pads + activate_pads() + gst_pad_set_active() + gst_pad_activate_mode() + post_activate() + GST_PAD_STREAM_LOCK() + +while gst_omx_port_acquire_buffer() gets stalled forever in +gst_omx_component_wait_message() waiting for a message that will never +arrive: + + gst_omx_video_dec_loop() + gst_omx_port_acquire_buffer() + gst_omx_component_wait_message() + +--- + omx/gstomxvideodec.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index abe6e30..c4dc33f 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -1598,6 +1598,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self) + GstOMXAcquireBufferReturn acq_return; + OMX_ERRORTYPE err; + ++ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) { ++ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead"); ++ goto flushing; ++ } ++ + #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) + port = self->eglimage ? self->egl_out_port : self->dec_out_port; + #else diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch new file mode 100644 index 000000000..434232661 --- /dev/null +++ b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0003-no-timeout-on-get-state.patch @@ -0,0 +1,24 @@ +From 21f776bff596bc0bd09708efa6497f8bdcd065c0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 13 Feb 2016 11:42:29 -0800 + +--- + omx/gstomxvideodec.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index c4dc33f..ba5304f 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -2021,9 +2021,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder) + g_cond_broadcast (&self->drain_cond); + g_mutex_unlock (&self->drain_lock); + +- gst_omx_component_get_state (self->dec, 5 * GST_SECOND); ++ gst_omx_component_get_state (self->dec, 0); + #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) +- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND); ++ gst_omx_component_get_state (self->egl_render, 0); + #endif + + gst_buffer_replace (&self->codec_data, NULL); diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch new file mode 100644 index 000000000..144ced6ab --- /dev/null +++ b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0004-Properly-handle-drain-requests-while-flushing.patch @@ -0,0 +1,30 @@ +From 140bf8548843a98b0af2ddc1765ab59c16c8994c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= +Date: Tue, 17 Nov 2015 16:51:27 +0000 +Subject: [PATCH] Properly handle drain requests while flushing + +Without this commit the decoder streaming thread stops without ever attending +the drain request, leaving the decoder input thread waiting forever. + +--- + omx/gstomx.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/omx/gstomx.c b/omx/gstomx.c +index 038ce32..5202d33 100644 +--- a/omx/gstomx.c ++++ b/omx/gstomx.c +@@ -1011,6 +1011,13 @@ gst_omx_component_new (GstObject * parent, const gchar * core_name, + + g_mutex_lock (&comp->lock); + gst_omx_component_handle_messages (comp); ++ ++ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) { ++ GST_ERROR_OBJECT (comp->parent, ++ "Last operation returned an error. Setting last_error manually."); ++ comp->last_error = err; ++ } ++ + g_mutex_unlock (&comp->lock); + + return comp; diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch new file mode 100644 index 000000000..3245294ea --- /dev/null +++ b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch @@ -0,0 +1,36 @@ +From cf6cf2060c5a7a7ddc0396a0c20c234fc56c79b6 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Tue, 28 May 2019 18:02:24 +0100 +Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a + timeout releasing the buffers taken by the egl_render out port + +From 0d2ad639e6158c8023c157e206ef3ff7abdc089c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= + +Date: Fri, 4 Dec 2015 18:39:59 +0100 +Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a +timeout releasing the buffers taken by the egl_render out port + +Upstream-status: Pending +Signed-off-by: Andrei Gherzan +--- + omx/gstomxvideodec.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index ba5304f..8bd5d3d 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -2229,7 +2229,9 @@ gst_omx_video_dec_disable (GstOMXVideoDec * self) + return FALSE; + if (gst_omx_port_wait_buffers_released (out_port, + 1 * GST_SECOND) != OMX_ErrorNone) ++#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)) + return FALSE; ++#endif + if (!gst_omx_video_dec_deallocate_output_buffers (self)) + return FALSE; + if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone) +-- +2.17.1 + diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend index a7aa8d9c3..a971236f2 100644 --- a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend +++ b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend @@ -1,8 +1,12 @@ +FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/${PN}:" + +SRC_URI_append_rpi = " \ + file://0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \ + file://0003-no-timeout-on-get-state.patch \ + file://0004-Properly-handle-drain-requests-while-flushing.patch \ + file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \ +" + GSTREAMER_1_0_OMX_TARGET_rpi = "rpi" GSTREAMER_1_0_OMX_CORE_NAME_rpi = "${libdir}/libopenmaxil.so" -EXTRA_OEMESON_append_rpi = " -Dheader_path=${STAGING_DIR_TARGET}/usr/include" -CFLAGS_append_rpi = " \ - -I${STAGING_DIR_TARGET}/usr/include/IL \ - -I${STAGING_DIR_TARGET}/usr/include/interface/vcos/pthreads \ - -I${STAGING_DIR_TARGET}/usr/include/interface/vmcs_host/linux \ -" +EXTRA_OEMESON_append_rpi = " -Dheader_path=${STAGING_DIR_TARGET}/usr/include/IL" diff --git a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.18%.bbappend b/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.18%.bbappend deleted file mode 100644 index 56606553c..000000000 --- a/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.18%.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -# -# Need to make this conditional to gstreamer1 -# -SRC_URI_append_rpi = " \ - file://0001-config-files-path.patch \ - file://0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \ - file://0003-no-timeout-on-get-state.patch \ - file://0004-Properly-handle-drain-requests-while-flushing.patch \ - file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \ -" - -FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/gstreamer1.0-omx-1.18:" -- cgit v1.2.3