aboutsummaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-06-11 11:33:59 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-06-21 13:52:03 +0000
commite17ac0809da83b63f7242b6ad91c00e377c7f96e (patch)
tree7efa18fe863e6e9c1b97afaf0c72d705a0da7c62 /meta-pipewire/recipes-multimedia
parent63a4f7d56af11891aa8ce6a2d0171e3727aaa7be (diff)
pipewire: update to pw 0.3.30 and wp 0.4.0
* The pipewire recipe has been synced with the upstream yocto one * WirePlumber configuration now has volume ducking enabled for navigation messages. This means that music will now duck when a navigation message plays instead of being corked. * PipeWire's default configuration now lives in /usr/share/pipewire, with the possibility to override it in /etc/pipewire. This allows resetting to upstream defaults by removing /etc/pipewire v2: add licenses to the layer to match the upstream recipe, adapt licenses of sub-packages v3: mark each package with the desired license instead of the mix v4: simplify the license output of the sub-packages Bug-AGL: SPEC-3844 Change-Id: I7a15ddb503d5b064f244c8a42a1aafb4caa1d46a Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com> Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26426 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account
Diffstat (limited to 'meta-pipewire/recipes-multimedia')
-rw-r--r--meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch33
-rw-r--r--meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-pipewiresink-release-manually-acquired-buffers-back-.patch52
-rw-r--r--meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb (renamed from meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.27.bb)48
-rw-r--r--meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bbappend (renamed from meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.27.bbappend)5
-rw-r--r--meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/00-spa-libs.lua10
-rw-r--r--meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/10-default-policy.lua18
-rw-r--r--meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/99-load-modules.lua7
-rw-r--r--meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf2
-rw-r--r--meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl_git.bb2
-rw-r--r--meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb5
10 files changed, 48 insertions, 134 deletions
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch
deleted file mode 100644
index a3bde14bc..000000000
--- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b86e5cabfae3ab354f350f8f7589b21a153a8a5d Mon Sep 17 00:00:00 2001
-From: George Kiagiadakis <george.kiagiadakis@collabora.com>
-Date: Mon, 10 May 2021 17:12:12 +0300
-Subject: pipewiresink: use all the available dest memory when copying buffer
-
-When pipewiresink needs to copy data, it has to resize the destination
-buffer (to a smaller size) in order to send the correct data size to
-pipewire. When this dest buffer is reused later, it will still have
-this smaller size as its total size and the copy may discard data
-from upstream if the new upstream buffer is bigger than the last one
-that was copied on the same dest buffer.
-
-Upstream-Status: Backport [from master/0.3.28]
----
- src/gst/gstpipewiresink.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/gst/gstpipewiresink.c b/src/gst/gstpipewiresink.c
-index 966b12c7..031b3ae0 100644
---- a/src/gst/gstpipewiresink.c
-+++ b/src/gst/gstpipewiresink.c
-@@ -616,7 +616,7 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
- goto done;
-
- gst_buffer_map (b, &info, GST_MAP_WRITE);
-- gst_buffer_extract (buffer, 0, info.data, info.size);
-+ gst_buffer_extract (buffer, 0, info.data, info.maxsize);
- gst_buffer_unmap (b, &info);
- gst_buffer_resize (b, 0, gst_buffer_get_size (buffer));
- buffer = b;
---
-2.30.2
-
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-pipewiresink-release-manually-acquired-buffers-back-.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-pipewiresink-release-manually-acquired-buffers-back-.patch
deleted file mode 100644
index aeafae616..000000000
--- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-pipewiresink-release-manually-acquired-buffers-back-.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 8911e22793ed3713ceb78be5414eeb03ebde962e Mon Sep 17 00:00:00 2001
-From: George Kiagiadakis <george.kiagiadakis@collabora.com>
-Date: Mon, 10 May 2021 17:25:57 +0300
-Subject: pipewiresink: release manually acquired buffers back to the pool
-
-When we manually acquire buffers from the pool, we never release them.
-But because gst_buffer_pool_acquire_buffer() adds a reference to the pool,
-this leaks the pool eventually.
-
-To fix this, just unref the buffer after it has been sent. This releases
-it back to the pool and unrefs the pool.
-
-This has no significant effect to the stream, since the underlying
-pw buffers are actually pooled in the pw_stream. It just prevents leaking.
-
-Upstream-Status: Backport [from master/0.3.28]
----
- src/gst/gstpipewiresink.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/gst/gstpipewiresink.c b/src/gst/gstpipewiresink.c
-index 031b3ae0..2f79a4f7 100644
---- a/src/gst/gstpipewiresink.c
-+++ b/src/gst/gstpipewiresink.c
-@@ -578,6 +578,7 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
- GstPipeWireSink *pwsink;
- GstFlowReturn res = GST_FLOW_OK;
- const char *error = NULL;
-+ gboolean unref_buffer = FALSE;
-
- pwsink = GST_PIPEWIRE_SINK (bsink);
-
-@@ -620,6 +621,7 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
- gst_buffer_unmap (b, &info);
- gst_buffer_resize (b, 0, gst_buffer_get_size (buffer));
- buffer = b;
-+ unref_buffer = TRUE;
-
- pw_thread_loop_lock (pwsink->core->loop);
- if (pw_stream_get_state (pwsink->stream, &error) != PW_STREAM_STATE_STREAMING)
-@@ -628,6 +630,8 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
-
- GST_DEBUG ("push buffer");
- do_send_buffer (pwsink, buffer);
-+ if (unref_buffer)
-+ gst_buffer_unref (buffer);
-
- done_unlock:
- pw_thread_loop_unlock (pwsink->core->loop);
---
-2.30.2
-
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.27.bb b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb
index 2757e9278..e52745a7d 100644
--- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.27.bb
+++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bb
@@ -11,15 +11,19 @@ DESCRIPTION = "Linux server for handling and routing audio and video streams bet
HOMEPAGE = "https://pipewire.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/pipewire/pipewire/issues"
LICENSE = "MIT"
+LICENSE_${PN}-jack = "GPL-2.0-only"
+LICENSE_${PN}-alsa-card-profile = "LGPL-2.1-or-later"
+LICENSE_${PN}-spa-plugins-alsa = "LGPL-2.1-or-later"
+
LIC_FILES_CHKSUM = " \
- file://LICENSE;md5=e2c0b7d86d04e716a3c4c9ab34260e69 \
+ file://LICENSE;md5=2158739e172e58dc9ab1bdd2d6ec9c72 \
file://COPYING;md5=97be96ca4fab23e9657ffa590b931c1a \
"
SECTION = "multimedia"
DEPENDS = "dbus"
-SRCREV = "e598d0a42227c9dfa79dcb7583c054c5b2ec072d"
+SRCREV = "e857856be7b64d562cdcc01c43933218a68b225e"
SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
@@ -38,14 +42,19 @@ USERADD_PARAM_${PN} = "--system --home / --no-create-home \
# For "EVL", look up https://evlproject.org/ . It involves
# a specially prepared kernel, and is currently unavailable
# in Yocto.
+#
# FFmpeg and Vulkan aren't really supported - at the current
# stage (version 0.3.22), these are just experiments, not
# actual features.
+#
# libcamera support currently does not build successfully.
+#
# systemd user service files are disabled because per-user
# PipeWire instances aren't really something that makes
# much sense in an embedded environment. A system-wide
# instance does.
+#
+# manpage generation requires xmltoman, which is not available.
EXTRA_OEMESON += " \
-Daudiotestsrc=enabled \
-Devl=disabled \
@@ -56,6 +65,7 @@ EXTRA_OEMESON += " \
-Dffmpeg=disabled \
-Dvulkan=disabled \
-Dlibcamera=disabled \
+ -Dman=disabled \
"
PACKAGECONFIG ??= "\
@@ -72,10 +82,9 @@ PACKAGECONFIG ??= "\
PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev"
PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc"
-PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen"
+PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native"
PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base"
PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack"
-PACKAGECONFIG[manpages] = "-Dman=enabled,-Dman=disabled,libxml-parser-perl-native"
PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,virtual/libsdl2"
PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=enabled ,-Dsystemd=disabled -Dsystemd-system-service=disabled,systemd"
@@ -94,7 +103,7 @@ remove_unused_installed_files() {
# 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}${sysconfdir}/pipewire/jack.conf"
+ rm -f "${D}${datadir}/pipewire/jack.conf"
fi
}
@@ -192,10 +201,11 @@ PACKAGES =+ "\
PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*"
SYSTEMD_SERVICE_${PN} = "pipewire.service"
-CONFFILES_${PN} += "${sysconfdir}/pipewire/pipewire.conf"
+CONFFILES_${PN} += "${datadir}/pipewire/pipewire.conf"
FILES_${PN} = " \
- ${sysconfdir}/pipewire/pipewire.conf \
- ${systemd_system_unitdir}/pipewire.* \
+ ${datadir}/pipewire/pipewire.conf \
+ ${datadir}/pipewire/filter-chain \
+ ${systemd_user_unitdir}/pipewire.* \
${bindir}/pipewire \
"
@@ -203,9 +213,9 @@ FILES_${PN}-dev += " \
${libdir}/${PW_MODULE_SUBDIR}/jack/libjack*.so \
"
-CONFFILES_libpipewire += "${sysconfdir}/pipewire/client.conf"
+CONFFILES_libpipewire += "${datadir}/pipewire/client.conf"
FILES_libpipewire = " \
- ${sysconfdir}/pipewire/client.conf \
+ ${datadir}/pipewire/client.conf \
${libdir}/libpipewire-*.so.* \
"
# Add the bare minimum modules and plugins required to be able
@@ -223,9 +233,11 @@ FILES_${PN}-tools = " \
# 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 += "${sysconfdir}/pipewire/pipewire-pulse.conf"
+CONFFILES_${PN}-pulse += "${datadir}/pipewire/pipewire-pulse.conf"
+
FILES_${PN}-pulse = " \
- ${sysconfdir}/pipewire/pipewire-pulse.conf \
+ ${datadir}/pipewire/pipewire-pulse.conf \
+ ${systemd_user_unitdir}/pipewire-pulse.* \
${bindir}/pipewire-pulse \
"
RDEPENDS_${PN}-pulse += " \
@@ -239,19 +251,19 @@ FILES_${PN}-alsa = "\
"
# jack drop-in libraries to redirect audio to pipewire
-CONFFILES_${PN}-jack = "${sysconfdir}/pipewire/jack.conf"
+CONFFILES_${PN}-jack = "${datadir}/pipewire/jack.conf"
FILES_${PN}-jack = "\
- ${sysconfdir}/pipewire/jack.conf \
+ ${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"
-CONFFILES_${PN}-media-session = "${sysconfdir}/pipewire/media-session.d/*"
FILES_${PN}-media-session = " \
${bindir}/pipewire-media-session \
+ ${datadir}/pipewire/media-session.d/* \
${systemd_system_unitdir}/pipewire-media-session.service \
- ${sysconfdir}/pipewire/media-session.d/* \
"
RPROVIDES_${PN}-media-session = "virtual/pipewire-sessionmanager"
@@ -267,9 +279,9 @@ FILES_${PN}-spa-tools = " \
FILES_${PN}-modules = ""
RRECOMMENDS_${PN}-modules += "${PN}-modules-meta"
-CONFFILES_${PN}-modules-rtkit = "${sysconfdir}/pipewire/client-rt.conf"
+CONFFILES_${PN}-modules-rtkit = "${datadir}/pipewire/client-rt.conf"
FILES_${PN}-modules-rtkit += " \
- ${sysconfdir}/pipewire/client-rt.conf \
+ ${datadir}/pipewire/client-rt.conf \
"
FILES_${PN}-alsa-card-profile = " \
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.27.bbappend b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bbappend
index 22700ae67..cc2308e95 100644
--- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.27.bbappend
+++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_0.3.30.bbappend
@@ -5,8 +5,3 @@ PACKAGECONFIG = "\
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
gstreamer v4l2 \
"
-
-SRC_URI += "\
- file://0001-pipewiresink-use-all-the-available-dest-memory-when-.patch \
- file://0002-pipewiresink-release-manually-acquired-buffers-back-.patch \
-"
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/00-spa-libs.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/00-spa-libs.lua
deleted file mode 100644
index f284b92e7..000000000
--- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/00-spa-libs.lua
+++ /dev/null
@@ -1,10 +0,0 @@
--- ["<factory-name regex>"] = "<library-name>"
---
--- used to find spa factory names. It maps a spa factory name
--- regular expression to a library name that should contain that factory.
---
-spa_libs = {
- ["api.alsa.*"] = "alsa/libspa-alsa",
- ["api.v4l2.*"] = "v4l2/libspa-v4l2",
- ["api.bluez5.*"] = "bluez5/libspa-bluez5",
-}
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/10-default-policy.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/10-default-policy.lua
index 3c04652f0..f71b31316 100644
--- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/10-default-policy.lua
+++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/10-default-policy.lua
@@ -2,12 +2,6 @@
default_policy = {}
-default_policy.sessions = {
- -- [session name] = { session properties }
- ["audio"] = { ["media.type"] = "Audio" },
- --["video"] = { ["media.type"] = "Video" },
-}
-
default_policy.endpoints = {
-- [endpoint name] = { endpoint properties }
@@ -49,6 +43,10 @@ default_policy.policy = {
["move"] = false, -- moves session items when metadata target.node changes
["follow"] = true, -- moves session items to the default device when it has changed
+ -- how much to lower the volume of lower priority streams when ducking
+ -- note that this is a linear volume modifier (not cubic as in the mixer)
+ ["duck.level"] = 0.2,
+
["roles"] = {
["Multimedia"] = {
["alias"] = { "Movie", "Music", "Game" },
@@ -67,7 +65,7 @@ default_policy.policy = {
},
["Navigation"] = {
["priority"] = 50,
- ["action.default"] = "cork",
+ ["action.default"] = "duck",
["action.Navigation"] = "mix",
},
["Speech-High"] = {
@@ -102,9 +100,11 @@ function default_policy.enable()
load_module("si-standard-link")
load_module("si-audio-endpoint")
- -- Create sessions statically at startup
- load_script("static-sessions.lua", default_policy.sessions)
+ -- API to access default nodes from scripts
+ load_module("default-nodes-api")
+ -- API to access mixer controls, needed for volume ducking
+ load_module("mixer-api")
-- Create endpoints statically at startup
load_script("static-endpoints.lua", default_policy.endpoints)
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/99-load-modules.lua b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/99-load-modules.lua
index 3e2c28a3a..70251aebe 100644
--- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/99-load-modules.lua
+++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/99-load-modules.lua
@@ -13,7 +13,12 @@ load_module("default-nodes", {
-- do not store runtime user changes in $HOME
["use-persistent-storage"] = false,
})
-load_module("default-nodes-api")
+
+-- Selects default routes on devices that advertise routes
+load_script("default-routes.lua", {
+ -- do not store runtime user changes in $HOME
+ ["use-persistent-storage"] = false,
+})
-- Automatically suspends idle nodes after 3 seconds
load_script("suspend-node.lua")
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf
index 6f9b0b186..530393e23 100644
--- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf
+++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf
@@ -3,7 +3,7 @@
context.properties = {
## Properties to configure the PipeWire context and some modules
- # 1=error/critical, 2=warning, 3=info, 4=debug, 5=trace
+ # 1=error/critical/warning, 2=message, 3=info, 4=debug, 5=trace
log.level = 2
wireplumber.script-engine = lua-scripting
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl_git.bb b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl_git.bb
index 86d77257d..2d70fc5e1 100644
--- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl_git.bb
+++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl_git.bb
@@ -7,7 +7,6 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "\
file://00-functions.lua \
- file://00-spa-libs.lua \
file://10-default-policy.lua \
file://30-alsa-monitor.lua \
file://30-bluez-monitor.lua \
@@ -25,7 +24,6 @@ do_install_append() {
install -d ${config_dir}
install -m 0644 ${WORKDIR}/00-functions.lua ${config_dir}
- install -m 0644 ${WORKDIR}/00-spa-libs.lua ${config_dir}
install -m 0644 ${WORKDIR}/10-default-policy.lua ${config_dir}
install -m 0644 ${WORKDIR}/30-alsa-monitor.lua ${config_dir}
install -m 0644 ${WORKDIR}/30-bluez-monitor.lua ${config_dir}
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb
index 56065db48..8daff3042 100644
--- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb
+++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_git.bb
@@ -14,10 +14,9 @@ DEPENDS = "glib-2.0 glib-2.0-native pipewire lua"
SRC_URI = "\
git://gitlab.freedesktop.org/pipewire/wireplumber.git;protocol=https;branch=master \
"
-SRCREV = "ecef960b7859b9b24885840453a3ddf4812845f2"
+SRCREV = "4af7e2bd68c4862bb707b62edf7557df56dad10f"
-#PV = "0.3.95+git${SRCPV}"
-PV = "0.3.95"
+PV = "0.4.0"
S = "${WORKDIR}/git"
WPAPI="0.4"