--- /dev/null
+SUMMARY = "PipeWire Media Server Base"
+DESCRIPTION = "The set of packages required to use PipeWire API in AGL"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+ packagegroup-pipewire-base \
+ "
+
+RDEPENDS:${PN} += "\
+ pipewire-spa-plugins-meta \
+ pipewire-modules-meta \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'pipewire-tools pipewire-spa-tools alsa-utils', '', d)} \
+ pipewire-alsa \
+"
SRC_URI = "\
file://bluetooth.lua.d/ \
file://host.lua.d/ \
- file://policy.lua.d \
file://00-functions.lua \
file://alsa-suspend.lua \
file://bluetooth.conf \
- file://policy.conf \
file://wireplumber.conf \
file://wireplumber-bluetooth.conf \
"
install -m 0644 ${WORKDIR}/host.lua.d/*.lua ${config_dir}/host.lua.d/
install -m 0644 ${WORKDIR}/wireplumber.conf ${config_dir}
- # config of the policy instance
- install -d ${config_dir}/policy.lua.d/
- ln -s ../00-functions.lua ${config_dir}/policy.lua.d/00-functions.lua
- install -m 0644 ${WORKDIR}/policy.lua.d/*.lua ${config_dir}/policy.lua.d/
- install -m 0644 ${WORKDIR}/policy.conf ${config_dir}
-
# config of the bluetooth instance
install -d ${config_dir}/bluetooth.lua.d/
ln -s ../00-functions.lua ${config_dir}/bluetooth.lua.d/00-functions.lua
# enable additional systemd services
install -d ${systemd_dir}
- ln -s ${systemd_system_unitdir}/wireplumber@.service ${systemd_dir}/wireplumber@policy.service
ln -s ${systemd_system_unitdir}/wireplumber@.service ${systemd_dir}/wireplumber@bluetooth.service
}
CONFFILES:${PN} += "\
${sysconfdir}/* \
"
-RPROVIDES:${PN} += "virtual/wireplumber-config"
--- /dev/null
+components = {}
+
+function load_module(m)
+ if not components[m] then
+ components[m] = { "libwireplumber-module-" .. m, type = "module" }
+ end
+end
+
+function load_pw_module(m)
+ if not components[m] then
+ components[m] = { "libpipewire-module-" .. m, type = "pw_module" }
+ end
+end
+
+function load_script(s, a)
+ if not components[s] then
+ components[s] = { s, type = "script/lua", args = a }
+ end
+end
+
+function load_monitor(s, a)
+ load_script("monitors/" .. s .. ".lua", a)
+end
+
+function load_access(s, a)
+ load_script("access/access-" .. s .. ".lua", a)
+end
--- /dev/null
+SUMMARY = "AGL configuration file for wireplumber policy"
+HOMEPAGE = "https://gitlab.freedesktop.org/gkiagia/wireplumber"
+BUGTRACKER = "https://jira.automotivelinux.org"
+AUTHOR = "Ashok Sidipotu <ashok.sidipotu@collabora.com>"
+SECTION = "multimedia"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+SRC_URI = "\
+ file://policy.lua.d \
+ file://00-functions.lua \
+ file://policy.conf \
+"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_install:append() {
+ config_dir="${D}${sysconfdir}/wireplumber/"
+ systemd_dir="${D}${sysconfdir}/systemd/system/pipewire.service.wants"
+
+ install -d ${config_dir}
+ install -m 0644 ${WORKDIR}/00-functions.lua ${config_dir}
+
+ # config of the policy instance
+ install -d ${config_dir}/policy.lua.d/
+ ln -s ../00-functions.lua ${config_dir}/policy.lua.d/00-functions.lua
+ install -m 0644 ${WORKDIR}/policy.lua.d/*.lua ${config_dir}/policy.lua.d/
+ install -m 0644 ${WORKDIR}/policy.conf ${config_dir}
+
+ # enable additional systemd services
+ install -d ${systemd_dir}
+ ln -s ${systemd_system_unitdir}/wireplumber@.service ${systemd_dir}/wireplumber@policy.service
+}
+
+FILES:${PN} += "\
+ ${sysconfdir}/* \
+ ${datadir}/wireplumber/* \
+"
+CONFFILES:${PN} += "\
+ ${sysconfdir}/* \
+"
--- /dev/null
+From 61dcf8b203f26a7c25ffaccdfdd94c233c0440e9 Mon Sep 17 00:00:00 2001
+From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
+Date: Wed, 2 Mar 2022 06:55:37 +0530
+Subject: [PATCH] policy-endpoint-device: Fix endpoints not connected with
+ devices
+
+-if device linkables are created ahead of the endpoints,
+ endpoints are not connected with the devices.
+
+-rescan the endpoints on an endpoint creation.
+---
+ src/scripts/policy-endpoint-device.lua | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+ Upstream-Status: Submitted [https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/337]
+
+diff --git a/src/scripts/policy-endpoint-device.lua b/src/scripts/policy-endpoint-device.lua
+index c9c6ceb..0ba39b0 100644
+--- a/src/scripts/policy-endpoint-device.lua
++++ b/src/scripts/policy-endpoint-device.lua
+@@ -221,6 +221,10 @@ linkables_om:connect("objects-changed", function (om)
+ scheduleRescan ()
+ end)
+
++endpoints_om:connect("object-added", function (om)
++ scheduleRescan ()
++end)
++
+ linkables_om:connect("object-removed", function (om, si)
+ unhandleLinkable (si)
+ end)
+--
+2.35.1
+
file://0001-Revert-tests-add-pipewire-env-variables-when-running.patch \
file://0002-Revert-wp-uninstalled-build-this-script-with-the-mes.patch \
file://0003-spa-json-fix-va_list-APIs-for-different-architecture.patch \
+ file://0004-policy-endpoint-device-Fix-endpoints-not-connected-w.patch \
"
PV = "0.4.8"
${systemd_system_unitdir}/* \
"
RPROVIDES:${PN} += "virtual/pipewire-sessionmanager"
-RDEPENDS:${PN} += "virtual/wireplumber-config"
FILES:lib${PN}-${WPAPI} = "\
${libdir}/libwireplumber-${WPAPI}.so.* \
${datadir}/wireplumber/bluetooth.lua.d/* \
${datadir}/wireplumber/policy.lua.d/* \
"
-CONFFILES:${PN}-config += "\
- ${sysconfdir}/wireplumber/* \
-"
-RPROVIDES:${PN}-config += "virtual/wireplumber-config"
+do_install:append() {
+ rm -rf ${D}${sysconfdir}/wireplumber/
+ rm -f ${D}${datadir}/wireplumber/*conf
+ rm -rf ${D}${datadir}/wireplumber/common
+ rm -rf ${D}${datadir}/wireplumber/main.lua.d
+ rm -rf ${D}${datadir}/wireplumber/bluetooth.lua.d
+ rm -rf ${D}${datadir}/wireplumber/policy.lua.d
+}