Markus Volk 8c2f53cd0b
pipewire: update 1.4.10 -> 1.6.0
PipeWire 1.6.0 (2026-02-19)

This is is the 1.6 release that is API and ABI compatible with previous
1.4.x releases.

This release contains some of the bigger changes that happened since
the 1.4 release last year, including:

  * An LDAC decoder was added for bluetooth.
  * SpanDSP for bluetooth packet loss concealment.
  * Safe parsing and building of PODs in shared memory.
  * Added support for metadata features. This is used to signal that
    the sync_timeline metadata supports the RELEASE operation.
  * Node commands and events can contain extra user data.
  * Support for more compressed format helper functions to create
    and parse formats.
  * Support for compile time max channels. The max channels was
    increased to 128.
  * Support for audio channel layouts was added. This makes it possible
    to set "audio.layout" = "5.1" instead of the more verbose
    audio.position = [ FL, FR, FC, LFE, SL, SR ]
  * Support for Capability Params was added. This can be used to
    negotiate capabilities on a link before format and buffer
    negotiation takes place.
  * More HDR colortypes are added.
  * Loops now have locking with priority inversion. Most code was adapted
    to use the faster locks instead of epoll/eventfd to update shared state.
  * Channel position are parsed from EDID data.
  * Channel maps are now set on ALSA.
  * The resampler now supports configurable window functions such
    as blackman and kaiser windows. The phases are now also calculated
    with fixed point math, which makes it more accurate.
  * Many bluetooth updates and improvements.
  * The filter-graph has an ffmpeg and ONNX plugin. The ffmpeg plugin
    can run an audio AVFilterGraph. The ONNX plugin can run some models
    such as the silero VAD.
  * Many AVB updates. Work is ongoing to merge the Milan protocol.
  * Support for v0 clients was removed.
  * The jack-tunnel module can now autoconnect ports.
  * ROC support multitrack layouts now.
  * Many RTP updates.
  * rlimits can now be set in the config file.
  * Thread reset on fork can now be configured. JACK clients expect this
    to be disabled.
  * node.exclusive is now enforced.
  * node.reliable enables reliable transport.
  * pw-cat supports sysex and midiclip as well as some more uncompressed
    formats. Options were added to set the container and codec formats
    as well as list the supported containers, codecs, layouts and channel
    names.
  * Documentation updates.

Highlights (since the previous 1.5.85 prerelease)
  - Fix a 64 channel limit in the channel mixer.
  - Fix an fd leak in pulse-server in some error cases.
  - Some small fixes and improvements.

PipeWire
  - Fix Capability leaks.
  - Return an error in pw-stream get-time when not STREAMING.
  - Set the current time in the driver position before starting.
    Some followers might look at it.

Modules
  - Improve default channel handling in module-filter-chain.
  - Support source and sink only module-filter-chain.
  - Tweak the filter-chain spatializer example gains.
  - Handle new snapcast service type. (#5104)
  - Implement socket activation without depending on libsystemd.
  - Support ipv4 link-local addresses in RAOP and snapcast. (#4830)
  - Forward ROC-toolkit logs to pipewire.

SPA
  - Improve default channel handling in filter-graph. (#5084)
  - Clamp control values to min/max. (#5088)
  - Support mode JBL gaming headsets.
  - Handle some SOFA errors and add gain option.
  - Really handle more than 64 channels in the channelmixer. (#5118)
  - Allow removal in ALSA-udev of ignored cards.

pulse-server
  - Fix mono mixdown query.
  - Expose headset autoswitch message.
  - Handle EPROTO errors by disconnecting.
  - Handle timeouts in play-sample streams. (#5099)

GStreamer
  - Fix crop metadata.
  - Fix a race in the buffer release function.

Tools
  - Improve format support and detection in pw-cat.
  - Add some more options to pw-cat to list supported containers
    and formats. (#5117)

Older versions:

PipeWire 1.5.85 (2026-01-19)

This is the fifth and hopefully last 1.6 release candidate that
is API and ABI compatible with previous 1.4.x, 1.2.x and 1.0.x
releases.

Highlights
  - Fix errors in older clients that blindly mmap buffer data.
  - ALSA channel mapping should work in more cases.
  - Fix an overflow in the resampler with some sample rates.
  - Device ID negotiation for DMABUF was added.
  - The channelmixer can now also downmix most REAR and TOP
    channel positions.
  - Various small fixes and improvements.

PipeWire
  - Avoid doing flushing invoke in pw-stream. (#5010)
  - Fix stream time delay calculations in some cases. (#4957)
  - Avoid suspending a node when the ports are busy.

Modules
  - Mode AVB module updates.
  - Remove MAPPABLE flag from memptr data in client-node. This avoids
    errors in older clients that blindly map buffers. (#5003)
  - Don't leak the filter-chain module in module-parametric-equalizer.
    (#5045)
  - make it possible to run pulse tunnel sink and source with the same
    name. (#5079)

SPA
  - The delay filter in filter-graph now has feedback and feedforward
    options to make it possible to implement comb and allpass filters.
  - The resampler can be compiled with a custom default quality.
  - Firewire latency is scaled correctly now. (#4977)
  - The mixer will only passthrough dynamic data.
  - Fix filter-graph state in audioconvert after flush.
  - Set the channel map in ALSA nodes to tell ALSA our channel layout
    and avoid wrong channels.
  - Fix AVX2 function, make sure they don't run on AVX-only CPUs.
    (#5072)
  - Fix an overflow and crash when too many phases are used in the
    resampler. (#5073)
  - Add some more channel downmix positions, mostly REAR and TOP
    channels.

pulse-server
  - Add a message to enable mono mixdown.

Tools
  - Support filenames in raw mode in pw-cat. (#5012)
  - Enable clipping in spa-resample.

examples
  - Update device ID negotiation examples.

Docs
  - Document the resampler properties better.

PipeWire 1.5.84 (2025-11-27)

This is the fourth 1.6 release candidate that is API and ABI
compatible with previous 1.4.x, 1.2.x and 1.0.x releases.

Changes since the last pre-release:

Highlights
  - Capabilities wer added to improve negotiation over links.
  - The audio resampler now has a configurable window function to better
    tune the resampler quality. A kaiser and blackman window was added
    and the default parameters were tuned.
  - Various small fixes and improvements.

PipeWire
  - Capabilities and PeerCapabilities were added to exchange key/value
    pairs between consumer and producer right after a link is made. This
    can be used to detect how the negotiation of formats and buffers
    should be done.

Modules
  - Avoid segfaults in RTP source. (#4970)
  - The AVB module has seen some improvements.

Pulse-server
  - @NONE@ can now be used to clear the default sink/source.

SPA
  - Support longer convolver filenames and also support inline
    IRs.
  - The audio resampler window function is now selectable and
    configurable. A kaiser window and blackman window was added
    and the default qualities were tweaked to improve quality.
  - The filter-graph convolver latency is now set by default to
    something more sensible. (0 by default and N/2 for hilbert).
    (#4980)

Bluetooth
  - Better xrun and error handling for iso streams.
  - The +CNUM reply was fixed.
  - The CIEC call status was fixed. (#1744)
  - Add BAP context metadata to improve compatibility.
  - Improve compatiblity with Creative Zen Hybrid Pro by releasing
    transports simultaneously.

PipeWire 1.5.83 (2025-11-06)

This is the third 1.6 release candidate that is API and ABI
compatible with previous 1.4.x, 1.2.x and 1.0.x releases.

Changes since the last pre-release:

Highlights
  - Include the NEWS and updated version number.

PipeWire 1.5.82 (2025-11-06)

This is the second 1.6 release candidate that is API and ABI
compatible with previous 1.4.x, 1.2.x and 1.0.x releases.

Changes since the last pre-release:

Highlights
  - The max channel limit is now a compile time option.
  - The SAP and RTP module have seen some robustness improvements.
  - Add audio.layout propperty.
  - Cleanups to the code here and there.

PipeWire
  - Handle Tags more like Latency with a NULL param when no ports are linked
    and some sort of (empty) Tag when the ports are linked.

Modules
  - Improve the echo-cancel module to keep the streams more aligned
    and cause less latency.
  - Improve format parsing errors in most modules.
  - The RTP module now has extra code for better network robustness, including
    cases when network interfaces are not yet up and running, and multicast
    sockets are silently kicked out of IGMP groups.
  - The direct timestamp mode in the RTP module was effectively broken and is
    now fixed.
  - Add support for audio.layout.
  - Add multichannel support to ROC.

SPA
  - Rework the maximum number of channel handling. Because this is a
    potential ABI break, it is now a compile time option with new
    functions to handle more than the previous 64 channels.
  - The 64 channel limit was removed from the noise shaper.
  - spa_strbuf is used in more places instead of custom snprintf code.
  - The volume ramp code was simplified.
  - The driver node now has properties to configure the clock.
  - The adapter will try to renegotiate when the driver changes.
  - Fix relaxed array parsing with od number of elements. (#4944)
  - audio.layout was added to set the channel positions to some
    predefined layouts.
  - Added more POD choice checks to ensure the right amount of values
    are present in the choice.
  - Fix __has_attribute usage. (#4962)
  - Thread RESET_ON_FORK is now disabled for JACK application so that
    forking will preserve any real-time thread priorities, like JACK.
    (#4966)
  - Fix some compilation issues. (#4960 and #4961).

Pulse-server
  - Fix missing subscription events on device port changes.
  - Increase min.quantum to 256/48000. (#4875)

GStreamer
  - Avoid overflow in clock time calculations.
  - Fix renegotiation.

Docs
  - Swap the name and id of device.product

PipeWire 1.5.81 (2025-10-16)

This is the first 1.6 release candidate that is API and ABI
compatible with previous 1.4.x, 1.2.x and 1.0.x releases.

In addition to all the changes backported to 1.4.x, this release
also contains some new features:

Highlights
  - The link negotiation code was refactored and improved.
    Applications now have more options for selecting the default
    values and restricting the available options. The default
    negotiation code will now attempt to better match the application
    suggested values.
  - The loop now has support for locking with priority inversion. Most
    of the code was updated to use the locks instead of invoke to
    get proper concurrent updates with the loop. The Thread loop
    functionality of locks, signal and wait was moved to the SPA loop.
    This guarantees better real-time behaviour because inter-thread
    synchronization does not have to pass eventfd/epoll.
  - The control stream parser was rewritten to be safe against concurrent
    updates while parsing, which can occur when parsing shared memory.
    It also has extra checks to avoid integer overflows and undefined
    behaviour.
  - MIDI 2.0 clip support was added to the tools.
  - Bluetooth ASHA (Audio Streaming for Hearing Aid) support was added.
  - The ALSA node setup was tweaked to provide low latency with the ALSA
    Firewire driver.
  - Better support for explicit sync. It is now possible to negotiate
    extra features to know if a consumer will signal the sync objects and
    implement a fallback using a reliable transport.
  - Many bug fixes and improvements.

PipeWire
  - Avoid process calls in disconnect in pw-stream. (#3314)
  - Disable PipeWire services for root.
  - The link negotiation was refactored and improved. Drivers now
    always have a lower priority in deciding the final format.
  - Backwards compatibility with the v0 protocol was removed.
  - pw-stream and pw-filter will now refuse to queue a buffer that
    was not dequeued before.
  - Object properties will now be updated on the global as well.
  - The priority of config overrides is correct now. (#4816)
  - Async links now correctly report 1 extra quantum of latency.
  - node.exclusive and the new port.exclusive flag are now enforced
    by PipeWire itself.
  - A new timer-queue helper was added to schedule timeouts.
  - node.terminal and node.physical properties are now copied to the
    ports to make it possible to create virtual sources and sinks
    for JACK applications.
  - Port properties will now be dynamically updated when the node
    properties they depend on are updated.
  - Passive leaf nodes are now handled better. Now they will also
    run when the peer is active. (#4915)
  - Reliable transport has been added for output ports. This can be
    used in some cases if the producer wants to ensure buffers are
    consumed by a consumer. (#4885)
  - Context properties now support rlimit.<resource> properties to
    configure rlimits. (#4047)

Modules
  - Close SyncObj fds.
  - module-combine-stream has better Latency reporting.
  - The JACK tunnel can now optionally connect ports.
  - module-loopback has better Latency reporting.
  - A Dolby Surround and Dolby Pro Logic II example filter config
    was added.
  - Filter-chain can now resample to a specific rate before running the
    filters. This is useful when the filter-graph needs to run at a
    specific rate.
  - Avahi-poll now uses the timer-queue to schedule timeouts.
  - Modules are ported to timer-queue instead of using timerfd directly
    for non-realtime timers.

SPA
  - The loop now has support for locking with priority inversion. Most
    of the code was updated to use the locks instead of invoke to
    get proper concurrent updates with the loop. The Thread loop
    functionality of locks, signal and wait was moved to the SPA loop.
  - UMP to Midi 1.0 conversion was improved, some UMP events are now
    converted to multiple Midi 1.0 messages. (#4839)
  - The POD filter was refactored and improved. It is now possible to
    use the default value of the output by specifying an invalid input
    default value.
  - The POD parser was made safe for concurrent updates of the memory
    it is parsing. This is important when the POD is in shared memory
    and the parser should not access invalid memory.
  - Some hardcoded channel limits were removed and now use the global
    channel limit. More things can dynamically adapt to this global
    limit. The max number of channels was then bumped to 128.
  - The POD builder is safe to use on shared memory now and tries to
    avoid many integer overflows.
  - Most debug functions are safe to be used on shared memory.
  - User specified Commands and Events are now possible.
  - The SPA_IO_CLOCK_FLAG_DISCONT was added to spa_io_clock to signal
    a discont in the clock due to clock change.
  - AC3, DTS, EAC3, TRUEHD and MPEGH now have helper parser functions.
  - H265 was added as a video format. (#4674)
  - SPA_PARAM_PeerFormats was added to let a port know about its peer
    formats in order to better filter possible conversions.
  - More color matrices, transfer functions and color primaries.
  - The echo-canceler is enabled now.
  - Pro-Audio mode now uses 3 periods by default. This lowers the
    latency on some drivers (Firewire). The latency of Firewire is
    also reported correctly now.
  - The ALSA DLL bandwidth is configurable now.
  - The resampler now uses fixed point for the phases and is a little
    faster when updating adaptive rates.
  - The convolver is a little faster by swapping buffers instead of
    copying samples.
  - Latency and ProcessLatency support was added to filter-graph.
    (#4678)
  - Audio channel position support was added to filter-graph.
  - A new ffmpeg avfilter plugin was added to filter-graph.
  - A new ONNX filter was added to filter-graph.
  - A debug, pipe, zeroramp and noisegate filter was added to the
    filter-graph. (#4745)
  - The filter-graph lv2 plugin now supports options and state.
  - videoconvert was greatly improved.
  - The v4l2 plugin can negotiate DMABUF with modifiers.
  - Colorimetry information was added to v4l2 and libcamera.
  - Audioconvert can handle empty buffers more efficiently.
  - Improve the POD compare functions for Rectangle.
  - There is now a SPA_POD_PROP_FLAG_DROP flag to drop the property when
    the property is missing from one side.
  - A new FEATURE choice was added that is basically a flags choice with
    a FLAG_DROP property.
  - Metadata features were added. This is a way to negotiate new features
    for the metadata. (#4885)
  - DSD playback with pw-cat has been improved.
  - Compatibility and xrun prevention for the SOF driver has been
    improved. (#4489)
  - The filter-graph max plugin can now have 8 input channels.
  - Buffer Negotiation between the mixer port and the node ports is much
    improved. (#4918)
  - An offline AEC benchmark was added.
  - Channel positions are now read from HDMI ELD when possible.
  - Audioconvert and filter-graph now also support properties of Long
    and String types.

ACP
  - It's possible to disable the pro-audio profile.
  - Support for Logitech Z407 PC Speakers was improved.
  - Support for Razer BlackShark v3.
  - Fix volume rounding down causing mute. (#4890)

Tools
  - pw-cat can now play and record MIDI 2.0 Clips, which is the
    official format for storing MIDI 2.0 UMP data. pw-midi2play
    and pw-midi2record were added as aliases.
  - pw-cat can now upload sysex files. The pw-sysex alias was
    added for this.
  - The pw-link tool now has a -t option to list port latencies.
    It also has better monitor support.
  - pw-top can now clear the ERR column with the c key.
  - pw-cli now keeps the types of the variables it stores and avoid
    using wrongly typed variables that can crash things. It can now
    also list the available variables.
  - pw-dump can now output raw JSON and SPA JSON.
  - pw-dump has configurable indentation level.
  - pw-mididump can be forced to output MIDI 1.0 messages.
  - pw-profiler now uses doubles for extra precision.
  - pw-top now marks the async nodes with =.

Bluetooth
  - Telephony improvements.
  - ASHA support was added.
  - Packet loss concealment was added.
  - Improved synchronisation between LE Audio streams in the same group.
  - Improved LE Audio device compatibility.
  - LC3-24kHz voice codec was added (used by Airpods)
  - LDAC decoding support added (requires separate decoder library)

Pulse-server
  - The SUSPEND event is now correctly generated. fail-on-suspend is
    now implemented.
  - PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND is now implemented. (#4255)
    (#4726)
  - RTP streams now have stream.properties for extra configuration.
  - Timed out streams are now destroyed instead of lingering. (#4901)
  - A new help and pipewire-pulse:list-modules core message was added.

JACK
  - Port rename callbacks are now emitted correctly.
  - Use safe POD parsing for the control sequences.

V4l2
  - The wrapper now avoids a race while initializing PipeWire. (#4859)

GStreamer
  - Colorimetry support was added.
  - Cursor metadata is now exposed as ROI metadata.
  - Many more updates.

Docs
  - Document the client-node flow a bit more.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2026-02-20 23:34:22 -08:00

415 lines
16 KiB
BlitzBasic

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"
SECTION = "multimedia"
LICENSE = "MIT & LGPL-2.1-or-later & GPL-2.0-only"
LIC_FILES_CHKSUM = " \
file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \
file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \
"
DEPENDS = "dbus ncurses"
SRCREV = "700cea78dbe7564131d51b21a7795e2567ee048a"
BRANCH = "${@oe.utils.trim_version('${PV}', 2)}"
SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=${BRANCH};protocol=https;tag=${PV}"
inherit meson pkgconfig systemd 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"
SYSTEMD_PACKAGES = "${PN}"
# For "EVL", look up https://evlproject.org/ . It involves
# a specially prepared kernel, and is currently unavailable
# in Yocto.
#
#
# manpage generation requires xmltoman, which is not available.
#
# The session-managers list specifies which session managers Meson
# shall download (via git clone) and build as subprojects. In OE,
# this is not how a session manager should be built. Instead, they
# should be integrated as separate OE recipes. To prevent PipeWire
# from using this Meson feature, set an empty list.
# This does not disable support or the need for session managers,
# it just prevents this subproject feature.
#
# AptX and LDAC are not available in OE. Currently, neither
# are lv2, ROC, and libmysofa.
#
# The RTKit module is deprecated in favor of the newer RT module.
# It still exists for legacy setups that still include it in
# their PipeWire configuration files.
EXTRA_OEMESON += " \
-Devl=disabled \
-Dtests=disabled \
-Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \
-Dsystemd-system-unit-dir=${systemd_system_unitdir} \
-Dsystemd-user-unit-dir=${systemd_user_unitdir} \
-Dman=disabled \
-Dsession-managers='[]' \
-Dlv2=disabled \
-Droc=disabled \
-Dbluez5-codec-aptx=disabled \
-Dbluez5-codec-ldac=disabled \
-Dlegacy-rtkit=false \
-Dlibmysofa=disabled \
"
# spa alsa plugin code uses typedef redefinition, which is officially a C11 feature.
# Pipewire builds with 'c_std=gnu99' by default. Recent versions of gcc don't issue this warning in gnu99
# mode but it looks like clang still does
CFLAGS:append = " -Wno-typedef-redefinition"
# Specify linking with -latomic on architectures missing 64bit atomics.
LDFLAGS += "${@bb.utils.contains_any('TUNE_FEATURES', 'riscv32 armv5 mips ppc32 m32', '-latomic', '', d)}"
# According to wireplumber documentation only one session manager should be installed at a time
# Possible options are media-session, which has fewer dependencies but is very simple,
# or wireplumber, which is more powerful.
PIPEWIRE_SESSION_MANAGER ??= "wireplumber"
FFMPEG_AVAILABLE = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)}"
BLUETOOTH_AAC = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'bluez-aac', '', d)}"
PACKAGECONFIG:class-target ??= " \
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez bluez-opus ${BLUETOOTH_AAC}', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \
${PIPEWIRE_SESSION_MANAGER} \
${FFMPEG_AVAILABLE} avahi flatpak gstreamer gsettings jack libusb pw-cat raop sndfile v4l2 udev volume webrtc-echo-cancelling libcamera readline \
"
# "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,,${MLPREFIX}pipewire-alsa ${MLPREFIX}pipewire-alsa-card-profile"
PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi"
PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc glib-2.0-native"
PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac"
PACKAGECONFIG[bluez-opus] = "-Dbluez5-codec-opus=enabled,-Dbluez5-codec-opus=disabled,libopus"
PACKAGECONFIG[bluez-lc3] = "-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-lc3=disabled,liblc3"
# From the pipewire git log:
# "Some Linux phones doesn't use oFono but ModemManager to control the modem."
# This packageconfig enables modemmanager specific code in the BlueZ backend.
PACKAGECONFIG[bluez-backend-native-mm] = "-Dbluez5-backend-native-mm=enabled,-Dbluez5-backend-native-mm=disabled,modemmanager"
PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native graphviz-native"
PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg"
PACKAGECONFIG[flatpak] = "-Dflatpak=enabled,-Dflatpak=disabled,glib-2.0"
PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0"
PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base,,${MLPREFIX}gstreamer1.0-pipewire"
PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack"
PACKAGECONFIG[libcamera] = "-Dlibcamera=enabled,-Dlibcamera=disabled,libcamera libdrm"
PACKAGECONFIG[libcanberra] = "-Dlibcanberra=enabled,-Dlibcanberra=disabled,libcanberra"
PACKAGECONFIG[libusb] = "-Dlibusb=enabled,-Dlibusb=disabled,libusb"
PACKAGECONFIG[media-session] = ",,,pipewire-media-session,,wireplumber"
PACKAGECONFIG[pulseaudio] = "-Dlibpulse=enabled,-Dlibpulse=disabled,pulseaudio,,${MLPREFIX}pipewire-pulse"
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,,${MLPREFIX}pipewire-jack,jack"
PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled"
PACKAGECONFIG[raop] = "-Draop=enabled,-Draop=disabled,openssl"
# Starting with version 0.3.60, readline usage can be turned off in pw-cli.
# If it is disabled, getline() is used as a fallback.
PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline"
PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,virtual/libsdl2"
PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
PACKAGECONFIG[systemd] = "-Dlibsystemd=enabled,-Dlibsystemd=disabled,systemd"
PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd"
# "systemd-user-service" packageconfig will only install service
# files to rootfs but not enable them as systemd.bbclass
# currently lacks the feature of enabling user services.
PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd"
# pw-cat needs sndfile packageconfig to be enabled
PACKAGECONFIG[udev] = "-Dudev=enabled,-Dudev=disabled,udev"
PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev"
PACKAGECONFIG[volume] = "-Dvolume=enabled,-Dvolume=disabled"
PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-headers vulkan-loader"
PACKAGECONFIG[webrtc-echo-cancelling] = "-Decho-cancel-webrtc=enabled,-Decho-cancel-webrtc=disabled,webrtc-audio-processing-2"
PACKAGECONFIG[wireplumber] = ",,,wireplumber,,media-session"
PACKAGESPLITFUNCS:prepend = " split_dynamic_packages "
PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends "
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
# minimal.conf is an example of how to minimally configure the
# daemon and is not meant to be used for production.
rm -f "${D}${datadir}/pipewire/minimal.conf"
}
do_install:append:class-target() {
# The pipewire-alsa plugin needs the following files in /etc/alsa/conf.d/ to
# be picked up by alsa.
install -d ${D}${sysconfdir}/alsa/conf.d
ln -sf ${datadir}/alsa/alsa.conf.d/50-pipewire.conf ${D}${sysconfdir}/alsa/conf.d/50-pipewire.conf
ln -sf ${datadir}/alsa/alsa.conf.d/99-pipewire-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pipewire-default.conf
}
do_install[postfuncs] += "remove_unused_installed_files"
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
if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('native', d):
return
# 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}-spa-plugins \
${PN}-spa-plugins-meta \
${PN}-spa-tools \
${PN}-modules \
${PN}-modules-meta \
${PN}-alsa-card-profile \
${PN}-v4l2 \
${PN}-aes67 \
gstreamer1.0-pipewire \
"
PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*"
PACKAGES_DYNAMIC:class-native = ""
SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}"
CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf"
FILES:${PN} = " \
${datadir}/pipewire \
${systemd_system_unitdir}/pipewire* \
${systemd_user_unitdir} \
${bindir}/pipewire \
${bindir}/pipewire-avb \
${bindir}/pipewire-vulkan \
"
RRECOMMENDS:${PN}:class-target += " \
pipewire-modules-meta \
pipewire-spa-plugins-meta \
"
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.* \
${libdir}/${SPA_SUBDIR}/libspa.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-cat \
${bindir}/pw-cli \
${bindir}/pw-config \
${bindir}/pw-container \
${bindir}/pw-dot \
${bindir}/pw-dsdplay \
${bindir}/pw-dump \
${bindir}/pw-encplay \
${bindir}/pw-link \
${bindir}/pw-loopback \
${bindir}/pw-metadata \
${bindir}/pw-midi2play \
${bindir}/pw-midi2record \
${bindir}/pw-mididump \
${bindir}/pw-midiplay \
${bindir}/pw-midirecord \
${bindir}/pw-mon \
${bindir}/pw-play \
${bindir}/pw-profiler \
${bindir}/pw-record \
${bindir}/pw-reserve \
${bindir}/pw-sysex \
${bindir}/pw-top \
"
# 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_system_unitdir}/pipewire-pulse.* \
${systemd_user_unitdir}/pipewire-pulse.* \
${bindir}/pipewire-pulse \
"
# This uses :append:class-target rather than += to avoid a dependency from
# pipewire-native to pipewire.
RDEPENDS:${PN}-pulse:append:class-target = " \
${PN}-modules-protocol-pulse \
"
# ALSA plugin to redirect audio to pipewire.
FILES:${PN}-alsa = "\
${libdir}/alsa-lib/* \
${datadir}/alsa/alsa.conf.d/* \
${sysconfdir}/alsa/conf.d/50-pipewire.conf \
${sysconfdir}/alsa/conf.d/99-pipewire-default.conf \
"
# JACK drop-in libraries to redirect audio to pipewire.
CONFFILES:${PN}-jack = "${datadir}/pipewire/jack.conf"
FILES:${PN}-jack = "\
${bindir}/pw-jack \
${datadir}/pipewire/jack.conf \
${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so.* \
"
# Dynamic SPA plugin packages (see set_dynamic_metapkg_rdepends).
FILES:${PN}-spa-plugins = ""
RRECOMMENDS:${PN}-spa-plugins += "${PN}-spa-plugins-meta"
FILES:${PN}-spa-plugins-bluez5 += " \
${datadir}/${SPA_SUBDIR}/bluez5/* \
"
FILES:${PN}-spa-tools = " \
${bindir}/spa-* \
"
# Dynamic PipeWire module packages (see set_dynamic_metapkg_rdepends).
FILES:${PN}-modules = ""
RRECOMMENDS:${PN}-modules += "${PN}-modules-meta"
CONFFILES:${PN}-modules-rt = "${datadir}/pipewire/client-rt.conf"
FILES:${PN}-modules-rt += " \
${datadir}/pipewire/client-rt.conf \
${sysconfdir}/security/limits.d/* \
"
CONFFILES:${PN}-modules-filter-chain = "${datadir}/pipewire/filter-chain/*"
FILES:${PN}-modules-filter-chain += " \
${datadir}/pipewire/filter-chain/* \
"
FILES:${PN}-alsa-card-profile = " \
${datadir}/alsa-card-profile/* \
${nonarch_base_libdir}/udev/rules.d/90-pipewire-alsa.rules \
"
# V4L2 interface emulator for sending/receiving data between PipeWire and V4L2 applications.
FILES:${PN}-v4l2 += " \
${bindir}/pw-v4l2 \
${libdir}/${PW_MODULE_SUBDIR}/v4l2/libpw-v4l2.so \
"
# AES67 is a standard for audio over IP, from the Audio Engineering Society (AES).
FILES:${PN}-aes67 += " \
${bindir}/pipewire-aes67 \
"
FILES:gstreamer1.0-pipewire = " \
${libdir}/gstreamer-1.0/* \
"
BBCLASSEXTEND = "native nativesdk"
do_install:append() {
if ls ${D}${datadir}/doc/pipewire/html/dir_*html; then
sed -i "s,${WORKDIR},,g" ${D}${datadir}/doc/pipewire/html/dir_*html
fi
}