diff --git a/_service b/_service index be6e348..7ccbd39 100644 --- a/_service +++ b/_service @@ -3,7 +3,7 @@ git https://gitlab.freedesktop.org/pipewire/pipewire.git - 0.3.15 + 0.3.20 @PARENT_TAG@+@TAG_OFFSET@ (.*)\+0 \1 diff --git a/baselibs.conf b/baselibs.conf index 98c661c..b88c179 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,6 +1,4 @@ libpipewire-0_3-0 -pipewire-libpulse-0_3 - requires "libpipewire-0_3-0- = " pipewire-libjack-0_3 requires "libpipewire-0_3-0- = " pipewire-modules diff --git a/do-not-install-alsa-config-files.patch b/do-not-install-alsa-config-files.patch deleted file mode 100644 index 45a7ad1..0000000 --- a/do-not-install-alsa-config-files.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: pipewire-0.3.8/spa/plugins/alsa/meson.build -=================================================================== ---- pipewire-0.3.8.orig/spa/plugins/alsa/meson.build -+++ pipewire-0.3.8/spa/plugins/alsa/meson.build -@@ -1,5 +1,5 @@ - subdir('acp') --subdir('mixer') -+#subdir('mixer') - - spa_alsa_sources = ['alsa.c', - 'alsa-udev.c', -@@ -26,8 +26,8 @@ alsa_udevrules = [ - install : true, - ) - --if libudev_dep.found() -- install_data(alsa_udevrules, -- install_dir : udevrulesdir, -- ) --endif -+#if libudev_dep.found() -+# install_data(alsa_udevrules, -+# install_dir : udevrulesdir, -+# ) -+#endif diff --git a/do-not-use-snd_pcm_ioplug_hw_avail.patch b/do-not-use-snd_pcm_ioplug_hw_avail.patch deleted file mode 100644 index 4fc0128..0000000 --- a/do-not-use-snd_pcm_ioplug_hw_avail.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: Antonio Larrosa -Subject: Fix build with old alsa-devel - -Revert part of https://github.com/PipeWire/pipewire/commit/c658574c0119d3a1f199fe17091fc4d5f37f1e71 -since the alsa version in SLE/Leap doesn't have a snd_pcm_ioplug_hw_avail function. - -Index: pipewire-0.3.5/pipewire-alsa/alsa-plugins/pcm_pipewire.c -=================================================================== ---- pipewire-0.3.5.orig/pipewire-alsa/alsa-plugins/pcm_pipewire.c -+++ pipewire-0.3.5/pipewire-alsa/alsa-plugins/pcm_pipewire.c -@@ -192,7 +192,6 @@ snd_pcm_pipewire_process_playback(snd_pc - index = 0; - avail = maxsize - filled; - avail = SPA_MIN(avail, pw->min_avail * bpf); -- avail = SPA_MIN(avail, *hw_avail * bpf); - - do { - offset = index % maxsize; -@@ -236,7 +235,8 @@ snd_pcm_pipewire_process_playback(snd_pc - pw->hw_ptr -= pw->boundary; - xfer += frames; - } -- *hw_avail -= xfer; -+ -+ pcm_poll_unblock_check(io); /* unblock socket for polling if needed */ - - done: - index += nbytes; -@@ -271,7 +271,7 @@ snd_pcm_pipewire_process_record(snd_pcm_ - d = b->buffer->datas; - - maxsize = d[0].chunk->size; -- avail = SPA_MIN(maxsize, *hw_avail * bpf); -+ avail = maxsize; - index = d[0].chunk->offset; - - if (avail < maxsize) -@@ -309,7 +309,9 @@ snd_pcm_pipewire_process_record(snd_pcm_ - pw->hw_ptr -= pw->boundary; - xfer += frames; - } -- *hw_avail -= xfer; -+ -+ pcm_poll_unblock_check(io); /* unblock socket for polling if needed */ -+ - avail -= nbytes; - index += nbytes; - } while (avail > 0); -@@ -355,9 +357,6 @@ static void on_stream_process(void *data - snd_pcm_pipewire_t *pw = data; - snd_pcm_ioplug_t *io = &pw->io; - struct pw_buffer *b; -- snd_pcm_uframes_t hw_avail; -- -- hw_avail = snd_pcm_ioplug_hw_avail(io, pw->hw_ptr, io->appl_ptr); - - if (pw->drained) { - pcm_poll_unblock_check(io); /* unblock socket for polling if needed */ -@@ -369,13 +368,13 @@ static void on_stream_process(void *data - return; - - if (io->stream == SND_PCM_STREAM_PLAYBACK) -- snd_pcm_pipewire_process_playback(pw, b, &hw_avail); -+ snd_pcm_pipewire_process_playback(pw, b, 0L); - else -- snd_pcm_pipewire_process_record(pw, b, &hw_avail); -+ snd_pcm_pipewire_process_record(pw, b, 0L); - - pw_stream_queue_buffer(pw->stream, b); - -- if (io->state == SND_PCM_STATE_DRAINING && !pw->draining && hw_avail == 0) { -+ if (io->state == SND_PCM_STATE_DRAINING && !pw->draining == 0) { - pw_stream_flush(pw->stream, true); - pw->draining = true; - pw->drained = false; diff --git a/fix-memfd_create-call.patch b/fix-memfd_create-call.patch deleted file mode 100644 index 3a529fd..0000000 --- a/fix-memfd_create-call.patch +++ /dev/null @@ -1,59 +0,0 @@ -Index: pipewire-0.3.0/src/examples/video-src-alloc.c -=================================================================== ---- pipewire-0.3.0.orig/src/examples/video-src-alloc.c -+++ pipewire-0.3.0/src/examples/video-src-alloc.c -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - #include - -@@ -45,6 +46,46 @@ - - #define M_PI_M2 ( M_PI + M_PI ) - -+#if !defined(HAVE_MEMFD_CREATE) -+/* -+ * No glibc wrappers exist for memfd_create(2), so provide our own. -+ * -+ * Also define memfd fcntl sealing macros. While they are already -+ * defined in the kernel header file , that file as -+ * a whole conflicts with the original glibc header . -+ */ -+ -+static inline int memfd_create(const char *name, unsigned int flags) -+{ -+ return syscall(SYS_memfd_create, name, flags); -+} -+#endif -+ -+#ifndef MFD_CLOEXEC -+#define MFD_CLOEXEC 0x0001U -+#endif -+ -+#ifndef MFD_ALLOW_SEALING -+#define MFD_ALLOW_SEALING 0x0002U -+#endif -+ -+/* fcntl() seals-related flags */ -+ -+#ifndef F_LINUX_SPECIFIC_BASE -+#define F_LINUX_SPECIFIC_BASE 1024 -+#endif -+ -+#ifndef F_ADD_SEALS -+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) -+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) -+ -+#define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ -+#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ -+#define F_SEAL_GROW 0x0004 /* prevent file from growing */ -+#define F_SEAL_WRITE 0x0008 /* prevent writes */ -+#endif -+ -+ - struct data { - struct pw_thread_loop *loop; - struct spa_source *timer; diff --git a/pipewire-0.3.15.obscpio b/pipewire-0.3.15.obscpio deleted file mode 100644 index 31765ed..0000000 --- a/pipewire-0.3.15.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8057aad48c198f474bd9799f9969c7521f0b96483c9e109d401d751f4d0189e1 -size 7047181 diff --git a/pipewire-0.3.20.obscpio b/pipewire-0.3.20.obscpio new file mode 100644 index 0000000..180a86f --- /dev/null +++ b/pipewire-0.3.20.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc6e4197025d559aea9a4d77fcacdde8defa9814561aba81a632c950cd28f269 +size 6974477 diff --git a/pipewire.changes b/pipewire.changes index 90e5ac8..f14374b 100644 --- a/pipewire.changes +++ b/pipewire.changes @@ -1,3 +1,281 @@ +------------------------------------------------------------------- +Thu Jan 21 12:12:43 UTC 2021 - Bjørn Lie + +- Add pkgconfig(ldacBT-abr) and pkgconfig(ldacBT-enc) + BuildRequires: Build bluetooth ldac codec support. + +------------------------------------------------------------------- +Wed Jan 20 15:50:31 UTC 2021 - Antonio Larrosa + +- Update to version 0.3.20: + * Highlights + + Latency was reduced in ALSA and PulseAudio and time + reporting has improved a lot. + + Bluetooth now has a native HFP backed, SBC XQ and + mSBC support. + + Many bugfixes and improvements, improved device + support. + * PipeWire improvements + + pw-dump can now dump all objects such as Endpoints + + pw-dump has a -m option to monitor changes + + pw-dump can now dump metadata + + pw-stream can now use the rate-match io to exactly + produce the required number of samples for the + current cycle. When using this feature, a stream can + achieve the same low-latency as pw-filter. + + spa-acp-tool can now load a custom profile-set and + correctly parses the volume updates + + There is now a nofail option when loading modules + + The connection has been made reentrant to fix some + strange random problems with metadata. + + Turn some errors into warnings or simply info. + + Executables are now built with PIE + + S24OE formats should work now (MAudio FastTrack Pro) + + Remove mlock warnings. Add support for mlockall with + a config option. + * Session-manager + + There are now config files for bluez and v4l2 modules + + Improve ALSA device and node properties + + Bluetooth devices have better properties now. + + The default device routing has been improved. + * Device support + + Port priorities are updated for UCM devices + + ACP devices notify change in routes in all cases + + There is now RW support in ALSA devices to increase + compatibility. + + Many improvements to Bluetooth. SBC XQ support can now + be enabled with a config option. mSBC can be enabled + with an option. + + Bluetooth devices not expose Routes so that they look + more like how PulseAudio handles them + + Gracefully handle missing profile-sets + + There is now a native HFP backend + + Improve card names in some cases. + + pause-on-idle is now disabled for ALSA devices. This can + reduce pops and clicks when the device is stopped. + * ALSA plugin + + Use rate-match to reduce the latency + + Implement a _delay() function to get smoother timestamps. + + Fix property parsing. Fixes volume changes in alsamixer. + * PulseAudio server + + Use rate-match to reduce the latency. This also reduces + the buffering in audioconvert and improves timestamp + reporting. + + Implement rate changes now that we have rate-match + support. + + pactl stats will now work + + Fix excessive memory usage when a capture client doesn't + read fast enough. + +------------------------------------------------------------------- +Wed Jan 13 09:07:19 UTC 2021 - Frederic Crozat + +- Update to version 0.3.19: + * Highlights + - Startup after login should be fixed now with inotify + used to wait for permissions. + - Channels should be mapped correctly now. + - Many bluetooth improvements in LDAC, AptX-HD. AAC was + also added. Headsets should work better now. + - pipewire-libpulse was removed. It is now completely + replaced by pipewire-pulse. + - Fix a crasher bug in pipewire-pulse and some memory leaks. + - Fix a bug with feedback loop that would cause 100% CPU. + - A new pw-top tool to display real-time graph performance. + - The example session manager now has config files. + - The config file format was changed to use the SPA JSON + tokenizer. This makes it more flexible and extensible. + * PipeWire improvements + - Fix debug of id in format channels + - Audioconvert should now remap channels correctly in all + cases. + - Feedback loops were not scheduled correctly and would + cause 100% CPU usage. + - Small improvements to the profiler to also log incomplete + graph status. + - a new tool pw-top was added that prints real-time performance + stats of the graph. + - the rtkit module now sets the nice level to -11 + * Session-manager + - The session manager would sometimes link dont-reconnect + nodes to another node, which would leak monitor streams in + pipewire-pulse. + - The session manager now has configuration files. Config files + can also be placed in the user home directory to make custom + configurations. + - The session managers now creates unique device and node + names for alsa and v4l2 devices. + * Device support + - Many improvements in Bluetooth codecs, LDAC stuttering, + AptX-HD negotiation, LDAC ABR support + - Bluetooth supports AAC audio now. + - Many fixes to Bluetooth SCO transport used in headsets. + - inotify support in device monitors + - ACP was synced with the latest pulseaudio code + - Fix a bug in enumeration of device ports. + - PulseAudio server + - seek flags and offset are now supported, making gstreamer + pulse elements work better. + - Fix a crasher bug in pipewire-pulse, we sometimes would + write too much to the ringbuffer + - Fix some memory leaks in error cases. + - Fix handling of NULL string to locate default sink/source + * JACK layer + - Ports can also be found with the aliases now, making + qjackctl work in more cases. +- Changes from PipeWire 0.3.18: + * Highlights + - More work in the PulseAudio server. It should be compatible + with more applications. + - Bluetooth now support extra codecs such as AptX/HD and LDAC. + - Support for virtual sources and sink was improved a lot. + - Added a new pw-dump tool to dump the objects in JSON formats + and for filtering them with tools like jq. + - Many more stability fixes and improvements. + * PipeWire improvements + - Silence some harmless warnings + - pw-cli can now be used to set parameters. + - Streams now perform the correct channel mapping when linked + to non-standard multichannel devices. Previously channels + would get swapped. + - port, node and device params are now cached in the server. + This avoids opening and closing devices whenever some client + enumerates formats, which improves performance a lot, + especially in cases where opening a device is slow. + - Add a command to keep a device open during negotiation. This + is used to enumerate and set a format while opening the + device just once, improving performance. + - The null-sink scheduling was fixed. + - A memory corruption bug was fixed in format conversion, this + could cause crashes, silent channels or other undefined + behaviour. + - There is now a simple JSON parser. + * Session-manager + - Settings files are now stored in JSON. With the json parser + this is easier to parse and extend + * Device support + - Bluetooth now supports additional codecs: LDAC, AptX and + AptX HD. LDAC is known to not work very well yet. + - ALSA devices will now default to the max supported channels + if nothing else is specified. This makes it possible to use + 8+ channel cards with the alsa-pcm module, which is not + supported with the default alsa-acp module. + - Enable mSBC support in oFono. + - Add an option to disable hardware mixers + - ALSA now improves support for batch devices. + - The udev rules had references to Pulseaudio removed in order + to not create conflicts. + - Fix a potential crash in bluetooth devices when + disconnecting. + - UCM cards now use HW volume when possible. + * PulseAudio server + - The id can now be used as the name to locate cards and + devices + - Report streams with planar formats as well + - Better error reporting when stream create fails + - module-null-sink can now handle channels, rate and + channel_map properties + - Add support for 3 types of virtual devices: source, + sink and duplex. + - set-port was fixed + - Some buffer parameters were tweaked to improve + performance, compatibility and stuttering with lower + latency. + - NULL can be used as a name for the device sink/source + - Support lookup of monitor names + - Set properties more like pulseaudio so that some + clients (Teamspeak) don't crash anymore +- Changes from PipeWire 0.3.17: + * Highlights + - Fix crasher bug for kwin when screensharing stopped. + - Massive improvements and compatibility fixes in the + PulseAudio server. + - The session manager now has a config directory in + /etc/pipewire/media-session.d/ It will look for files there + to activate session manager modules. Packagers can use + this to only activate the audio modules when the PulseAudio + server, libjack.so or the alsa modules are installed. + * PipeWire improvements + - We now clear hooks before adding them. Some application + did not clear them and had random data for the destroy + callback. + - Return -ENOENT from unknown resources so apps can handle + this better. It's a common problem when an app tries to + introspect and object but it disappeared before the message + reached the server. Apps should ignore this. + - channelmap information is now passed with the volume + settings. + - DMABuf is not mmapp()ed anymore with the FLAG_MAP_BUFFERS in + the stream or filter. This is because DMABuf usually + requires more that just a simple mmap and is better left + for the application. + - increase the maximum number of ports for a client-node. + - adapter and node-factory now support the linger option to + keep the objects alive after the creating client disconnected. + * Device support + - ALSA now handles error in close(), like when unplugging a + USB device. + * Session-manager + - The session manager is now handling DONT_RECONNECT streams + without a target node. They get connected to a default node + once and then fail to reconnect. + - The session manager now exposes the stream setting as + metadata. This makes it possible for other components, such + as pulse-server to use this information. Information is stored + as a json object for easier consumption. + - The session manager now has a config directory in + /etc/pipewire/media-session.d/ packagers can use this + * PulseAudio server + - Pulse server now acquire the dbus name. + - Improvements in timing and compatibility with many apps. + - The stream-restore extension is now implemented so that + the event volume can be configured. + - Many stability fixes and improvements. + - Fix some issues with module-load/unload +- Changes from PipeWire 0.3.16: + * Highlights + - Fix screensharing for old 0.2 clients + - Many pulse-server improvements. There is now a + pipewire-pulse binary that is the prefered solution for + PulseAudio compatibility. The replacement libpulse + libraries are now deprecated. This also makes audio in + Flatpak work. + * PipeWire improvements + - Fix cleanup of listeners everywhere. Force remove of + listeners in _destroy to avoid crashes. + - Add support for a journald logger module. + - Various memory leak fixes + - Silence some warnings that spammed the logs. + - Fix flush in pw_stream. This fixes small glitches when + switching streams in music players. + - Various FreeBSD fixes and improvements. + - Fix some crashes when destroying objects. + * Device support + - Reload the ALSA configuration when creating a node so that + hotplugged devices work in all cases. + - Fix memory leaks in ACP library. This also fixes issues + where the mixer device was not closed. + - Bluetooth now has support for the mSBC codec for SCO + source and sink. + * pulse-server + - Many introspection and compatibility improvements. It should + now be as good or better than the replacement library. + - Implement sample cache to make notification events work. + * JACK layer + - handle errors when linking, fixes jack_connect hang when + the ports were already linked. +- Drop patches do-not-use-snd_pcm_ioplug_hw_avail.patch and + fix-memfd_create-call.patch, no longer needed on SLE/Leap which + have updated glibc / alsa. +- Drop do-not-install-alsa-config-files.patch, remove files at + install time instead. +- pw-pulse wrapper is gone, remove all mentions of it. +- Package pulseaudio replacement in a subpackage and drop + pipewire-libpulse-0_3 (pipewire will use pulseaudio libraries + directly). +- Create an alsa subpackage and move alsa pipewire plugin to this + subpackage. + ------------------------------------------------------------------- Thu Nov 5 10:37:18 UTC 2020 - Antonio Larrosa diff --git a/pipewire.obsinfo b/pipewire.obsinfo index 07246a6..3121c35 100644 --- a/pipewire.obsinfo +++ b/pipewire.obsinfo @@ -1,5 +1,5 @@ name: pipewire -version: 0.3.15 -mtime: 1604483020 -commit: 16872549e3a2433f49f27c1875dfd432377ca0be +version: 0.3.20 +mtime: 1611154455 +commit: aee694fb8260914b6dd6b12cb95e78dece204535 diff --git a/pipewire.spec b/pipewire.spec index 16b812a..ce1437c 100644 --- a/pipewire.spec +++ b/pipewire.spec @@ -1,7 +1,7 @@ # # spec file for package pipewire # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # Copyright (c) 2018 Luciano Santos, luc14n0@linuxmail.org. # # All modifications and additions to the file contributed by third parties @@ -19,7 +19,7 @@ %define _use_internal_dependency_generator 0 -%global provfind sh -c "grep -v -e 'libpulse.*\\.so' -e 'libjack.*\\.so' | %__find_provides" +%global provfind sh -c "grep -v -e 'libjack.*\\.so' | %__find_provides" %global __find_provides %provfind %define apiver 0.3 @@ -35,7 +35,7 @@ %endif Name: pipewire -Version: 0.3.15 +Version: 0.3.20 Release: 0 Summary: A Multimedia Framework designed to be an audio and video server and more License: MIT @@ -44,9 +44,6 @@ URL: https://pipewire.org/ Source0: %{name}-%{version}.tar.xz Source1: %{name}-rpmlintrc Source99: baselibs.conf -Patch0: fix-memfd_create-call.patch -Patch1: do-not-use-snd_pcm_ioplug_hw_avail.patch -Patch2: do-not-install-alsa-config-files.patch BuildRequires: doxygen BuildRequires: fdupes @@ -71,6 +68,8 @@ BuildRequires: pkgconfig(gstreamer-audio-1.0) BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) BuildRequires: pkgconfig(gstreamer-video-1.0) BuildRequires: pkgconfig(jack) >= 1.9.10 +BuildRequires: pkgconfig(ldacBT-abr) +BuildRequires: pkgconfig(ldacBT-enc) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavfilter) BuildRequires: pkgconfig(libavformat) @@ -103,7 +102,6 @@ Some of its features include: %package -n %{libpipewire} Summary: A Multimedia Framework designed to be an audio and video server and more -License: MIT Group: System/Libraries Recommends: pipewire @@ -122,7 +120,6 @@ This package provides the PipeWire shared library. %package libjack-%{apiver_str} Summary: PipeWire libjack replacement libraries -License: MIT Group: Development/Libraries/C and C++ Requires(post): update-alternatives Requires(postun): update-alternatives @@ -141,29 +138,8 @@ Some of its features include: This package provides the PipeWire replacement libraries for libjack. -%package libpulse-%{apiver_str} -Summary: A Multimedia Framework designed to be an audio and video server and more -License: LGPL-2.1-or-later -Group: Development/Libraries/C and C++ -Requires(post): update-alternatives -Requires(postun): update-alternatives - -%description libpulse-%{apiver_str} -PipeWire is a server and user space API to deal with multimedia pipelines. - -Some of its features include: - - * Capture and playback of audio and video with minimal latency; - * Real-time Multimedia processing on audio and video; - * Multiprocess architecture to let applications share multimedia content; - * GStreamer plugins for easy use and integration in current applications; - * Sandboxed applications support. - -This package provides the PipeWire shared library. - %package -n gstreamer-plugin-pipewire Summary: Gstreamer Plugin for PipeWire -License: MIT Group: System/Libraries %description -n gstreamer-plugin-pipewire @@ -173,17 +149,13 @@ This package provides the gstreamer plugin. %package tools Summary: The PipeWire Tools -License: MIT Group: Productivity/Multimedia/Other %description tools -SPA or Simple Plugin API is a plugin API. - -This package provides pipewire-cli and pipewire-monitor tools. +This package contains command line utilities for the PipeWire media server. %package spa-tools Summary: The PipeWire SPA Tools -License: MIT Group: Productivity/Multimedia/Other %description spa-tools @@ -193,7 +165,6 @@ This package provides spa-inspect and spa-monitor tools. %package modules Summary: Modules For PipeWire, A Multimedia Framework -License: MIT Group: Productivity/Multimedia/Other Requires: pipewire @@ -210,7 +181,6 @@ The framework is used to build a modular daemon that can be configured to: %package spa-plugins-%{spa_ver_str} Summary: Plugins For PipeWire SPA -License: MIT Group: Productivity/Multimedia/Other Requires: pipewire @@ -235,7 +205,6 @@ This package provides plugins for extending PipeWire SPA's functionality. %package devel Summary: Development Files For PipeWire, A Multimedia Framework -License: MIT Group: Development/Libraries/C and C++ Requires: %{libpipewire} >= %{version} @@ -246,26 +215,40 @@ This package provides all the necessary files for development with PipeWire %package doc Summary: PipeWire media server documentation -License: MIT Group: Development/Libraries/C and C++ %description doc This package contains documentation for the PipeWire media server. +%package alsa +Summary: PipeWire media server ALSA support +Group: Development/Libraries/C and C++ +Recommends: %{name} >= %{version}-%{release} +Requires: %{libpipewire} >= %{version}-%{release} + +%description alsa +This package contains an ALSA plugin for the PipeWire media server. + +%package pulseaudio +Summary: PipeWire PulseAudio implementation +Group: Development/Libraries/C and C++ +Recommends: %{name} >= %{version}-%{release} +Requires: %{libpipewire} >= %{version}-%{release} +Conflicts: pulseaudio + +# Virtual Provides to support swapping between PipeWire-PA and PA +#Provides: pulseaudio-daemon +#Conflicts: pulseaudio-daemon +#Provides: pulseaudio-module-bluetooth +#Provides: pulseaudio-module-jack + +%description pulseaudio +This package provides a PulseAudio implementation based on PipeWire + +%lang_package + %prep -%setup -%if %{pkg_vcmp glibc < 2.27} -%patch0 -p1 -%endif - -%if %{pkg_vcmp alsa-devel < 1.1.7} -%patch1 -p1 -sed -i -e "s/dependency('alsa', version : '>=1.1.7')/dependency('alsa', version : '>=1.1.5')/" meson.build -%endif -sed -i -e "s/meson_version : '>= 0.49.0',/meson_version : '>= 0.46.0',/" meson.build -%patch2 -p1 - -%autopatch -m 100 -p1 +%autosetup -p1 %build %if %{pkg_vcmp gcc < 8} @@ -289,25 +272,34 @@ export CC=gcc-9 %install %meson_install +#do not install alsa card paths, profile-sets configuration files and udev rules which upstream installs "so that we don't have to rely on the pulseaudio ones" + +rm -fr %{buildroot}%{_datadir}/alsa-card-profile/mixer mkdir -p %{buildroot}%{_sysconfdir}/alsa/conf.d/ -# Copy the alsa configuration but keep 99-pipewire-default.conf disabled by default -cp -a pipewire-alsa/conf/50-pipewire.conf %{buildroot}%{_sysconfdir}/alsa/conf.d/ -cp -a pipewire-alsa/conf/99-pipewire-default.conf %{buildroot}%{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf.example +cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf \ + %{buildroot}%{_sysconfdir}/alsa/conf.d/50-pipewire.conf +cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf \ + %{buildroot}%{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf +touch %{buildroot}%{_sysconfdir}/pipewire/media-session.d/with-alsa +mkdir -p %{buildroot}%{_udevrulesdir} +mv -fv %{buildroot}/lib/udev/rules.d/90-pipewire-alsa.rules %{buildroot}%{_udevrulesdir} mkdir -p %{buildroot}%{_sysconfdir}/alternatives -for wrapper in pw-pulse pw-jack ; do +for wrapper in pw-jack ; do mv %{buildroot}%{_bindir}/$wrapper %{buildroot}%{_bindir}/$wrapper-%{apiver} ln -s -f %{_sysconfdir}/alternatives/$wrapper %{buildroot}%{_bindir}/$wrapper done -for manpage in pw-jack pw-pulse ; do +for manpage in pw-jack ; do mv %{buildroot}%{_mandir}/man1/$manpage.1 %{buildroot}%{_mandir}/man1/$manpage-%{apiver}.1 ln -s -f %{_sysconfdir}/alternatives/$manpage.1%{ext_man} %{buildroot}%{_mandir}/man1/$manpage.1%{ext_man} done %fdupes -s %{buildroot}/%{_datadir}/doc/pipewire/html +%find_lang %{name} %{name}.lang + %check %meson_test @@ -331,18 +323,18 @@ fi %postun %systemd_user_postun pipewire.socket +%preun pulseaudio +%systemd_user_preun pipewire-pulse.service pipewire-pulse.socket + +%post pulseaudio +%systemd_user_post pipewire-pulse.service pipewire-pulse.socket + +%postun pulseaudio +%systemd_user_postun pipewire-pulse.service pipewire-pulse.socket + %post -n %{libpipewire} -p /sbin/ldconfig %postun -n %{libpipewire} -p /sbin/ldconfig -%post libpulse-%{apiver_str} -%{_sbindir}/update-alternatives --install %{_bindir}/pw-pulse pw-pulse %{_bindir}/pw-pulse-%{apiver} 20 \ - --slave %{_mandir}/man1/pw-pulse.1%{ext_man} pw-pulse.1%{ext_man} %{_mandir}/man1/pw-pulse-%{apiver}.1%{ext_man} - -%postun libpulse-%{apiver_str} -if [ ! -e %{_bindir}/pw-pulse-%{apiver} ] ; then - %{_sbindir}/update-alternatives --remove pw-pulse %{_bindir}/pw-pulse-%{apiver} -fi - %post libjack-%{apiver_str} %{_sbindir}/update-alternatives --install %{_bindir}/pw-jack pw-jack %{_bindir}/pw-jack-%{apiver} 20 \ --slave %{_mandir}/man1/pw-jack.1%{ext_man} pw-jack.1%{ext_man} %{_mandir}/man1/pw-jack-%{apiver}.1%{ext_man} @@ -362,17 +354,11 @@ fi %dir %{_sysconfdir}/pipewire %config %{_sysconfdir}/pipewire/pipewire.conf - -%dir %{_libdir}/alsa-lib -%{_libdir}/alsa-lib/libasound_module_pcm_pipewire.so -%{_libdir}/alsa-lib/libasound_module_ctl_pipewire.so -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf -%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-pipewire.conf -%{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf.example +%dir %{_sysconfdir}/pipewire/media-session.d +%config(noreplace) %{_sysconfdir}/pipewire/media-session.d/media-session.conf +%config(noreplace) %{_sysconfdir}/pipewire/media-session.d/alsa-monitor.conf +%config(noreplace) %{_sysconfdir}/pipewire/media-session.d/bluez-monitor.conf +%config(noreplace) %{_sysconfdir}/pipewire/media-session.d/v4l2-monitor.conf %files -n %{libpipewire} %license LICENSE COPYING @@ -390,19 +376,7 @@ fi %{_bindir}/pw-jack %{_mandir}/man1/pw-jack-%{apiver}.1%{ext_man} %{_mandir}/man1/pw-jack.1%{ext_man} - -%files libpulse-%{apiver_str} -%license pipewire-pulseaudio/LICENSE -%dir %{_libdir}/pipewire-%{apiver}/pulse -%{_libdir}/pipewire-%{apiver}/pulse/libpulse.so* -%{_libdir}/pipewire-%{apiver}/pulse/libpulse-simple.so* -%{_libdir}/pipewire-%{apiver}/pulse/libpulse-mainloop-glib.so* -%ghost %{_sysconfdir}/alternatives/pw-pulse -%ghost %{_sysconfdir}/alternatives/pw-pulse.1%{ext_man} -%{_bindir}/pw-pulse-%{apiver} -%{_bindir}/pw-pulse -%{_mandir}/man1/pw-pulse-%{apiver}.1%{ext_man} -%{_mandir}/man1/pw-pulse.1%{ext_man} +%config(noreplace) %{_sysconfdir}/pipewire/media-session.d/with-jack %files -n gstreamer-plugin-pipewire %{_libdir}/gstreamer-1.0/libgstpipewire.so @@ -410,9 +384,11 @@ fi %files tools %{_bindir}/pw-cli %{_bindir}/pw-dot +%{_bindir}/pw-dump %{_bindir}/pw-mon %{_bindir}/pw-profiler %{_bindir}/pw-cat +%{_bindir}/pw-dump %{_bindir}/pw-play %{_bindir}/pw-record %{_bindir}/pw-metadata @@ -462,6 +438,7 @@ fi %{_libdir}/spa-%{spa_ver}/ffmpeg/libspa-ffmpeg.so %{_libdir}/spa-%{spa_ver}/jack/libspa-jack.so %{_libdir}/spa-%{spa_ver}/support/libspa-dbus.so +%{_libdir}/spa-%{spa_ver}/support/libspa-journal.so %{_libdir}/spa-%{spa_ver}/support/libspa-support.so %{_libdir}/spa-%{spa_ver}/v4l2/libspa-v4l2.so %{_libdir}/spa-%{spa_ver}/videoconvert/libspa-videoconvert.so @@ -499,4 +476,25 @@ fi %dir %{_datadir}/doc/pipewire %{_datadir}/doc/pipewire/html +%files pulseaudio +%{_bindir}/pipewire-pulse +%{_userunitdir}/pipewire-pulse.* +%config(noreplace) %{_sysconfdir}/pipewire/media-session.d/with-pulseaudio + +%files alsa +%dir %{_libdir}/alsa-lib +%{_libdir}/alsa-lib/libasound_module_pcm_pipewire.so +%{_libdir}/alsa-lib/libasound_module_ctl_pipewire.so +%dir %{_datadir}/alsa/alsa.conf.d +%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf +%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf +%dir %{_sysconfdir}/alsa +%dir %{_sysconfdir}/alsa/conf.d +%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-pipewire.conf +%config(noreplace) %{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf +%config(noreplace) %{_sysconfdir}/pipewire/media-session.d/with-alsa +%{_udevrulesdir}/90-pipewire-alsa.rules + +%files lang -f %{name}.lang + %changelog