summaryrefslogtreecommitdiffstats
path: root/meta-agl-ic-container/recipes-multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-ic-container/recipes-multimedia')
-rw-r--r--meta-agl-ic-container/recipes-multimedia/pipewire-ic-ipc/pipewire-ic-ipc_git.bb37
-rw-r--r--meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber-policy-config-agl_git.bbappend8
-rw-r--r--meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber/0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch64
-rw-r--r--meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber_git.bbappend5
4 files changed, 114 insertions, 0 deletions
diff --git a/meta-agl-ic-container/recipes-multimedia/pipewire-ic-ipc/pipewire-ic-ipc_git.bb b/meta-agl-ic-container/recipes-multimedia/pipewire-ic-ipc/pipewire-ic-ipc_git.bb
new file mode 100644
index 00000000..27f6bfc5
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/pipewire-ic-ipc/pipewire-ic-ipc_git.bb
@@ -0,0 +1,37 @@
+SUMMARY = "PipeWire AGL Instrument Cluster IPC"
+AUTHOR = "George Kiagiadakis <george.kiagiadakis@collabora.com>"
+SECTION = "multimedia"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=3;md5=e8ad01a5182f2c1b3a2640e9ea268264"
+
+PV = "0.1+git${SRCPV}"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/pipewire-ic-ipc.git;protocol=https;branch=${AGL_BRANCH}"
+SRCREV = "f93f9cda5d8a380bc8846b5de3fc24613466adf3"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig systemd
+
+# build the server on the host
+PACKAGECONFIG = "\
+ server \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+"
+# only the example client in the guest
+PACKAGECONFIG:aglcontainerguest = "client"
+
+# systemd integration for the server-side component
+PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd"
+# server-side component
+PACKAGECONFIG[server] = "-Dserver=true,-Dserver=false,pipewire"
+# example client; not needed if you use the icipc library in your IC applciation
+PACKAGECONFIG[client] = "-Dclient=true,-Dclient=false,"
+
+# server-side systemd service
+SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'pipewire-ic-ipc.service', '', d)}"
+
+FILES:${PN} += "\
+ ${datadir}/pipewire/* \
+ ${libdir}/pipewire-0.3/* \
+"
diff --git a/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber-policy-config-agl_git.bbappend b/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber-policy-config-agl_git.bbappend
new file mode 100644
index 00000000..fe6dab86
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber-policy-config-agl_git.bbappend
@@ -0,0 +1,8 @@
+do_install:append() {
+ config_dir="${D}${sysconfdir}/wireplumber/"
+ systemd_dir="${D}${sysconfdir}/systemd/system/sockets.target.wants"
+
+ # enable additional systemd services
+ install -d ${systemd_dir}
+ ln -s ${systemd_system_unitdir}/wireplumber@.service ${systemd_dir}/wireplumber@policy.service
+}
diff --git a/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber/0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch b/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber/0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch
new file mode 100644
index 00000000..0da0bfb6
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber/0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch
@@ -0,0 +1,64 @@
+From a2d324c75057f0ddd66cbe5b5e419fddda213cc2 Mon Sep 17 00:00:00 2001
+From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
+Date: Mon, 28 Feb 2022 06:46:19 +0530
+Subject: [PATCH] systemd: changes to run wireplumber instances in containers
+
+- remove the pipewire daemon dependencies so that
+only wireplumber policy daemon can run in containers.
+- remove pipewire user
+---
+ src/systemd/system/wireplumber@.service.in | 8 +++-----
+ src/systemd/user/wireplumber@.service.in | 5 ++---
+ 2 files changed, 5 insertions(+), 8 deletions(-)
+
+ Inappropriate [configuration]
+
+diff --git a/src/systemd/system/wireplumber@.service.in b/src/systemd/system/wireplumber@.service.in
+index ba8eefe..e4b985b 100644
+--- a/src/systemd/system/wireplumber@.service.in
++++ b/src/systemd/system/wireplumber@.service.in
+@@ -5,8 +5,7 @@
+ # wireplumber@policy.service loads policy.conf, etc.
+ [Unit]
+ Description=Multimedia Service Session Manager (%i)
+-After=pipewire.service
+-BindsTo=pipewire.service
++After=sockets.target
+ Conflicts=pipewire-media-session.service
+
+ [Service]
+@@ -19,9 +18,8 @@ SystemCallFilter=@system-service
+ Type=simple
+ ExecStart=@WP_BINARY@ -c %i.conf
+ Restart=on-failure
+-User=pipewire
+-Environment=PIPEWIRE_RUNTIME_DIR=%t/pipewire
++Environment=PIPEWIRE_RUNTIME_DIR=/var
+ Environment=GIO_USE_VFS=local
+
+ [Install]
+-WantedBy=pipewire.service
++WantedBy=multi-user.target
+diff --git a/src/systemd/user/wireplumber@.service.in b/src/systemd/user/wireplumber@.service.in
+index 9dbceff..7e21194 100644
+--- a/src/systemd/user/wireplumber@.service.in
++++ b/src/systemd/user/wireplumber@.service.in
+@@ -5,8 +5,7 @@
+ # wireplumber@policy.service loads policy.conf, etc.
+ [Unit]
+ Description=Multimedia Service Session Manager (%i)
+-After=pipewire.service
+-BindsTo=pipewire.service
++After=sockets.target
+ Conflicts=pipewire-media-session.service
+
+ [Service]
+@@ -23,4 +22,4 @@ Slice=session.slice
+ Environment=GIO_USE_VFS=local
+
+ [Install]
+-WantedBy=pipewire.service
++WantedBy=multi-user.target
+--
+2.35.1
+
diff --git a/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber_git.bbappend b/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber_git.bbappend
new file mode 100644
index 00000000..56f03a4c
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber_git.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/wireplumber:"
+
+SRC_URI += "\
+ file://0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch \
+"