From 535bc8f54ce5fcb4a94204df5f2b3317beb53f23 Mon Sep 17 00:00:00 2001 From: Ashok Sidipotu Date: Mon, 20 Mar 2023 18:09:30 +0530 Subject: pipewire: Update pw to v0.3.67 and wp to v0.4.14 Highlights of Pipewire. - The loopback module and other couples streams will now not randomly fail in some cases. (#3028). - PipeWire can now generate a limits.d config file with our recommended settings for priorities and memlock. - Add back the deprecated symbols but make sure a deprecated warning is emitted for them. This fixes compilation issues in bindings. - Clear old buffer memory on ports to fix some SIGBUS errors. - Fix a critical bug that causes audio distortion in some cases when using. AVX2. Highlights of Wireplumber. - Added bluetooth SCO (HSP/HFP) hardware offload support, together with an example script that enables this functionality on the PinePhone. - WirePlumber now maintains a stack of previously configured default nodes and prioritizes to one of those when the actively configured default node becomes unavailable, before calculating the next default using priorities (see !396). - The libcamera monitor is now enabled by default, so if the libcamera source is enabled in PipeWire, cameras discovered with the libcamera API will be available out of the box. This is safe to use alongside V4L2, as long as the user does not try to use the same camera over different APIs at the same time. - Added i18n support to be able to translate some user-visible strings. Bug-AGL: SPEC-4732 Change-Id: Ie2f9cb99b4594d21e5c2acd092fe54e93d067410 Signed-off-by: Ashok Sidipotu Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/28590 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller --- .../0002-Revert-loop-remove-destroy-list.patch | 120 -------- .../recipes-multimedia/pipewire/pipewire_0.3.47.bb | 318 -------------------- .../pipewire/pipewire_0.3.47.bbappend | 26 -- .../recipes-multimedia/pipewire/pipewire_0.3.67.bb | 324 +++++++++++++++++++++ .../pipewire/pipewire_0.3.67.bbappend | 25 ++ .../host.lua.d/40-device-defaults.lua | 2 +- .../host.lua.d/90-enable-all.lua | 2 +- ...s-add-pipewire-env-variables-when-running.patch | 139 --------- ...ninstalled-build-this-script-with-the-mes.patch | 77 ----- ...x-va_list-APIs-for-different-architecture.patch | 214 -------------- ...oint-device-Fix-endpoints-not-connected-w.patch | 34 --- .../wireplumber/wireplumber_git.bb | 10 +- 12 files changed, 354 insertions(+), 937 deletions(-) delete mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-Revert-loop-remove-destroy-list.patch delete mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.47.bb delete mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.47.bbappend create mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.67.bb create mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.67.bbappend delete mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-tests-add-pipewire-env-variables-when-running.patch delete mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch delete mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0003-spa-json-fix-va_list-APIs-for-different-architecture.patch delete mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0004-policy-endpoint-device-Fix-endpoints-not-connected-w.patch diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-Revert-loop-remove-destroy-list.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-Revert-loop-remove-destroy-list.patch deleted file mode 100644 index 8a988b024..000000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-Revert-loop-remove-destroy-list.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 16f63a3c8fa227625bade5a9edea22354b347d18 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= -Date: Fri, 18 Feb 2022 18:36:36 +0100 -Subject: [PATCH] Revert "loop: remove destroy list" - -This reverts commit c474846c42967c44db069a23b76a29da6f496f33. -In addition, `s->loop` is also checked before dispatching a source. - -The destroy list is needed in the presence of threads. The -issue is that a source may be destroyed between `epoll_wait()` -returning and thread loop lock being acquired. If this -source is active, then a use-after-free will be triggered -when the thread loop acquires the lock and starts dispatching -the sources. - - thread 1 thread 2 - ---------- ---------- - loop_iterate - spa_loop_control_hook_before - // release lock - - pw_thread_loop_lock - - spa_system_pollfd_wait - // assume it returns with source A - - pw_loop_destroy_source(..., A) - // frees storage of A - - pw_thread_loop_unlock - spa_loop_control_hook_after - // acquire the lock - - for (...) { - struct spa_source *s = ep[i].data; - s->rmask = ep[i].events; - // use-after-free if `s` refers to - // the previously freed `A` - -Fixes #2147 - -Upstream-Status: Backport [https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/16f63a3c] -Signed-off-by: Scott Murray - ---- - spa/plugins/support/loop.c | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) - -diff --git a/spa/plugins/support/loop.c b/spa/plugins/support/loop.c -index 0588ce770..04739eb2a 100644 ---- a/spa/plugins/support/loop.c -+++ b/spa/plugins/support/loop.c -@@ -75,6 +75,7 @@ struct impl { - struct spa_system *system; - - struct spa_list source_list; -+ struct spa_list destroy_list; - struct spa_hook_list hooks_list; - - int poll_fd; -@@ -325,6 +326,14 @@ static void loop_leave(void *object) - impl->thread = 0; - } - -+static inline void process_destroy(struct impl *impl) -+{ -+ struct source_impl *source, *tmp; -+ spa_list_for_each_safe(source, tmp, &impl->destroy_list, link) -+ free(source); -+ spa_list_init(&impl->destroy_list); -+} -+ - static int loop_iterate(void *object, int timeout) - { - struct impl *impl = object; -@@ -354,11 +363,14 @@ static int loop_iterate(void *object, int timeout) - } - for (i = 0; i < nfds; i++) { - struct spa_source *s = ep[i].data; -- if (SPA_LIKELY(s && s->rmask)) { -+ if (SPA_LIKELY(s && s->rmask && s->loop)) { - s->priv = NULL; - s->func(s); - } - } -+ if (SPA_UNLIKELY(!spa_list_is_empty(&impl->destroy_list))) -+ process_destroy(impl); -+ - return nfds; - } - -@@ -712,7 +724,7 @@ static void loop_destroy_source(void *object, struct spa_source *source) - spa_system_close(impl->impl->system, source->fd); - source->fd = -1; - } -- free(source); -+ spa_list_insert(&impl->impl->destroy_list, &impl->link); - } - - static const struct spa_loop_methods impl_loop = { -@@ -783,6 +795,8 @@ static int impl_clear(struct spa_handle *handle) - spa_list_consume(source, &impl->source_list, link) - loop_destroy_source(impl, &source->source); - -+ process_destroy(impl); -+ - spa_system_close(impl->system, impl->ack_fd); - spa_system_close(impl->system, impl->poll_fd); - -@@ -844,6 +858,7 @@ impl_init(const struct spa_handle_factory *factory, - impl->poll_fd = res; - - spa_list_init(&impl->source_list); -+ spa_list_init(&impl->destroy_list); - spa_hook_list_init(&impl->hooks_list); - - impl->buffer_data = SPA_PTR_ALIGN(impl->buffer_mem, MAX_ALIGN, uint8_t); --- -2.35.1 - diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.47.bb b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.47.bb deleted file mode 100644 index c7479bec9..000000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.47.bb +++ /dev/null @@ -1,318 +0,0 @@ -# This recipe was written by Carlos Rafael Giani -# for meta-oe -# -# The intention is to keep this synced with meta-oe and remove it when we -# can depend on meta-oe to provide this recipe for us -# -# AGL-specific overrides and configuration should go in the .bbappend file -# -SUMMARY = "Multimedia processing server for Linux" -DESCRIPTION = "Linux server for handling and routing audio and video streams between applications and multimedia I/O devices" -HOMEPAGE = "https://pipewire.org/" -BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues" -LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-or-later" - -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \ - file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \ -" -SECTION = "multimedia" - -DEPENDS = "dbus" - -# v0.3.47 -SRCREV = "2af393889358723a2789caa3c856700b1c968ef0" -SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig systemd manpages gettext useradd - -USERADD_PACKAGES = "${PN}" - -GROUPADD_PARAM:${PN} = "--system pipewire" - -USERADD_PARAM:${PN} = "--system --home / --no-create-home \ - --comment 'PipeWire multimedia daemon' \ - --gid pipewire --groups audio,video \ - pipewire" - -# For "EVL", look up https://evlproject.org/ . It involves -# a specially prepared kernel, and is currently unavailable -# in Yocto. -# -# FFmpeg and Vulkan aren't really supported - at the current -# stage (version 0.3.22), these are just experiments, not -# actual features. -# -# libcamera support currently does not build successfully. -# -# systemd user service files are disabled because per-user -# PipeWire instances aren't really something that makes -# much sense in an embedded environment. A system-wide -# instance does. -# -# manpage generation requires xmltoman, which is not available. -# -# Dont build any session managers along with pipewire -# wireplumber is the session manger used in AGL and it will -# be build in a different recipe -# -EXTRA_OEMESON += " \ - -Daudiotestsrc=enabled \ - -Devl=disabled \ - -Dsystemd-user-service=disabled \ - -Dtests=disabled \ - -Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \ - -Dvideotestsrc=enabled \ - -Dffmpeg=disabled \ - -Dvulkan=disabled \ - -Dlibcamera=disabled \ - -Dman=disabled \ - -Dsession-managers=[] \ -" - -PACKAGECONFIG ??= "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa systemd', d)} \ - gstreamer jack v4l2 \ -" - -# "jack" and "pipewire-jack" packageconfigs cannot be both enabled, -# since "jack" imports libjack, and "pipewire-jack" generates -# libjack.so* files, thus colliding with the libpack package. This -# is why these two are marked in their respective packageconfigs -# as being in conflict. - -PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev" -PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc" -PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native" -PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base" -PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack" -PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,virtual/libsdl2" -PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" -PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=enabled ,-Dsystemd=disabled -Dsystemd-system-service=disabled,systemd" -PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev" -PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled,alsa-lib" -PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,,jack" -PACKAGECONFIG[pipewire-v4l2] = "-Dpipewire-v4l2=enabled -Dpipewire-v4l2=${libdir}/${PW_MODULE_SUBDIR}/v4l2,-Dpipewire-v4l2=disabled,v4l2" - -PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " -PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " -PACKAGESPLITFUNCS:append = " fixup_dynamic_pkg_licenses " - -SPA_SUBDIR = "spa-0.2" -PW_MODULE_SUBDIR = "pipewire-0.3" - -remove_unused_installed_files() { - # jack.conf is used by pipewire-jack (not the JACK SPA plugin). - # Remove it if pipewire-jack is not built to avoid creating the - # pipewire-jack package. - if ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'false', 'true', d)}; then - rm -f "${D}${datadir}/pipewire/jack.conf" - fi -} - -do_install[postfuncs] += "remove_unused_installed_files" - -python fixup_dynamic_pkg_licenses () { - #dynamic packages inherit currently whatever is specified in LICENSE (thus multiple) - packages = (d.getVar('PACKAGES') or "").split() - - for pkg in packages: - # we manually assign the LICENSES here to cover all packages (even dynamically created ones) - d.setVar("LICENSE:" + pkg ,"MIT") - - # next handle special cases - # ==> LICENSE:${PN}-spa-plugins-alsa = "LGPL-2.1-or-later" - if "pipewire-spa-plugins-alsa" in pkg: - d.setVar("LICENSE:pipewire-spa-plugins-alsa", "LGPL-2.1-or-later") - # ==> LICENSE:${PN}-alsa-card-profile = "LGPL-2.1-or-later" - if "pipewire-alsa-card-profile" in pkg: - d.setVar("LICENSE:pipewire-alsa-card-profile", "LGPL-2.1-or-later") - # ==> LICENSE:${PN}-jack = "GPL-2.0-only" - if "pipewire-jack" in pkg: - d.setVar("LICENSE:pipewire-jack", "GPL-2.0-only") -} - -python split_dynamic_packages () { - # Create packages for each SPA plugin. These plugins are located - # in individual subdirectories, so a recursive search is needed. - spa_libdir = d.expand('${libdir}/${SPA_SUBDIR}') - do_split_packages(d, spa_libdir, r'^libspa-(.*)\.so$', d.expand('${PN}-spa-plugins-%s'), 'PipeWire SPA plugin for %s', extra_depends='', recursive=True) - - # Create packages for each PipeWire module. - pw_module_libdir = d.expand('${libdir}/${PW_MODULE_SUBDIR}') - do_split_packages(d, pw_module_libdir, r'^libpipewire-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'PipeWire %s module', extra_depends='', recursive=False) -} - -python set_dynamic_metapkg_rdepends () { - import os - import oe.utils - - # Go through all generated SPA plugin and PipeWire module packages - # (excluding the main package and the -meta package itself) and - # add them to the -meta package as RDEPENDS. - - base_pn = d.getVar('PN') - - spa_pn = base_pn + '-spa-plugins' - spa_metapkg = spa_pn + '-meta' - - pw_module_pn = base_pn + '-modules' - pw_module_metapkg = pw_module_pn + '-meta' - - d.setVar('ALLOW_EMPTY:' + spa_metapkg, "1") - d.setVar('FILES:' + spa_metapkg, "") - - d.setVar('ALLOW_EMPTY:' + pw_module_metapkg, "1") - d.setVar('FILES:' + pw_module_metapkg, "") - - blacklist = [ spa_pn, spa_metapkg, pw_module_pn, pw_module_metapkg ] - spa_metapkg_rdepends = [] - pw_module_metapkg_rdepends = [] - pkgdest = d.getVar('PKGDEST') - - for pkg in oe.utils.packages_filter_out_system(d): - if pkg in blacklist: - continue - - is_spa_pkg = pkg.startswith(spa_pn) - is_pw_module_pkg = pkg.startswith(pw_module_pn) - if not is_spa_pkg and not is_pw_module_pkg: - continue - - if pkg in spa_metapkg_rdepends or pkg in pw_module_metapkg_rdepends: - continue - - # See if the package is empty by looking at the contents of its - # PKGDEST subdirectory. If this subdirectory is empty, then then - # package is empty as well. Empty packages do not get added to - # the meta package's RDEPENDS. - pkgdir = os.path.join(pkgdest, pkg) - if os.path.exists(pkgdir): - dir_contents = os.listdir(pkgdir) or [] - else: - dir_contents = [] - is_empty = len(dir_contents) == 0 - if not is_empty: - if is_spa_pkg: - spa_metapkg_rdepends.append(pkg) - if is_pw_module_pkg: - pw_module_metapkg_rdepends.append(pkg) - - d.setVar('RDEPENDS:' + spa_metapkg, ' '.join(spa_metapkg_rdepends)) - d.setVar('DESCRIPTION:' + spa_metapkg, spa_pn + ' meta package') - - d.setVar('RDEPENDS:' + pw_module_metapkg, ' '.join(pw_module_metapkg_rdepends)) - d.setVar('DESCRIPTION:' + pw_module_metapkg, pw_module_pn + ' meta package') -} - -PACKAGES =+ "\ - libpipewire \ - ${PN}-tools \ - ${PN}-pulse \ - ${PN}-alsa \ - ${PN}-jack \ - ${PN}-v4l2 \ - ${PN}-spa-plugins \ - ${PN}-spa-plugins-meta \ - ${PN}-spa-tools \ - ${PN}-modules \ - ${PN}-modules-meta \ - ${PN}-alsa-card-profile \ - gstreamer1.0-pipewire \ -" - -PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*" - -SYSTEMD_SERVICE:${PN} = "pipewire.service" -CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf" -FILES:${PN} = " \ - ${datadir}/pipewire/pipewire.conf \ - ${datadir}/pipewire/filter-chain \ - ${systemd_user_unitdir}/pipewire.* \ - ${bindir}/pipewire \ -" - -FILES:${PN}-dev += " \ - ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so \ -" - -CONFFILES:libpipewire += "${datadir}/pipewire/client.conf" -FILES:libpipewire = " \ - ${datadir}/pipewire/client.conf \ - ${datadir}/pipewire/client-rt.conf \ - ${datadir}/pipewire/minimal.conf \ - ${libdir}/libpipewire-*.so.* \ -" -# Add the bare minimum modules and plugins required to be able -# to use libpipewire. Without these, it is essentially unusable. -RDEPENDS:libpipewire += " \ - ${PN}-modules-client-node \ - ${PN}-modules-protocol-native \ - ${PN}-spa-plugins-support \ -" - -FILES:${PN}-tools = " \ - ${bindir}/pw-* \ -" - -# This is a shim daemon that is intended to be used as a -# drop-in PulseAudio replacement, providing a pulseaudio-compatible -# socket that can be used by applications that use libpulse. -CONFFILES:${PN}-pulse += "${datadir}/pipewire/pipewire-pulse.conf" - -FILES:${PN}-pulse = " \ - ${datadir}/pipewire/pipewire-pulse.conf \ - ${systemd_user_unitdir}/pipewire-pulse.* \ - ${bindir}/pipewire-pulse \ -" -RDEPENDS:${PN}-pulse += " \ - ${PN}-modules-protocol-pulse \ -" - -# alsa plugin to redirect audio to pipewire -FILES:${PN}-alsa = "\ - ${libdir}/alsa-lib/* \ - ${datadir}/alsa/alsa.conf.d/* \ -" - -#lib to emulate v4l2 system calls on top of PipeWire -FILES:${PN}-v4l2 = "\ - ${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \ -" - -# jack drop-in libraries to redirect audio to pipewire -CONFFILES:${PN}-jack = "${datadir}/pipewire/jack.conf" -FILES:${PN}-jack = "\ - ${datadir}/pipewire/jack.conf \ - ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so.* \ -" -# Dynamic packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-spa-plugins-bluez5 += " \ - ${datadir}/${SPA_SUBDIR}/bluez5/bluez-hardware.conf \ -" -RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta" - -FILES:${PN}-spa-tools = " \ - ${bindir}/spa-* \ -" - -# Dynamic packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-modules = "" -RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" - -CONFFILES:${PN}-modules-rtkit = "${datadir}/pipewire/client-rt.conf" -FILES:${PN}-modules-rtkit += " \ - ${datadir}/pipewire/client-rt.conf \ - " - -FILES:${PN}-alsa-card-profile = " \ - ${datadir}/alsa-card-profile/* \ - ${nonarch_base_libdir}/udev/rules.d/90-pipewire-alsa.rules \ -" - -FILES:gstreamer1.0-pipewire = " \ - ${libdir}/gstreamer-1.0/* \ -" diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.47.bbappend b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.47.bbappend deleted file mode 100644 index 4cd74a818..000000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.47.bbappend +++ /dev/null @@ -1,26 +0,0 @@ -SRC_URI += "\ - file://0001-systemd-Do-not-override-rootprefix.patch \ - file://0002-Revert-loop-remove-destroy-list.patch \ -" - -PACKAGECONFIG = "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa pipewire-alsa', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'sndfile', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ - gstreamer v4l2 \ -" - -do_install:append() { - # install symlinks to alsalib configuration files - for i in 50-pipewire.conf 99-pipewire-default.conf; do - if [ -f ${D}${datadir}/alsa/alsa.conf.d/${i} ]; then - install -d ${D}${sysconfdir}/alsa/conf.d - ln -s ${datadir}/alsa/alsa.conf.d/${i} ${D}${sysconfdir}/alsa/conf.d/${i} - fi - done -} - -FILES:${PN}-alsa:append = "\ - ${sysconfdir}/alsa/conf.d/* \ -" diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.67.bb b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.67.bb new file mode 100644 index 000000000..30e27b2fd --- /dev/null +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.67.bb @@ -0,0 +1,324 @@ +# This recipe was written by Carlos Rafael Giani +# for meta-oe +# +# The intention is to keep this synced with meta-oe and remove it when we +# can depend on meta-oe to provide this recipe for us +# +# AGL-specific overrides and configuration should go in the .bbappend file +# +SUMMARY = "Multimedia processing server for Linux" +DESCRIPTION = "Linux server for handling and routing audio and video streams between applications and multimedia I/O devices" +HOMEPAGE = "https://pipewire.org/" +BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues" +LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-or-later" + +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \ + file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \ +" +SECTION = "multimedia" + +DEPENDS = "dbus" + +# v0.3.67 +SRCREV = "26623ff8cb3c9ba774537379a1835c5efb0d5159" +SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig systemd manpages gettext useradd + +USERADD_PACKAGES = "${PN}" + +GROUPADD_PARAM:${PN} = "--system pipewire" + +USERADD_PARAM:${PN} = "--system --home / --no-create-home \ + --comment 'PipeWire multimedia daemon' \ + --gid pipewire --groups audio,video \ + pipewire" + +# For "EVL", look up https://evlproject.org/ . It involves +# a specially prepared kernel, and is currently unavailable +# in Yocto. +# +# FFmpeg and Vulkan aren't really supported - at the current +# stage (version 0.3.22), these are just experiments, not +# actual features. +# +# libcamera support currently does not build successfully. +# +# systemd user service files are disabled because per-user +# PipeWire instances aren't really something that makes +# much sense in an embedded environment. A system-wide +# instance does. +# +# manpage generation requires xmltoman, which is not available. +# +# Dont build any session managers along with pipewire +# wireplumber is the session manger used in AGL and it will +# be build in a different recipe +# +EXTRA_OEMESON += " \ + -Daudiotestsrc=enabled \ + -Devl=disabled \ + -Dsystemd-user-service=disabled \ + -Dtests=disabled \ + -Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \ + -Dvideotestsrc=enabled \ + -Dffmpeg=disabled \ + -Dvulkan=disabled \ + -Dlibcamera=disabled \ + -Dman=disabled \ + -Dsession-managers=[] \ +" + +PACKAGECONFIG ??= "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa systemd', d)} \ + gstreamer jack v4l2 \ +" + +# "jack" and "pipewire-jack" packageconfigs cannot be both enabled, +# since "jack" imports libjack, and "pipewire-jack" generates +# libjack.so* files, thus colliding with the libpack package. This +# is why these two are marked in their respective packageconfigs +# as being in conflict. + +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev" +PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc" +PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native" +PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack" +PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,virtual/libsdl2" +PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=enabled ,-Dsystemd=disabled -Dsystemd-system-service=disabled,systemd" +PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev" +PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled,alsa-lib" +PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,,jack" +PACKAGECONFIG[pipewire-v4l2] = "-Dpipewire-v4l2=enabled -Dpipewire-v4l2=${libdir}/${PW_MODULE_SUBDIR}/v4l2,-Dpipewire-v4l2=disabled,v4l2" + +PACKAGESPLITFUNCS:prepend = " split_dynamic_packages " +PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends " +PACKAGESPLITFUNCS:append = " fixup_dynamic_pkg_licenses " + +SPA_SUBDIR = "spa-0.2" +PW_MODULE_SUBDIR = "pipewire-0.3" + +remove_unused_installed_files() { + # jack.conf is used by pipewire-jack (not the JACK SPA plugin). + # Remove it if pipewire-jack is not built to avoid creating the + # pipewire-jack package. + if ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'false', 'true', d)}; then + rm -f "${D}${datadir}/pipewire/jack.conf" + fi +} + +do_install[postfuncs] += "remove_unused_installed_files" + +python fixup_dynamic_pkg_licenses () { + #dynamic packages inherit currently whatever is specified in LICENSE (thus multiple) + packages = (d.getVar('PACKAGES') or "").split() + + for pkg in packages: + # we manually assign the LICENSES here to cover all packages (even dynamically created ones) + d.setVar("LICENSE:" + pkg ,"MIT") + + # next handle special cases + # ==> LICENSE:${PN}-spa-plugins-alsa = "LGPL-2.1-or-later" + if "pipewire-spa-plugins-alsa" in pkg: + d.setVar("LICENSE:pipewire-spa-plugins-alsa", "LGPL-2.1-or-later") + # ==> LICENSE:${PN}-alsa-card-profile = "LGPL-2.1-or-later" + if "pipewire-alsa-card-profile" in pkg: + d.setVar("LICENSE:pipewire-alsa-card-profile", "LGPL-2.1-or-later") + # ==> LICENSE:${PN}-jack = "GPL-2.0-only" + if "pipewire-jack" in pkg: + d.setVar("LICENSE:pipewire-jack", "GPL-2.0-only") +} + +python split_dynamic_packages () { + # Create packages for each SPA plugin. These plugins are located + # in individual subdirectories, so a recursive search is needed. + spa_libdir = d.expand('${libdir}/${SPA_SUBDIR}') + do_split_packages(d, spa_libdir, r'^libspa-(.*)\.so$', d.expand('${PN}-spa-plugins-%s'), 'PipeWire SPA plugin for %s', extra_depends='', recursive=True) + + # Create packages for each PipeWire module. + pw_module_libdir = d.expand('${libdir}/${PW_MODULE_SUBDIR}') + do_split_packages(d, pw_module_libdir, r'^libpipewire-module-(.*)\.so$', d.expand('${PN}-modules-%s'), 'PipeWire %s module', extra_depends='', recursive=False) +} + +python set_dynamic_metapkg_rdepends () { + import os + import oe.utils + + # Go through all generated SPA plugin and PipeWire module packages + # (excluding the main package and the -meta package itself) and + # add them to the -meta package as RDEPENDS. + + base_pn = d.getVar('PN') + + spa_pn = base_pn + '-spa-plugins' + spa_metapkg = spa_pn + '-meta' + + pw_module_pn = base_pn + '-modules' + pw_module_metapkg = pw_module_pn + '-meta' + + d.setVar('ALLOW_EMPTY:' + spa_metapkg, "1") + d.setVar('FILES:' + spa_metapkg, "") + + d.setVar('ALLOW_EMPTY:' + pw_module_metapkg, "1") + d.setVar('FILES:' + pw_module_metapkg, "") + + blacklist = [ spa_pn, spa_metapkg, pw_module_pn, pw_module_metapkg ] + spa_metapkg_rdepends = [] + pw_module_metapkg_rdepends = [] + pkgdest = d.getVar('PKGDEST') + + for pkg in oe.utils.packages_filter_out_system(d): + if pkg in blacklist: + continue + + is_spa_pkg = pkg.startswith(spa_pn) + is_pw_module_pkg = pkg.startswith(pw_module_pn) + if not is_spa_pkg and not is_pw_module_pkg: + continue + + if pkg in spa_metapkg_rdepends or pkg in pw_module_metapkg_rdepends: + continue + + # See if the package is empty by looking at the contents of its + # PKGDEST subdirectory. If this subdirectory is empty, then then + # package is empty as well. Empty packages do not get added to + # the meta package's RDEPENDS. + pkgdir = os.path.join(pkgdest, pkg) + if os.path.exists(pkgdir): + dir_contents = os.listdir(pkgdir) or [] + else: + dir_contents = [] + is_empty = len(dir_contents) == 0 + if not is_empty: + if is_spa_pkg: + spa_metapkg_rdepends.append(pkg) + if is_pw_module_pkg: + pw_module_metapkg_rdepends.append(pkg) + + d.setVar('RDEPENDS:' + spa_metapkg, ' '.join(spa_metapkg_rdepends)) + d.setVar('DESCRIPTION:' + spa_metapkg, spa_pn + ' meta package') + + d.setVar('RDEPENDS:' + pw_module_metapkg, ' '.join(pw_module_metapkg_rdepends)) + d.setVar('DESCRIPTION:' + pw_module_metapkg, pw_module_pn + ' meta package') +} + +PACKAGES =+ "\ + libpipewire \ + ${PN}-tools \ + ${PN}-pulse \ + ${PN}-alsa \ + ${PN}-jack \ + ${PN}-v4l2 \ + ${PN}-spa-plugins \ + ${PN}-spa-plugins-meta \ + ${PN}-spa-tools \ + ${PN}-modules \ + ${PN}-modules-meta \ + ${PN}-alsa-card-profile \ + gstreamer1.0-pipewire \ +" + +PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*" + +SYSTEMD_SERVICE:${PN} = "pipewire.service" +CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf" +FILES:${PN} = " \ + ${datadir}/pipewire/pipewire.conf \ + ${datadir}/pipewire/filter-chain.conf \ + ${datadir}/pipewire/filter-chain \ + ${systemd_user_unitdir}/pipewire.* \ + ${bindir}/pipewire \ + ${datadir}/pipewire/pipewire-avb.conf \ + ${bindir}/pipewire-avb \ + ${datadir}/pipewire/pipewire-aes67.conf \ + ${bindir}/pipewire-aes67 \ + ${sysconfdir}/security/limits.d \ +" + +FILES:${PN}-dev += " \ + ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so \ +" + +CONFFILES:libpipewire += "${datadir}/pipewire/client.conf" +FILES:libpipewire = " \ + ${datadir}/pipewire/client.conf \ + ${datadir}/pipewire/client-rt.conf \ + ${datadir}/pipewire/minimal.conf \ + ${libdir}/libpipewire-*.so.* \ +" +# Add the bare minimum modules and plugins required to be able +# to use libpipewire. Without these, it is essentially unusable. +RDEPENDS:libpipewire += " \ + ${PN}-modules-client-node \ + ${PN}-modules-protocol-native \ + ${PN}-spa-plugins-support \ +" + +FILES:${PN}-tools = " \ + ${bindir}/pw-* \ +" + +# This is a shim daemon that is intended to be used as a +# drop-in PulseAudio replacement, providing a pulseaudio-compatible +# socket that can be used by applications that use libpulse. +CONFFILES:${PN}-pulse += "${datadir}/pipewire/pipewire-pulse.conf" + +FILES:${PN}-pulse = " \ + ${datadir}/pipewire/pipewire-pulse.conf \ + ${systemd_user_unitdir}/pipewire-pulse.* \ + ${bindir}/pipewire-pulse \ +" +RDEPENDS:${PN}-pulse += " \ + ${PN}-modules-protocol-pulse \ +" + +# alsa plugin to redirect audio to pipewire +FILES:${PN}-alsa = "\ + ${libdir}/alsa-lib/* \ + ${datadir}/alsa/alsa.conf.d/* \ +" + +#lib to emulate v4l2 system calls on top of PipeWire +FILES:${PN}-v4l2 = "\ + ${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \ +" + +# jack drop-in libraries to redirect audio to pipewire +CONFFILES:${PN}-jack = "${datadir}/pipewire/jack.conf" +FILES:${PN}-jack = "\ + ${datadir}/pipewire/jack.conf \ + ${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so.* \ +" +# Dynamic packages (see set_dynamic_metapkg_rdepends). +FILES:${PN}-spa-plugins-bluez5 += " \ + ${datadir}/${SPA_SUBDIR}/bluez5/bluez-hardware.conf \ +" +RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta" + +FILES:${PN}-spa-tools = " \ + ${bindir}/spa-* \ +" + +# Dynamic packages (see set_dynamic_metapkg_rdepends). +FILES:${PN}-modules = "" +RRECOMMENDS:${PN}-modules += "${PN}-modules-meta" + +CONFFILES:${PN}-modules-rtkit = "${datadir}/pipewire/client-rt.conf" +FILES:${PN}-modules-rtkit += " \ + ${datadir}/pipewire/client-rt.conf \ + " + +FILES:${PN}-alsa-card-profile = " \ + ${datadir}/alsa-card-profile/* \ + ${nonarch_base_libdir}/udev/rules.d/90-pipewire-alsa.rules \ +" + +FILES:gstreamer1.0-pipewire = " \ + ${libdir}/gstreamer-1.0/* \ +" diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.67.bbappend b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.67.bbappend new file mode 100644 index 000000000..beb7c0817 --- /dev/null +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.67.bbappend @@ -0,0 +1,25 @@ +SRC_URI += "\ + file://0001-systemd-Do-not-override-rootprefix.patch \ +" + +PACKAGECONFIG = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa pipewire-alsa', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'sndfile', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ + gstreamer v4l2 \ +" + +do_install:append() { + # install symlinks to alsalib configuration files + for i in 50-pipewire.conf 99-pipewire-default.conf; do + if [ -f ${D}${datadir}/alsa/alsa.conf.d/${i} ]; then + install -d ${D}${sysconfdir}/alsa/conf.d + ln -s ${datadir}/alsa/alsa.conf.d/${i} ${D}${sysconfdir}/alsa/conf.d/${i} + fi + done +} + +FILES:${PN}-alsa:append = "\ + ${sysconfdir}/alsa/conf.d/* \ +" diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/40-device-defaults.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/40-device-defaults.lua index 365bab59a..e0d332422 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/40-device-defaults.lua +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/40-device-defaults.lua @@ -14,7 +14,7 @@ function device_defaults.enable() -- Selects appropriate default routes ("ports" in pulseaudio terminology) -- and enables saving and restoring them together with -- their properties (per-route/port volume levels, channel maps, etc) - load_script("default-routes.lua", device_defaults.properties) + load_script("policy-device-routes.lua", device_defaults.properties) if device_defaults.properties["use-persistent-storage"] then -- Enables functionality to save and restore default device profiles diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/90-enable-all.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/90-enable-all.lua index f6d73a3f1..0afae25e3 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/90-enable-all.lua +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/90-enable-all.lua @@ -13,7 +13,7 @@ device_defaults.enable() load_script("suspend-node.lua") -- Automatically sets device profiles to 'On' -load_module("device-activation") +load_script("policy-device-profile.lua") -- Mute ALSA sinks when requested by pipewire-ic-ipc load_module("mixer-api") diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-tests-add-pipewire-env-variables-when-running.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-tests-add-pipewire-env-variables-when-running.patch deleted file mode 100644 index 88301d56f..000000000 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-tests-add-pipewire-env-variables-when-running.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 1197f31d2b681d0cf0ca1309d50c8ab8ea80ac5e Mon Sep 17 00:00:00 2001 -From: Ashok Sidipotu -Date: Thu, 2 Dec 2021 16:57:54 +0530 -Subject: [PATCH 1/2] Revert "tests: add pipewire env variables when running - tests, tidy up common_env" - -This reverts commit c24db9f3539f9b7ebe9e74c991cc3037f28ea22c. - -Upstream-Status: Inappropriate[meson version dependent] ---- - tests/meson.build | 31 ------------------------------- - tests/modules/meson.build | 9 ++++++--- - tests/wp/meson.build | 10 +++++++--- - tests/wplua/meson.build | 15 +++++++++++---- - 4 files changed, 24 insertions(+), 41 deletions(-) - -diff --git a/tests/meson.build b/tests/meson.build -index 0e06568..9238d5b 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -28,37 +28,6 @@ if valgrind.found() - timeout_multiplier: 2) - endif - --# The common test environment --common_test_env = environment({ -- 'HOME': '/invalid', -- 'XDG_RUNTIME_DIR': '/invalid', -- 'PIPEWIRE_RUNTIME_DIR': '/tmp', -- 'XDG_CONFIG_HOME': meson.current_build_dir() / '.config', -- 'XDG_STATE_HOME': meson.current_build_dir() / '.local' / 'state', -- 'FILE_MONITOR_DIR': meson.current_build_dir() / '.local' / 'file_monitor', -- 'WIREPLUMBER_CONFIG_DIR': '/invalid', -- 'WIREPLUMBER_DATA_DIR': '/invalid', -- 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / 'modules', -- 'WIREPLUMBER_DEBUG': '7', --}) -- --spa_plugindir = spa_dep.get_variable( -- pkgconfig: 'plugindir', internal: 'plugindir', default_value: '') --pipewire_moduledir = pipewire_dep.get_variable( -- pkgconfig: 'moduledir', internal: 'moduledir', default_value: '') --pipewire_confdatadir = pipewire_dep.get_variable( -- pkgconfig: 'confdatadir', internal: 'confdatadir', default_value: '') -- --if spa_plugindir != '' -- common_test_env.set('SPA_PLUGIN_DIR', spa_plugindir) --endif --if pipewire_moduledir != '' -- common_test_env.set('PIPEWIRE_MODULE_DIR', pipewire_moduledir) --endif --if pipewire_confdatadir != '' -- common_test_env.set('PIPEWIRE_CONFIG_DIR', pipewire_confdatadir) --endif -- - subdir('wp') - subdir('wplua') - subdir('modules') -diff --git a/tests/modules/meson.build b/tests/modules/meson.build -index ffab80b..2fc46dc 100644 ---- a/tests/modules/meson.build -+++ b/tests/modules/meson.build -@@ -1,7 +1,10 @@ - common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep] --common_env = common_test_env --common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) --common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) -+common_env = environment({ -+ 'G_TEST_SRCDIR': meson.current_source_dir(), -+ 'G_TEST_BUILDDIR': meson.current_build_dir(), -+ 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules', -+ 'WIREPLUMBER_DEBUG': '7', -+}) - common_args = [ - '-DG_LOG_USE_STRUCTURED', - ] -diff --git a/tests/wp/meson.build b/tests/wp/meson.build -index 178564d..b64ccae 100644 ---- a/tests/wp/meson.build -+++ b/tests/wp/meson.build -@@ -1,7 +1,11 @@ - common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep] --common_env = common_test_env --common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) --common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) -+common_env = environment({ -+ 'G_TEST_SRCDIR': meson.current_source_dir(), -+ 'G_TEST_BUILDDIR': meson.current_build_dir(), -+ 'XDG_CONFIG_HOME': meson.current_build_dir() / '.config', -+ 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules', -+ 'WIREPLUMBER_DEBUG': '7', -+}) - common_args = [ - '-DG_LOG_USE_STRUCTURED', - ] -diff --git a/tests/wplua/meson.build b/tests/wplua/meson.build -index a7ff033..fcf4b51 100644 ---- a/tests/wplua/meson.build -+++ b/tests/wplua/meson.build -@@ -1,13 +1,18 @@ - common_deps = [wplua_dep, pipewire_dep, wp_dep] --common_env = common_test_env --common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) --common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) --common_env.set('WIREPLUMBER_DATA_DIR', meson.current_source_dir()) -+common_env = environment({ -+ 'G_TEST_SRCDIR': meson.current_source_dir(), -+ 'G_TEST_BUILDDIR': meson.current_build_dir(), -+ 'WIREPLUMBER_CONFIG_DIR': '/invalid', -+ 'WIREPLUMBER_DATA_DIR': meson.current_source_dir(), -+ 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules', -+ 'WIREPLUMBER_DEBUG': '7', -+}) - - test( - 'test-wplua', - executable('test-wplua', 'wplua.c', dependencies: common_deps), - env: common_env, -+ workdir : meson.current_source_dir(), - ) - - script_tester = executable('script-tester', -@@ -20,6 +25,7 @@ test( - script_tester, - args: ['pod.lua'], - env: common_env, -+ workdir : meson.current_source_dir(), - ) - test( - 'test-lua-json', -@@ -32,4 +38,5 @@ test( - script_tester, - args: ['monitor-rules.lua'], - env: common_env, -+ workdir : meson.current_source_dir(), - ) --- -2.35.1 - diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch deleted file mode 100644 index d20634d8b..000000000 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 8e959b7894047030edca21a04dd91994e8868a1f Mon Sep 17 00:00:00 2001 -From: Ashok Sidipotu -Date: Fri, 25 Feb 2022 06:05:43 +0530 -Subject: [PATCH 2/2] Revert "wp-uninstalled: build this script with the meson - dirs filled in" - -This reverts commit 52aaf96179584292f493c4b329bc2c409e6d3dee. -Upstream-Status: Inappropriate[meson version dependent] ---- - meson.build | 31 ------------------------------- - wp-uninstalled.sh | 11 ++--------- - 2 files changed, 2 insertions(+), 40 deletions(-) - -diff --git a/meson.build b/meson.build -index e4323dc..185248f 100644 ---- a/meson.build -+++ b/meson.build -@@ -120,34 +120,3 @@ subdir('src') - if get_option('tests') - subdir('tests') - endif -- --conf_uninstalled = configuration_data() --conf_uninstalled.set('MESON', '') --conf_uninstalled.set('MESON_SOURCE_ROOT', meson.project_source_root()) --conf_uninstalled.set('MESON_BUILD_ROOT', meson.project_build_root()) -- --wp_uninstalled = configure_file( -- input : 'wp-uninstalled.sh', -- output : 'wp-uninstalled.sh.in', -- configuration : conf_uninstalled, --) -- --wireplumber_uninstalled = custom_target('wp-uninstalled', -- output : 'wp-uninstalled.sh', -- input : wp_uninstalled, -- build_by_default : true, -- command : ['cp', '@INPUT@', '@OUTPUT@'], --) -- --if meson.version().version_compare('>= 0.58') -- builddir = meson.project_build_root() -- srcdir = meson.project_source_root() -- -- devenv = environment({ -- 'WIREPLUMBER_MODULE_DIR': builddir / 'modules', -- 'WIREPLUMBER_CONFIG_DIR': srcdir / 'src' / 'config', -- 'WIREPLUMBER_DATA_DIR': srcdir / 'src', -- }) -- -- meson.add_devenv(devenv) --endif -diff --git a/wp-uninstalled.sh b/wp-uninstalled.sh -index 79e53f2..d6279ff 100755 ---- a/wp-uninstalled.sh -+++ b/wp-uninstalled.sh -@@ -2,15 +2,8 @@ - - set -e - --# This is unset by meson --# shellcheck disable=SC2157 --if [ -z "@MESON@" ]; then -- SOURCEDIR="@MESON_SOURCE_ROOT@" -- BUILDDIR="@MESON_BUILD_ROOT@" --else -- SOURCEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -- BUILDDIR=$(find "${SOURCEDIR}" -maxdepth 2 -name build.ninja -printf "%h\n" -quit 2>/dev/null || echo "${SOURCEDIR}/build") --fi -+SOURCEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -+BUILDDIR=${SOURCEDIR}/build - CONFIGDIR=config - - while getopts ":b:c:" opt; do --- -2.35.1 - diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0003-spa-json-fix-va_list-APIs-for-different-architecture.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0003-spa-json-fix-va_list-APIs-for-different-architecture.patch deleted file mode 100644 index 9d0c68d58..000000000 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0003-spa-json-fix-va_list-APIs-for-different-architecture.patch +++ /dev/null @@ -1,214 +0,0 @@ -From ae6c9a5e612c343dd307fe34a1a282b7a4f17a5c Mon Sep 17 00:00:00 2001 -From: Julian Bouzas -Date: Wed, 9 Feb 2022 07:59:59 -0500 -Subject: [PATCH 3/3] spa-json: fix va_list APIs for different architectures - -The va_list type might not always be a pointer in some architectures, so we -cannot guarantee it will be modified after using it for a second time in another -function. This fixes the issue by using macros so args does not get copied, and -always gets modified when using it more than once. - -Upstream-Status: Backport ---- - lib/wp/spa-json.c | 156 ++++++++++++++++++++++++---------------------- - 1 file changed, 80 insertions(+), 76 deletions(-) - -diff --git a/lib/wp/spa-json.c b/lib/wp/spa-json.c -index f14f395..c5e59a3 100644 ---- a/lib/wp/spa-json.c -+++ b/lib/wp/spa-json.c -@@ -363,33 +363,33 @@ wp_spa_json_new_string (const gchar *value) - wp_spa_json_builder_new_formatted ("\"%s\"", value)); - } - --static void --wp_spa_json_builder_add_value (WpSpaJsonBuilder *self, const gchar *fmt, -- va_list args) --{ -- switch (*fmt) { -- case 'n': -- wp_spa_json_builder_add_null (self); -- break; -- case 'b': -- wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean)); -- break; -- case 'i': -- wp_spa_json_builder_add_int (self, va_arg(args, gint)); -- break; -- case 'f': -- wp_spa_json_builder_add_float (self, (float)va_arg(args, double)); -- break; -- case 's': -- wp_spa_json_builder_add_string (self, va_arg(args, const gchar *)); -- break; -- case 'J': -- wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *)); -- break; -- default: -- return; -- } --} -+/* Args is not a pointer in some architectures, so this needs to be a macro to -+ * avoid args being copied */ -+#define wp_spa_json_builder_add_value(self,fmt,args) \ -+do { \ -+ switch (*fmt) { \ -+ case 'n': \ -+ wp_spa_json_builder_add_null (self); \ -+ break; \ -+ case 'b': \ -+ wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean)); \ -+ break; \ -+ case 'i': \ -+ wp_spa_json_builder_add_int (self, va_arg(args, gint)); \ -+ break; \ -+ case 'f': \ -+ wp_spa_json_builder_add_float (self, (float)va_arg(args, double)); \ -+ break; \ -+ case 's': \ -+ wp_spa_json_builder_add_string (self, va_arg(args, const gchar *)); \ -+ break; \ -+ case 'J': \ -+ wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *)); \ -+ break; \ -+ default: \ -+ break; \ -+ } \ -+} while(false) - - /*! - * \brief Creates a spa json of type array -@@ -724,48 +724,46 @@ wp_spa_json_parse_object_valist (WpSpaJson *self, va_list args) - return res; - } - --static gboolean --wp_spa_json_parse_value (const gchar *data, int len, const gchar *fmt, -- va_list args) --{ -- switch (*fmt) { -- case 'n': -- if (!spa_json_is_null (data, len)) -- return FALSE; -- break; -- case 'b': -- if (!wp_spa_json_parse_boolean_internal (data, len, -- va_arg(args, gboolean *))) -- return FALSE; -- break; -- case 'i': -- if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0) -- return FALSE; -- break; -- case 'f': -- if (spa_json_parse_float (data, len, -- (float *)va_arg(args, double *)) < 0) -- return FALSE; -- break; -- case 's': { -- gchar *str = wp_spa_json_parse_string_internal (data, len); -- if (!str) -- return FALSE; -- *va_arg(args, gchar **) = str; -- break; -- } -- case 'J': { -- WpSpaJson *j = wp_spa_json_new (data, len); -- if (!j) -- return FALSE; -- *va_arg(args, WpSpaJson **) = j; -- break; -- } -- default: -- return FALSE; -- } -- return TRUE; --} -+/* Args is not a pointer in some architectures, so this needs to be a macro to -+ * avoid args being copied */ -+#define wp_spa_json_parse_value(data,len,fmt,args) \ -+do { \ -+ switch (*fmt) { \ -+ case 'n': \ -+ if (!spa_json_is_null (data, len)) \ -+ return FALSE; \ -+ break; \ -+ case 'b': \ -+ if (!wp_spa_json_parse_boolean_internal (data, len, \ -+ va_arg(args, gboolean *))) \ -+ return FALSE; \ -+ break; \ -+ case 'i': \ -+ if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0) \ -+ return FALSE; \ -+ break; \ -+ case 'f': \ -+ if (spa_json_parse_float (data, len, va_arg(args, float *)) < 0) \ -+ return FALSE; \ -+ break; \ -+ case 's': { \ -+ gchar *str = wp_spa_json_parse_string_internal (data, len); \ -+ if (!str) \ -+ return FALSE; \ -+ *va_arg(args, gchar **) = str; \ -+ break; \ -+ } \ -+ case 'J': { \ -+ WpSpaJson *j = wp_spa_json_new (data, len); \ -+ if (!j) \ -+ return FALSE; \ -+ *va_arg(args, WpSpaJson **) = j; \ -+ break; \ -+ } \ -+ default: \ -+ return FALSE; \ -+ } \ -+} while(false) - - /*! - * \brief Parses the object property values of a spa json object -@@ -827,8 +825,7 @@ wp_spa_json_object_get_valist (WpSpaJson *self, va_list args) - value = g_value_get_boxed (&item); - - if (g_strcmp0 (key_str, lookup_key) == 0) { -- if (!wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args)) -- return FALSE; -+ wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args); - lookup_key = va_arg(args, const gchar *); - if (!lookup_key) - return TRUE; -@@ -1366,9 +1363,12 @@ gboolean - wp_spa_json_parser_get_value (WpSpaJsonParser *self, const gchar *fmt, - va_list args) - { -- return wp_spa_json_parser_advance (self) && -- wp_spa_json_parse_value (self->curr.cur, -- self->curr.end - self->curr.cur, fmt, args); -+ if (wp_spa_json_parser_advance (self)) { -+ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur, -+ fmt, args); -+ return TRUE; -+ } -+ return FALSE; - } - - /*! -@@ -1419,9 +1419,13 @@ wp_spa_json_parser_get_valist (WpSpaJsonParser *self, va_list args) - if (!format) - return TRUE; - -- /* parse value */ -- if (!wp_spa_json_parser_get_value (self, format, args)) -+ /* advance */ -+ if (!wp_spa_json_parser_advance (self)) - return FALSE; -+ -+ /* parse value */ -+ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur, -+ format, args); - } while (TRUE); - - return FALSE; --- -2.35.1 - diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0004-policy-endpoint-device-Fix-endpoints-not-connected-w.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0004-policy-endpoint-device-Fix-endpoints-not-connected-w.patch deleted file mode 100644 index be1e0a527..000000000 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0004-policy-endpoint-device-Fix-endpoints-not-connected-w.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 61dcf8b203f26a7c25ffaccdfdd94c233c0440e9 Mon Sep 17 00:00:00 2001 -From: Ashok Sidipotu -Date: Wed, 2 Mar 2022 06:55:37 +0530 -Subject: [PATCH] policy-endpoint-device: Fix endpoints not connected with - devices - --if device linkables are created ahead of the endpoints, - endpoints are not connected with the devices. - --rescan the endpoints on an endpoint creation. ---- - src/scripts/policy-endpoint-device.lua | 4 ++++ - 1 file changed, 4 insertions(+) - - Upstream-Status: Submitted [https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/337] - -diff --git a/src/scripts/policy-endpoint-device.lua b/src/scripts/policy-endpoint-device.lua -index c9c6ceb..0ba39b0 100644 ---- a/src/scripts/policy-endpoint-device.lua -+++ b/src/scripts/policy-endpoint-device.lua -@@ -221,6 +221,10 @@ linkables_om:connect("objects-changed", function (om) - scheduleRescan () - end) - -+endpoints_om:connect("object-added", function (om) -+ scheduleRescan () -+end) -+ - linkables_om:connect("object-removed", function (om, si) - unhandleLinkable (si) - end) --- -2.35.1 - diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb index 9504a5671..1caac0b6a 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb @@ -14,18 +14,14 @@ DEPENDS = "glib-2.0 glib-2.0-native pipewire lua" SRC_URI = "\ git://gitlab.freedesktop.org/pipewire/wireplumber.git;protocol=https;branch=master \ " -# v0.4.8 -SRCREV = "e14bb72dcc85e2130d0ea96768e5ae3b375a041e" +# v0.4.14 +SRCREV = "6d0c7f7b7f484b3cd2aaf2e2b3cc902c095b4946" # patches to be able to compile with lower version of meson that is available in AGL. SRC_URI += "\ - file://0001-Revert-tests-add-pipewire-env-variables-when-running.patch \ - file://0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch \ - file://0003-spa-json-fix-va_list-APIs-for-different-architecture.patch \ - file://0004-policy-endpoint-device-Fix-endpoints-not-connected-w.patch \ " -PV = "0.4.8" +PV = "0.4.14" S = "${WORKDIR}/git" WPAPI="0.4" -- cgit 1.2.3-korg