From 693e816360d5cb85a11d4eb84dae049e4aa52f0e Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Fri, 19 May 2023 22:33:54 -0400 Subject: [PATCH 1/3] New package: pipewire-session-manager-bootstrap-2023.05.19 This dummy package will be the default provider for the the session manager pulled in by pipewire, breaking a build cycle. --- etc/defaults.virtual | 1 + srcpkgs/pipewire-session-manager-bootstrap/template | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 srcpkgs/pipewire-session-manager-bootstrap/template diff --git a/etc/defaults.virtual b/etc/defaults.virtual index 083ab6349eac..f399b1299840 100644 --- a/etc/defaults.virtual +++ b/etc/defaults.virtual @@ -28,6 +28,7 @@ nodejs-runtime nodejs ntp-daemon chrony phonon-backend phonon-backend-gstreamer phonon-qt5-backend phonon-qt5-backend-gstreamer +pipewire-session-manager pipewire-session-manager-bootstrap rkt-stage1 rkt-stage1-coreos smtp-server opensmtpd tex texlive diff --git a/srcpkgs/pipewire-session-manager-bootstrap/template b/srcpkgs/pipewire-session-manager-bootstrap/template new file mode 100644 index 000000000000..32dfa636b07c --- /dev/null +++ b/srcpkgs/pipewire-session-manager-bootstrap/template @@ -0,0 +1,11 @@ +# Template file for 'pipewire-session-manager-bootstrap' +pkgname=pipewire-session-manager-bootstrap +version=2023.05.19 +revision=1 +build_style=meta +short_desc="Dummy pipewire-session-manager provider" +maintainer="Andrew J. Hesford " +license="Public Domain" +homepage="https://voidlinux.org" +provides="pipewire-session-manager-${version}_${revision}" +repository=bootstrap From f593b5803700525928a7193472b7113ae4ae6251 Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Fri, 19 May 2023 22:35:25 -0400 Subject: [PATCH 2/3] wireplumber: provide virtual pipewire-session-manager --- srcpkgs/wireplumber/template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srcpkgs/wireplumber/template b/srcpkgs/wireplumber/template index 23b011e8d203..736e81629137 100644 --- a/srcpkgs/wireplumber/template +++ b/srcpkgs/wireplumber/template @@ -1,7 +1,7 @@ # Template file for 'wireplumber' pkgname=wireplumber version=0.4.14 -revision=1 +revision=2 build_style=meson build_helper=gir configure_args="-Dintrospection=enabled -Dsystem-lua=true" @@ -15,6 +15,7 @@ homepage="https://pipewire.pages.freedesktop.org/wireplumber" changelog="https://gitlab.freedesktop.org/pipewire/wireplumber/-/raw/master/NEWS.rst" distfiles="https://gitlab.freedesktop.org/pipewire/wireplumber/-/archive/$version/wireplumber-$version.tar.gz" checksum=b160424ce7c3eeeccba388726f6a448f53501d25085e5fa1bf6c690c1bcd85ea +provides="pipewire-session-manager-2023.05.19_1" post_install() { vlicense LICENSE From 88f7458b8ff7562ae5d1ca78817739120bdab4fc Mon Sep 17 00:00:00 2001 From: cinerea0 Date: Fri, 19 May 2023 22:38:03 -0400 Subject: [PATCH 3/3] pipewire: update to 0.3.71, drop pipewire-media-session Now depends on virtual session manager --- srcpkgs/pipewire/INSTALL.msg | 6 +-- .../patches/autostart-media-session.patch | 17 ------- .../patches/jack-fix-notify-skip.patch | 50 +++++++++++++++++++ srcpkgs/pipewire/template | 27 +++------- 4 files changed, 60 insertions(+), 40 deletions(-) delete mode 100644 srcpkgs/pipewire/patches/autostart-media-session.patch create mode 100644 srcpkgs/pipewire/patches/jack-fix-notify-skip.patch diff --git a/srcpkgs/pipewire/INSTALL.msg b/srcpkgs/pipewire/INSTALL.msg index 9a3d2db6e1f1..3c3a9b13ef4f 100644 --- a/srcpkgs/pipewire/INSTALL.msg +++ b/srcpkgs/pipewire/INSTALL.msg @@ -1,4 +1,2 @@ -The pipewire-media-session session manager has been abandoned upstream and will -be removed from Void in a subsequent pipewire update. All users are encouraged -to transition to wireplumber as soon as possible to avoid unexpected loss of -functionality in the future. +The pipewire-media-session session manager has been removed from Void. +All users must transition to wireplumber to avoid loss of functionality. diff --git a/srcpkgs/pipewire/patches/autostart-media-session.patch b/srcpkgs/pipewire/patches/autostart-media-session.patch deleted file mode 100644 index c5753a3719c2..000000000000 --- a/srcpkgs/pipewire/patches/autostart-media-session.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream's config does not autostart pipewire-media-session anymore, which -is an essential component. It's not easy to start it externally in a script -since it needs the pipewire socket up, and Void doesn't have a mechanism to -ensure it (systemd socket activation). -diff --git a/src/daemon/pipewire.conf.in.orig b/src/daemon/pipewire.conf.in -index 95632c2..ab0b097 100644 ---- a/src/daemon/pipewire.conf.in.orig -+++ b/src/daemon/pipewire.conf.in -@@ -236,7 +236,7 @@ - # but it is better to start it as a systemd service. - # Run the session manager with -h for options. - # -- @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" } -+ { path = "@session_manager_path@" args = "@session_manager_args@" } - # - # You can optionally start the pulseaudio-server here as well - # but it is better to start it as a systemd service. diff --git a/srcpkgs/pipewire/patches/jack-fix-notify-skip.patch b/srcpkgs/pipewire/patches/jack-fix-notify-skip.patch new file mode 100644 index 000000000000..fed37727a636 --- /dev/null +++ b/srcpkgs/pipewire/patches/jack-fix-notify-skip.patch @@ -0,0 +1,50 @@ +From ce71b37b58d5e251ae7acda0799f696688df11c2 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Thu, 18 May 2023 09:59:26 +0200 +Subject: [PATCH] jack: update bufsize and samplerate when skipping notify + +When we skip the notify because we are not active or we don't have a +callback, still update the buffer_size and sample_rate fields or else +we will keep on trying forever. + +Fixes #3226 +--- + pipewire-jack/src/pipewire-jack.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c +index 0c8363ea3..20feb2462 100644 +--- a/pipewire-jack/src/pipewire-jack.c ++++ b/pipewire-jack/src/pipewire-jack.c +@@ -1027,8 +1027,6 @@ static int queue_notify(struct client *c, int type, struct object *o, int arg1, + struct notify *notify; + bool emit = false;; + +- if ((type & NOTIFY_ACTIVE_FLAG) && !c->active) +- return 0; + switch (type) { + case NOTIFY_TYPE_REGISTRATION: + emit = c->registration_callback != NULL && o != NULL; +@@ -1060,8 +1058,18 @@ static int queue_notify(struct client *c, int type, struct object *o, int arg1, + default: + break; + } ++ if ((type & NOTIFY_ACTIVE_FLAG) && !c->active) ++ emit = false; + if (!emit) { +- pw_log_debug("%p: skip notify %d", c, type); ++ switch (type) { ++ case NOTIFY_TYPE_BUFFER_FRAMES: ++ c->buffer_frames = arg1; ++ break; ++ case NOTIFY_TYPE_SAMPLE_RATE: ++ c->sample_rate = arg1; ++ break; ++ } ++ pw_log_debug("%p: skip notify %08x active:%d", c, type, c->active); + if (o != NULL && arg1 == 0 && o->removing) { + o->removing = false; + free_object(c, o); +-- +GitLab + diff --git a/srcpkgs/pipewire/template b/srcpkgs/pipewire/template index f2d161227deb..92feaab2a6d7 100644 --- a/srcpkgs/pipewire/template +++ b/srcpkgs/pipewire/template @@ -1,9 +1,7 @@ # Template file for 'pipewire' pkgname=pipewire -version=0.3.68 +version=0.3.71 revision=1 -_pms_version=0.4.2 -build_wrksrc="${pkgname}-${version}" build_style=meson configure_args=" --auto-features=enabled @@ -15,9 +13,8 @@ configure_args=" -Dsystemd=disabled -Dudevrulesdir=/usr/lib/udev/rules.d -Dvulkan=enabled - -Dmedia-session:systemd=disabled -Dbluez5-codec-lc3plus=disabled - -Dsession-managers=media-session + -Dsession-managers=[] -Drlimits-match=@_pipewire " hostmakedepends="doxygen graphviz pkg-config python3-docutils gettext glib-devel" @@ -26,23 +23,20 @@ makedepends="$(vopt_if sdl2 SDL2-devel) gst-plugins-base1-devel jack-devel libfreeaptx-devel libusb-devel fdk-aac-devel libsndfile-devel Vulkan-Headers vulkan-loader pulseaudio-devel avahi-libs-devel webrtc-audio-processing-devel readline-devel openssl-devel lilv-devel libcanberra-devel dbus-devel - libmysofa-devel" + libmysofa-devel opus-devel" depends="libspa-alsa>=${version}_${revision} libspa-audioconvert>=${version}_${revision} libspa-audiomixer>=${version}_${revision} libspa-control>=${version}_${revision} - libspa-v4l2>=${version}_${revision} pulseaudio-utils" + libspa-v4l2>=${version}_${revision} pulseaudio-utils virtual?pipewire-session-manager" checkdepends="pulseaudio-utils" short_desc="Server and user space API to deal with multimedia pipelines" maintainer="Stefano Ragni " license="MIT" homepage="https://pipewire.org/" changelog="https://gitlab.freedesktop.org/pipewire/pipewire/-/raw/master/NEWS" -distfiles="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${version}/pipewire-${version}.tar.gz - https://gitlab.freedesktop.org/pipewire/media-session/-/archive/${_pms_version}/media-session-${_pms_version}.tar.gz" -checksum="fdcf7f2ee881cdc91ef54b3a558e431bdb3395f7a1e9044753c7a89346fafd91 - 4cf8577d4431e08b0e6f29c1ad6bf8662765ab66986ea6f0151883101811c119" +distfiles="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${version}/pipewire-${version}.tar.gz" +checksum=070dcf83c514903d603351921c7829014c8d9162c49ae5a043290c920f6a6363 make_dirs="/var/lib/pipewire 0755 _pipewire _pipewire" system_accounts="_pipewire" -patch_args="-Np1 --directory=${build_wrksrc}" build_options="sdl2" @@ -59,18 +53,13 @@ else configure_args+=" -Dbluez5-codec-ldac=disabled" fi -post_extract() { - mv media-session-${_pms_version} ${build_wrksrc}/subprojects/media-session -} - post_install() { vlicense LICENSE vdoc "${FILESDIR}/README.voidlinux" vsv pipewire vsv pipewire-pulse - vmkdir usr/share/applications - cp "${FILESDIR}/pipewire.desktop" ${DESTDIR}/usr/share/applications/pipewire.desktop - cp "${FILESDIR}/pipewire-pulse.desktop" ${DESTDIR}/usr/share/applications/pipewire-pulse.desktop + vinstall "${FILESDIR}/pipewire.desktop" 644 usr/share/applications + vinstall "${FILESDIR}/pipewire-pulse.desktop" 644 usr/share/applications } libpipewire_package() {