Skip to content

Commit f6eb4c8

Browse files
MarkusVolkkraj
authored andcommitted
pipewire: update to v0.3.56
Add the configuration to make pipewire work as a drop-in replacement for pulseaudio-server. Add pipewire-media-session as a standalone recipe, since pipewire would fetch the code as a subproject at do_configure. Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent f36a158 commit f6eb4c8

4 files changed

Lines changed: 117 additions & 61 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
SUMMARY = "PipeWire Media Session is an example session manager for PipeWire"
2+
HOMEPAGE = "https://gitlab.freedesktop.org/pipewire/media-session"
3+
LICENSE = "MIT"
4+
5+
LIC_FILES_CHKSUM = "file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a"
6+
7+
DEPENDS = " \
8+
pipewire \
9+
alsa-lib \
10+
dbus \
11+
"
12+
13+
SRC_URI = "git://gitlab.freedesktop.org/pipewire/media-session.git;protocol=https;branch=master"
14+
15+
S = "${WORKDIR}/git"
16+
SRCREV = "e5d5cf2404786af8bcc40bdb8a2962bef4ec18b6"
17+
18+
inherit meson pkgconfig
19+
20+
FILES:${PN} += " \
21+
${systemd_user_unitdir}/pipewire-media-session.service \
22+
${datadir}/pipewire/media-session.d/* \
23+
"
24+
25+
RRECOMMENDS:${PN} += "pipewire"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
From 1a5ec4452fa21592eaeeb823ad95a1db6eb60376 Mon Sep 17 00:00:00 2001
2+
From: Wim Taymans <wtaymans@redhat.com>
3+
Date: Tue, 19 Jul 2022 13:49:42 +0200
4+
Subject: [PATCH 001/113] avb: fix compilation on big endian
5+
6+
Patch-Status: Backport
7+
8+
---
9+
src/modules/module-avb/aaf.h | 2 +-
10+
1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+
diff --git a/src/modules/module-avb/aaf.h b/src/modules/module-avb/aaf.h
13+
index cb4871ca6..b444ce251 100644
14+
--- a/src/modules/module-avb/aaf.h
15+
+++ b/src/modules/module-avb/aaf.h
16+
@@ -35,7 +35,7 @@ struct avb_packet_aaf {
17+
unsigned gv:1;
18+
unsigned tv:1;
19+
20+
- uint8_t seq_number;
21+
+ uint8_t seq_num;
22+
23+
unsigned _r2:7;
24+
unsigned tu:1;
25+
diff --git a/src/modules/module-avb/iec61883.h b/src/modules/module-avb/iec61883.h
26+
index d3b3a7daa..6ca8724ad 100644
27+
--- a/src/modules/module-avb/iec61883.h
28+
+++ b/src/modules/module-avb/iec61883.h
29+
@@ -37,7 +37,7 @@ struct avb_packet_iec61883 {
30+
unsigned gv:1;
31+
unsigned tv:1;
32+
33+
- uint8_t seq_number;
34+
+ uint8_t seq_num;
35+
36+
unsigned _r2:7;
37+
unsigned tu:1;
38+
diff --git a/spa/plugins/avb/avbtp/packets.h b/spa/plugins/avb/avbtp/packets.h
39+
index 7047456bf..3d4a652ee 100644
40+
--- a/spa/plugins/avb/avbtp/packets.h
41+
+++ b/spa/plugins/avb/avbtp/packets.h
42+
@@ -116,7 +116,7 @@ struct spa_avbtp_packet_aaf {
43+
unsigned gv:1;
44+
unsigned tv:1;
45+
46+
- uint8_t seq_number;
47+
+ uint8_t seq_num;
48+
49+
unsigned _r2:7;
50+
unsigned tu:1;
51+
--
52+
2.34.1
53+

meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-spa-fix-c90-header-include.patch

Lines changed: 0 additions & 47 deletions
This file was deleted.

meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.50.bb renamed to meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.56.bb

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ LIC_FILES_CHKSUM = " \
1313

1414
DEPENDS = "dbus ncurses"
1515

16-
SRCREV = "64cf5e80e6240284e6b757907b900507fe56f1b5"
16+
SRCREV = "f274e53d25ee8f483ac6fce9e516bb1830abe88b"
1717
SRC_URI = " \
1818
git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https \
19-
file://0001-spa-fix-c90-header-include.patch \
19+
file://0001-avb-fix-compilation-on-big-endian.patch \
2020
"
2121

2222
S = "${WORKDIR}/git"
@@ -62,7 +62,6 @@ EXTRA_OEMESON += " \
6262
-Dudevrulesdir=${nonarch_base_libdir}/udev/rules.d/ \
6363
-Dsystemd-system-unit-dir=${systemd_system_unitdir} \
6464
-Dsystemd-user-unit-dir=${systemd_user_unitdir} \
65-
-Dvulkan=disabled \
6665
-Dman=disabled \
6766
-Dsession-managers='[]' \
6867
-Dlv2=disabled \
@@ -72,30 +71,46 @@ EXTRA_OEMESON += " \
7271
-Dlegacy-rtkit=false \
7372
"
7473

75-
PACKAGECONFIG:class-target ??= "\
74+
# spa alsa plugin code uses typedef redefinition, which is officially a C11 feature.
75+
# Pipewire builds with 'c_std=gnu99' by default. Recent versions of gcc don't issue this warning in gnu99
76+
# mode but it looks like clang still does
77+
CFLAGS:append = " -Wno-typedef-redefinition"
78+
79+
# According to wireplumber documentation only one session manager should be installed at a time
80+
# Possible options are media-session, which has fewer dependencies but is very simple,
81+
# or wireplumber, which is more powerful.
82+
PIPEWIRE_SESSION_MANAGER ??= "media-session"
83+
84+
FFMPEG_AVAILABLE = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'ffmpeg', '', d)}"
85+
BLUETOOTH_AAC = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'bluez-aac', '', d)}"
86+
87+
PACKAGECONFIG:class-target ??= " \
7688
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
77-
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
78-
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service', '', d)} \
79-
${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)} \
80-
gstreamer jack libusb pw-cat raop sndfile v4l2 \
89+
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez ${BLUETOOTH_AAC}', '', d)} \
90+
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \
91+
${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \
92+
${PIPEWIRE_SESSION_MANAGER} \
93+
${FFMPEG_AVAILABLE} gstreamer jack libusb pw-cat raop sndfile v4l2 udev volume \
8194
"
8295

8396
# "jack" and "pipewire-jack" packageconfigs cannot be both enabled,
8497
# since "jack" imports libjack, and "pipewire-jack" generates
8598
# libjack.so* files, thus colliding with the libpack package. This
8699
# is why these two are marked in their respective packageconfigs
87100
# as being in conflict.
88-
PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev"
101+
PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev,,pipewire-alsa pipewire-alsa-card-profile"
89102
PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi"
90103
PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc"
91104
PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac"
92105
PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native graphviz-native"
93106
PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg"
94-
PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base"
107+
PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base,,gstreamer1.0-pipewire"
95108
PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack"
96-
PACKAGECONFIG[libcamera] = "-Dlibcamera=enabled,-Dlibcamera=disabled,libcamera"
109+
PACKAGECONFIG[libcamera] = "-Dlibcamera=enabled,-Dlibcamera=disabled,libcamera libdrm"
97110
PACKAGECONFIG[libcanberra] = "-Dlibcanberra=enabled,-Dlibcanberra=disabled,libcanberra"
98111
PACKAGECONFIG[libusb] = "-Dlibusb=enabled,-Dlibusb=disabled,libusb"
112+
PACKAGECONFIG[media-session] = ",,,pipewire-media-session"
113+
PACKAGECONFIG[pulseaudio] = "-Dlibpulse=enabled,-Dlibpulse=disabled,pulseaudio,,pipewire-pulse"
99114
PACKAGECONFIG[pipewire-alsa] = "-Dpipewire-alsa=enabled,-Dpipewire-alsa=disabled,alsa-lib"
100115
PACKAGECONFIG[pipewire-jack] = "-Dpipewire-jack=enabled -Dlibjack-path=${libdir}/${PW_MODULE_SUBDIR}/jack,-Dpipewire-jack=disabled,jack,,,jack"
101116
PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled"
@@ -109,8 +124,12 @@ PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsyst
109124
# currently lacks the feature of enabling user services.
110125
PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd"
111126
# pw-cat needs sndfile packageconfig to be enabled
127+
PACKAGECONFIG[udev] = "-Dudev=enabled,-Dudev=disabled,udev"
112128
PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev"
129+
PACKAGECONFIG[volume] = "-Dvolume=enabled,-Dvolume=disabled"
130+
PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-headers vulkan-loader"
113131
PACKAGECONFIG[webrtc-echo-cancelling] = "-Decho-cancel-webrtc=enabled,-Decho-cancel-webrtc=disabled,webrtc-audio-processing"
132+
PACKAGECONFIG[wireplumber] = ",,,wireplumber"
114133

115134
PACKAGESPLITFUNCS:prepend = " split_dynamic_packages "
116135
PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends "
@@ -227,10 +246,16 @@ PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*"
227246
SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}"
228247
CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf"
229248
FILES:${PN} = " \
230-
${datadir}/pipewire/pipewire.conf \
231-
${systemd_system_unitdir}/pipewire.* \
232-
${systemd_user_unitdir}/pipewire.* \
249+
${datadir}/pipewire \
250+
${systemd_system_unitdir}/pipewire* \
251+
${systemd_user_unitdir}/pipewire* \
233252
${bindir}/pipewire \
253+
${bindir}/pipewire-avb \
254+
"
255+
256+
RRECOMMENDS:${PN}:class-target += " \
257+
pipewire-modules-meta \
258+
pipewire-spa-plugins-meta \
234259
"
235260

236261
FILES:${PN}-dev += " \

0 commit comments

Comments
 (0)