diff options
Diffstat (limited to 'meta-pipewire/recipes-multimedia/pipewire')
-rw-r--r-- | meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-Revert-meson-declare-spa_dep-and-override_dependency.patch | 80 | ||||
-rw-r--r-- | meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-alsa-plugin-allow-specifying-a-media.role-on-the-vir.patch | 124 | ||||
-rw-r--r-- | meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-null-sink-make-the-timerfd-non-blocking.patch | 43 | ||||
-rw-r--r-- | meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-node-driver-make-the-timerfd-non-blocking.patch | 43 | ||||
-rw-r--r-- | meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bb (renamed from meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb) | 32 | ||||
-rw-r--r-- | meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bbappend (renamed from meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bbappend) | 4 |
6 files changed, 99 insertions, 227 deletions
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 <ashok.sidipotu@collabora.com> +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 <george.kiagiadakis@collabora.com> -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 <george.kiagiadakis@collabora.com> -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 <george.kiagiadakis@collabora.com> ---- - 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 <george.kiagiadakis@collabora.com> -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 <george.kiagiadakis@collabora.com> ---- - 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.40.bb index 08f0eba35..edab8db4c 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bb @@ -20,7 +20,8 @@ SECTION = "multimedia" DEPENDS = "dbus" -SRCREV = "e857856be7b64d562cdcc01c43933218a68b225e" +# v0.3.40 +SRCREV = "7afd80052b7c49754a13c9ab49c368f95b60e0a7" SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https" S = "${WORKDIR}/git" @@ -52,6 +53,11 @@ USERADD_PARAM:${PN} = "--system --home / --no-create-home \ # 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 \ @@ -63,6 +69,7 @@ EXTRA_OEMESON += " \ -Dvulkan=disabled \ -Dlibcamera=disabled \ -Dman=disabled \ + -Dsession-managers=[] \ " PACKAGECONFIG ??= "\ @@ -88,6 +95,7 @@ PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=enabled ,-D 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 " @@ -206,7 +214,7 @@ PACKAGES =+ "\ ${PN}-pulse \ ${PN}-alsa \ ${PN}-jack \ - ${PN}-media-session \ + ${PN}-v4l2 \ ${PN}-spa-plugins \ ${PN}-spa-plugins-meta \ ${PN}-spa-tools \ @@ -268,25 +276,21 @@ FILES:${PN}-alsa = "\ ${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.* \ " - -# 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 = "" +FILES:${PN}-spa-plugins-bluez5 += " \ + ${datadir}/${SPA_SUBDIR}/bluez5/bluez-hardware.conf \ +" RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta" FILES:${PN}-spa-tools = " \ diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bbappend b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bbappend index 53e4bb4b3..dfe73083b 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bbappend +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.40.bbappend @@ -7,9 +7,7 @@ PACKAGECONFIG = "\ " 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 \ + file://0001-Revert-meson-declare-spa_dep-and-override_dependency.patch \ " do_install:append() { |