From fca7086a9227ca81302fd08ffc8df40d5a0163b4 Mon Sep 17 00:00:00 2001 From: Ashok Sidipotu Date: Wed, 1 Dec 2021 13:47:25 +0530 Subject: pipewire: update to pw 0.3.40 and wp 0.4.5 Change-Id: Ie9e3fd0a67e6a5fa38543cb9b4cc54f2e0555813 Signed-off-by: Ashok Sidipotu Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/27040 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 --- ...e-pipewire_module_c_args-as-it-is-no-long.patch | 26 ++ ...n-declare-spa_dep-and-override_dependency.patch | 80 ++++++ ...-allow-specifying-a-media.role-on-the-vir.patch | 124 -------- ...1-null-sink-make-the-timerfd-non-blocking.patch | 43 --- ...node-driver-make-the-timerfd-non-blocking.patch | 43 --- .../recipes-multimedia/pipewire/pipewire_0.3.30.bb | 312 -------------------- .../pipewire/pipewire_0.3.30.bbappend | 27 -- .../recipes-multimedia/pipewire/pipewire_0.3.40.bb | 316 +++++++++++++++++++++ .../pipewire/pipewire_0.3.40.bbappend | 25 ++ .../bluetooth.lua.d/30-bluez-monitor.lua | 23 +- .../policy.lua.d/10-default-policy.lua | 9 +- ...ninstalled-build-this-script-with-the-mes.patch | 63 ++++ ...s-add-pipewire-env-variables-when-running.patch | 136 +++++++++ .../wireplumber/wireplumber_git.bb | 13 +- 14 files changed, 676 insertions(+), 564 deletions(-) create mode 100644 meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/pipewire/pipewire/0002-meson-remove-pipewire_module_c_args-as-it-is-no-long.patch create mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-Revert-meson-declare-spa_dep-and-override_dependency.patch delete mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-alsa-plugin-allow-specifying-a-media.role-on-the-vir.patch delete mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-null-sink-make-the-timerfd-non-blocking.patch delete mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-node-driver-make-the-timerfd-non-blocking.patch delete mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb delete mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bbappend create mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bb create mode 100644 meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bbappend create mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch create mode 100644 meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-tests-add-pipewire-env-variables-when-running.patch (limited to 'meta-pipewire') diff --git a/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/pipewire/pipewire/0002-meson-remove-pipewire_module_c_args-as-it-is-no-long.patch b/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/pipewire/pipewire/0002-meson-remove-pipewire_module_c_args-as-it-is-no-long.patch new file mode 100644 index 000000000..74e5ba33b --- /dev/null +++ b/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/pipewire/pipewire/0002-meson-remove-pipewire_module_c_args-as-it-is-no-long.patch @@ -0,0 +1,26 @@ +From 3b2935ed044e657b515a07e78638b902baa8157a Mon Sep 17 00:00:00 2001 +From: Ashok Sidipotu +Date: Wed, 1 Dec 2021 12:17:52 +0530 +Subject: [PATCH] meson: remove pipewire_module_c_args as it is no longer used. + +Upstream-Status: Inappropriate [smack specific] + +--- + src/modules/meson.build | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/modules/meson.build b/src/modules/meson.build +index d1d90bf05..c9f629c08 100644 +--- a/src/modules/meson.build ++++ b/src/modules/meson.build +@@ -114,7 +114,6 @@ pipewire_module_echo_cancel = shared_library('pipewire-module-echo-cancel', + + pipewire_module_access_seclabel = shared_library('pipewire-module-access-seclabel', + [ 'module-access-seclabel.c' ], +- c_args : pipewire_module_c_args, + include_directories : [configinc, spa_inc], + install : true, + install_dir : modules_install_dir, +-- +2.33.1 + diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-Revert-meson-declare-spa_dep-and-override_dependency.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-Revert-meson-declare-spa_dep-and-override_dependency.patch new file mode 100644 index 000000000..4488acc65 --- /dev/null +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-Revert-meson-declare-spa_dep-and-override_dependency.patch @@ -0,0 +1,80 @@ +From 70e750804a700b06f62f91411d487b88e7c85fe5 Mon Sep 17 00:00:00 2001 +From: Ashok Sidipotu +Date: Fri, 26 Nov 2021 06:18:04 +0530 +Subject: [PATCH] Revert "meson: declare spa_dep and override_dependency() for + spa and pipewire" + +This reverts commit 7ab5c35cadc075bcdf44031f1f7d95352cf9a13b. + +Upstream-Status: Inappropriate[meson version dependent] + +--- + meson.build | 2 +- + spa/meson.build | 7 ------- + src/pipewire/meson.build | 10 ++-------- + 3 files changed, 3 insertions(+), 16 deletions(-) + +diff --git a/meson.build b/meson.build +index 4a572bd42..4af179c87 100644 +--- a/meson.build ++++ b/meson.build +@@ -1,7 +1,7 @@ + project('pipewire', ['c' ], + version : '0.3.40', + license : [ 'MIT', 'LGPL-2.1-or-later', 'GPL-2.0-only' ], +- meson_version : '>= 0.54.0', ++ meson_version : '>= 0.49.0', + default_options : [ 'warning_level=3', + 'c_std=gnu99', + 'b_pie=true', +diff --git a/spa/meson.build b/spa/meson.build +index 483536b54..74ee5a737 100644 +--- a/spa/meson.build ++++ b/spa/meson.build +@@ -63,12 +63,6 @@ if not get_option('examples').disabled() + subdir('examples') + endif + +-spa_dep = declare_dependency( +- include_directories : [spa_inc], +- version : spaversion, +- variables : { 'plugindir' : meson.current_build_dir() / 'plugins' } +-) +- + pkgconfig.generate(filebase : 'lib@0@'.format(spa_name), + name : 'libspa', + subdirs : spa_name, +@@ -79,4 +73,3 @@ pkgconfig.generate(filebase : 'lib@0@'.format(spa_name), + uninstalled_variables : ['plugindir=${prefix}/spa/plugins'], + ) + +-meson.override_dependency('lib@0@'.format(spa_name), spa_dep) +diff --git a/src/pipewire/meson.build b/src/pipewire/meson.build +index f66ce8746..5cfaba3f9 100644 +--- a/src/pipewire/meson.build ++++ b/src/pipewire/meson.build +@@ -109,12 +109,8 @@ libpipewire = shared_library(pipewire_name, pipewire_sources, + ) + + pipewire_dep = declare_dependency(link_with : libpipewire, +- include_directories : [pipewire_inc, configinc], +- dependencies : [pthread_lib, atomic_dep, spa_dep], +- variables : { +- 'moduledir' : meson.current_build_dir() / '..' / 'modules', +- 'confdatadir' : meson.current_build_dir() / '..' / 'daemon', +- } ++ include_directories : [pipewire_inc, configinc, spa_inc], ++ dependencies : [pthread_lib, atomic_dep, ], + ) + + pkgconfig.generate(libpipewire, +@@ -132,6 +128,4 @@ pkgconfig.generate(libpipewire, + ], + ) + +-meson.override_dependency('lib@0@'.format(pipewire_name), pipewire_dep) +- + subdir('extensions') +-- +2.33.1 + diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-alsa-plugin-allow-specifying-a-media.role-on-the-vir.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-alsa-plugin-allow-specifying-a-media.role-on-the-vir.patch deleted file mode 100644 index c6cf373c2..000000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-alsa-plugin-allow-specifying-a-media.role-on-the-vir.patch +++ /dev/null @@ -1,124 +0,0 @@ -From ff019936a70262c176a4bd950bc80ab84d2a71b0 Mon Sep 17 00:00:00 2001 -From: George Kiagiadakis -Date: Tue, 22 Jun 2021 13:23:22 +0300 -Subject: [PATCH] alsa plugin: allow specifying a media.role on the virtual - device name - -So that we can do: - aplay -D pipewire:ROLE=Music music.wav - aplay -D pipewire:ROLE=Notification notice.wav - -Upstream-Status: Backport [from master/0.3.31] ---- - pipewire-alsa/alsa-plugins/pcm_pipewire.c | 14 +++++++++++++- - pipewire-alsa/conf/50-pipewire.conf | 11 ++++++++++- - 2 files changed, 23 insertions(+), 2 deletions(-) - -diff --git a/pipewire-alsa/alsa-plugins/pcm_pipewire.c b/pipewire-alsa/alsa-plugins/pcm_pipewire.c -index 86792d2c7..6ace1b689 100644 ---- a/pipewire-alsa/alsa-plugins/pcm_pipewire.c -+++ b/pipewire-alsa/alsa-plugins/pcm_pipewire.c -@@ -59,6 +59,7 @@ typedef struct { - - char *node_name; - char *target; -+ char *role; - - int fd; - int error; -@@ -509,6 +510,9 @@ static int snd_pcm_pipewire_prepare(snd_pcm_ioplug_t *io) - pw_properties_set(props, PW_KEY_MEDIA_CATEGORY, - io->stream == SND_PCM_STREAM_PLAYBACK ? - "Playback" : "Capture"); -+ if (pw->role != NULL && -+ pw_properties_get(props, PW_KEY_MEDIA_ROLE) == NULL) -+ pw_properties_setf(props, PW_KEY_MEDIA_ROLE, "%s", pw->role); - - pw->stream = pw_stream_new(pw->core, pw->node_name, props); - if (pw->stream == NULL) -@@ -958,6 +962,7 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name, - const char *server_name, - const char *playback_node, - const char *capture_node, -+ const char *role, - snd_pcm_stream_t stream, - int mode, - uint32_t flags, -@@ -1013,6 +1018,8 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name, - pw->target = capture_node ? strdup(capture_node) : NULL; - } - -+ pw->role = (role && *role) ? strdup(role) : NULL; -+ - pw->main_loop = pw_thread_loop_new("alsa-pipewire", NULL); - if (pw->main_loop == NULL) { - err = -errno; -@@ -1091,6 +1098,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(pipewire) - const char *server_name = NULL; - const char *playback_node = NULL; - const char *capture_node = NULL; -+ const char *role = NULL; - snd_pcm_format_t format = SND_PCM_FORMAT_UNKNOWN; - int rate = 0; - int channels = 0; -@@ -1125,6 +1133,10 @@ SND_PCM_PLUGIN_DEFINE_FUNC(pipewire) - snd_config_get_string(n, &capture_node); - continue; - } -+ if (spa_streq(id, "role")) { -+ snd_config_get_string(n, &role); -+ continue; -+ } - if (spa_streq(id, "exclusive")) { - if (snd_config_get_bool(n)) - flags |= PW_STREAM_FLAG_EXCLUSIVE; -@@ -1174,7 +1186,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(pipewire) - } - - err = snd_pcm_pipewire_open(pcmp, name, node_name, server_name, playback_node, -- capture_node, stream, mode, flags, rate, format, -+ capture_node, role, stream, mode, flags, rate, format, - channels, period_bytes); - - return err; -diff --git a/pipewire-alsa/conf/50-pipewire.conf b/pipewire-alsa/conf/50-pipewire.conf -index 2c6f2d259..f7e58472b 100644 ---- a/pipewire-alsa/conf/50-pipewire.conf -+++ b/pipewire-alsa/conf/50-pipewire.conf -@@ -3,9 +3,10 @@ - defaults.pipewire.server "pipewire-0" - defaults.pipewire.node "-1" - defaults.pipewire.exclusive false -+defaults.pipewire.role "" - - pcm.pipewire { -- @args [ SERVER NODE EXCLUSIVE ] -+ @args [ SERVER NODE EXCLUSIVE ROLE ] - @args.SERVER { - type string - default { -@@ -27,6 +28,13 @@ pcm.pipewire { - name defaults.pipewire.exclusive - } - } -+ @args.ROLE { -+ type string -+ default { -+ @func refer -+ name defaults.pipewire.role -+ } -+ } - - - type pipewire -@@ -34,6 +42,7 @@ pcm.pipewire { - playback_node $NODE - capture_node $NODE - exclusive $EXCLUSIVE -+ role $ROLE - hint { - show on - description "PipeWire Sound Server" --- -2.30.2 - diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-null-sink-make-the-timerfd-non-blocking.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-null-sink-make-the-timerfd-non-blocking.patch deleted file mode 100644 index 71e526f86..000000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-null-sink-make-the-timerfd-non-blocking.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c633004bf310998580ff8944c59d94689d6fca87 Mon Sep 17 00:00:00 2001 -From: George Kiagiadakis -Date: Thu, 1 Jul 2021 11:37:01 +0300 -Subject: [PATCH] null-sink: make the timerfd non-blocking - -Fixes #1377 - -Upstream-Status: Backport [from master/0.3.32] -Signed-off-by: George Kiagiadakis ---- - spa/plugins/support/null-audio-sink.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/spa/plugins/support/null-audio-sink.c b/spa/plugins/support/null-audio-sink.c -index e9588f1e2..12e671db8 100644 ---- a/spa/plugins/support/null-audio-sink.c -+++ b/spa/plugins/support/null-audio-sink.c -@@ -221,8 +221,11 @@ static void on_timeout(struct spa_source *source) - spa_log_trace(this->log, "timeout"); - - if (spa_system_timerfd_read(this->data_system, -- this->timer_source.fd, &expirations) < 0) -+ this->timer_source.fd, &expirations) < 0) { -+ if (errno == EAGAIN) -+ return; - perror("read timerfd"); -+ } - - nsec = this->next_time; - -@@ -818,7 +821,8 @@ impl_init(const struct spa_handle_factory *factory, - - this->timer_source.func = on_timeout; - this->timer_source.data = this; -- this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC, SPA_FD_CLOEXEC); -+ this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC, -+ SPA_FD_CLOEXEC | SPA_FD_NONBLOCK); - this->timer_source.mask = SPA_IO_IN; - this->timer_source.rmask = 0; - this->timerspec.it_value.tv_sec = 0; --- -2.30.2 - diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-node-driver-make-the-timerfd-non-blocking.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-node-driver-make-the-timerfd-non-blocking.patch deleted file mode 100644 index 5a59d8676..000000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-node-driver-make-the-timerfd-non-blocking.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 5aa9c953909b936ba215ebca77461a17160f59fb Mon Sep 17 00:00:00 2001 -From: George Kiagiadakis -Date: Thu, 1 Jul 2021 11:50:40 +0300 -Subject: [PATCH] node-driver: make the timerfd non-blocking - -Relates to #1377 - -Upstream-Status: Backport [from master/0.3.32] -Signed-off-by: George Kiagiadakis ---- - spa/plugins/support/node-driver.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/spa/plugins/support/node-driver.c b/spa/plugins/support/node-driver.c -index 34533d0d9..32964110d 100644 ---- a/spa/plugins/support/node-driver.c -+++ b/spa/plugins/support/node-driver.c -@@ -119,8 +119,11 @@ static void on_timeout(struct spa_source *source) - spa_log_trace(this->log, "timeout"); - - if (spa_system_timerfd_read(this->data_system, -- this->timer_source.fd, &expirations) < 0) -+ this->timer_source.fd, &expirations) < 0) { -+ if (errno == EAGAIN) -+ return; - perror("read timerfd"); -+ } - - nsec = this->next_time; - -@@ -349,7 +352,8 @@ impl_init(const struct spa_handle_factory *factory, - - this->timer_source.func = on_timeout; - this->timer_source.data = this; -- this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC, SPA_FD_CLOEXEC); -+ this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC, -+ SPA_FD_CLOEXEC | SPA_FD_NONBLOCK); - this->timer_source.mask = SPA_IO_IN; - this->timer_source.rmask = 0; - this->timerspec.it_value.tv_sec = 0; --- -2.30.2 - diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb deleted file mode 100644 index 08f0eba35..000000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb +++ /dev/null @@ -1,312 +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" - -SRCREV = "e857856be7b64d562cdcc01c43933218a68b225e" -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. -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 \ -" - -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" - -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}-media-session \ - ${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 \ - ${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/* \ -" - -# 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.* \ -" - -# Example session manager. Not intended for use in production. -CONFFILES:${PN}-media-session = "${datadir}/pipewire/media-session.d/*" -SYSTEMD_SERVICE:${PN}-media-session = "pipewire-media-session.service" -FILES:${PN}-media-session = " \ - ${bindir}/pipewire-media-session \ - ${datadir}/pipewire/media-session.d/* \ - ${systemd_system_unitdir}/pipewire-media-session.service \ -" -RPROVIDES:${PN}-media-session = "virtual/pipewire-sessionmanager" - -# Dynamic packages (see set_dynamic_metapkg_rdepends). -FILES:${PN}-spa-plugins = "" -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.30.bbappend b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bbappend deleted file mode 100644 index 53e4bb4b3..000000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bbappend +++ /dev/null @@ -1,27 +0,0 @@ -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 \ -" - -SRC_URI += "\ - file://0001-alsa-plugin-allow-specifying-a-media.role-on-the-vir.patch \ - file://0001-null-sink-make-the-timerfd-non-blocking.patch \ - file://0002-node-driver-make-the-timerfd-non-blocking.patch \ -" - -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 - mkdir -p ${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.40.bb b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bb new file mode 100644 index 000000000..edab8db4c --- /dev/null +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bb @@ -0,0 +1,316 @@ +# 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.40 +SRCREV = "7afd80052b7c49754a13c9ab49c368f95b60e0a7" +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 \ + ${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.40.bbappend b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bbappend new file mode 100644 index 000000000..dfe73083b --- /dev/null +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bbappend @@ -0,0 +1,25 @@ +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 \ +" + +SRC_URI += "\ + file://0001-Revert-meson-declare-spa_dep-and-override_dependency.patch \ +" + +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 + mkdir -p ${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/bluetooth.lua.d/30-bluez-monitor.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.lua.d/30-bluez-monitor.lua index 36fe749bb..530f4cc62 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.lua.d/30-bluez-monitor.lua +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.lua.d/30-bluez-monitor.lua @@ -3,13 +3,15 @@ bluez_monitor = {} bluez_monitor.properties = { - -- Enable mSBC support, disabled by default. Be aware that - -- mSBC is not expected to work on all headset + adapter combinations. - -- This can be overloaded for a specific device and native backend - -- in rules section. - --["bluez5.msbc-support"] = false, + -- These features do not work on all headsets, so they are enabled + -- by default based on the hardware database. They can also be + -- forced on/off for all devices by the following options: - --["bluez5.sbc-xq-support"] = true, + --["bluez5.enable-sbc-xq"] = true, + --["bluez5.enable-msbc"] = true, + --["bluez5.enable-hw-volume"] = true, + + -- See bluez-hardware.conf for the hardware database. -- Enabled headset roles (default: [ hsp_hs hfp_ag ]), this -- property only applies to native backend. Currently some headsets @@ -23,7 +25,11 @@ bluez_monitor.properties = { ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]", -- Enabled A2DP codecs (default: all). - --["bluez5.codecs"] = "[ sbc aac ldac aptx aptx_hd ]", + --["bluez5.codecs"] = "[ sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex faststream faststream_duplex ]", + + -- HFP/HSP backend (default: native). + -- Available values: any, none, hsphfpd, ofono, native + ["bluez5.hfphsp-backend"] = "ofono", -- Properties for the A2DP codec configuration --["bluez5.default.rate"] = 48000, @@ -50,9 +56,6 @@ bluez_monitor.rules = { --["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink hfp_ag hsp_ag a2dp_source ]", ["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink ]", - -- Overload mSBC support for native backend and a specific device. - --["bluez5.msbc-support"] = false, - -- Hardware volume control (default: [ hfp_ag hsp_ag a2dp_source ]) --["bluez5.hw-volume"] = "[ hfp_hf hsp_hs a2dp_sink hfp_ag hsp_ag a2dp_source ]", diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua index f70f38b1f..82f5bb055 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua @@ -43,6 +43,11 @@ policy_config.policy = { ["move"] = false, -- moves session items when metadata target.node changes ["follow"] = true, -- moves session items to the default device when it has changed + -- Set to 'true' to disable channel splitting & merging on nodes and enable + -- passthrough of audio in the same format as the format of the device. + -- Note that this breaks JACK support; it is generally not recommended + ["audio.no-dsp"] = false, + -- how much to lower the volume of lower priority streams when ducking -- note that this is a linear volume modifier (not cubic as in pulseaudio) ["duck.level"] = 0.2, @@ -108,8 +113,8 @@ load_module("mixer-api") -- Create endpoints statically at startup load_script("static-endpoints.lua", policy_config.endpoints) --- Create items for nodes that appear in the graph -load_script("create-item.lua") + -- Create session items for nodes that appear in the graph + load_script("create-item.lua", default_policy.policy) -- Link nodes to each other to make media flow in the graph load_script("policy-node.lua", policy_config.policy) diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch new file mode 100644 index 000000000..37b43571d --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch @@ -0,0 +1,63 @@ +From 1d39b68d88e967739d6beb3c9be7f4644b5d4077 Mon Sep 17 00:00:00 2001 +From: Ashok Sidipotu +Date: Thu, 2 Dec 2021 16:23:09 +0530 +Subject: [PATCH] Revert "wp-uninstalled: build this script with the meson dirs + filled in" + +This reverts commit 52aaf96179584292f493c4b329bc2c409e6d3dee. +--- + meson.build | 18 ------------------ + wp-uninstalled.sh | 11 ++--------- + 2 files changed, 2 insertions(+), 27 deletions(-) + +diff --git a/meson.build b/meson.build +index 1affbc1..f2ca16c 100644 +--- a/meson.build ++++ b/meson.build +@@ -120,21 +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@'], +-) +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.33.1 + diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-tests-add-pipewire-env-variables-when-running.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-tests-add-pipewire-env-variables-when-running.patch new file mode 100644 index 000000000..07ddb746b --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0002-Revert-tests-add-pipewire-env-variables-when-running.patch @@ -0,0 +1,136 @@ +From 4ea8ddc256df636208479a5b64bf8bdc6e413aca Mon Sep 17 00:00:00 2001 +From: Ashok Sidipotu +Date: Thu, 2 Dec 2021 16:57:54 +0530 +Subject: [PATCH] Revert "tests: add pipewire env variables when running tests, + tidy up common_env" + +This reverts commit c24db9f3539f9b7ebe9e74c991cc3037f28ea22c. +--- + 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 adc9cef..e75640c 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 128cc30..cd45c1c 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,10 +25,12 @@ test( + script_tester, + args: ['pod.lua'], + env: common_env, ++ workdir : meson.current_source_dir(), + ) + test( + 'test-lua-monitor-rules', + script_tester, + args: ['monitor-rules.lua'], + env: common_env, ++ workdir : meson.current_source_dir(), + ) +-- +2.33.1 + diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb index 6f21b258c..7df199e01 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb @@ -14,9 +14,16 @@ DEPENDS = "glib-2.0 glib-2.0-native pipewire lua" SRC_URI = "\ git://gitlab.freedesktop.org/pipewire/wireplumber.git;protocol=https;branch=master \ " -SRCREV = "4af7e2bd68c4862bb707b62edf7557df56dad10f" +# v0.4.5 +SRCREV = "3946457a7942a179c0f61c60de8cb8fc643391dd" -PV = "0.4.0" +# patches to be able to compile with lower version of meson that is available in AGL. +SRC_URI += "\ + file://0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch \ + file://0002-Revert-tests-add-pipewire-env-variables-when-running.patch \ +" + +PV = "0.4.5" S = "${WORKDIR}/git" WPAPI="0.4" @@ -38,7 +45,7 @@ PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=true -Dsyst do_configure:prepend() { # relax meson version requirement # we only need 0.54 when building with -Dsystem-lua=false - sed "s/meson_version : '>= 0.54.0'/meson_version : '>= 0.51.0'/" ${S}/meson.build > ${S}/tmp.build + sed "s/meson_version : '>= 0.56.0'/meson_version : '>= 0.53.2'/" ${S}/meson.build > ${S}/tmp.build mv -f ${S}/tmp.build ${S}/meson.build } -- cgit 1.2.3-korg