meta-agl: split wireplumber to run in multiple instances 62/26662/2
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Mon, 20 Sep 2021 11:29:45 +0000 (14:29 +0300)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 14 Oct 2021 15:21:16 +0000 (15:21 +0000)
commit1b0d65113b277610135b5599c8810ca7a4e3df4c
treec3579bbc0795fb8cb26c36505742edd84b383acb
parent3b7fb84007945e5b19c705b24179260cad05ba55
meta-agl: split wireplumber to run in multiple instances

The "IC SoundManager" design specifies that there needs to be
a session manager running in the host to manage devices and permissions,
but all the domain-specific policy and app management needs to run in
the IVI container, together with the apps. With this split, we are able
to achieve that.

In addition to the "host" and "policy" instances, we are also adding
a "bluetooth" one, which loads the bluetooth plugin and manages the
bluetooth device. This can be moved to the IVI container as well,
or elsewhere... it only depends on bluez (so it must run in the same
container as bluez).

For now, given the absence of an IVI container in the lxc-demo image,
all instances are running in the host, but it is trivial to move all
the non-host ones to another container later.

To compliment pipewire-ic-ipc, this change also adds an "alsa-suspend"
lua script that runs in the context of the "host" wireplumber instance
and its purpose is to mute pipewire-managed alsa devices when there is
a sound playing in the IC container (on another alsa device).

Finally, this change also adds V4L2 configuration in the "host" wireplumber
instance, which is still disabled (and untested), but you can easily enable
it for experimentation by uncommenting the relevant line in
host.lua.d/90-enable-all.lua

Bug-AGL: SPEC-4027
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: I9febc4f3919e7c559a5d7d32bfe7bc95c75934f2
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26662
Tested-by: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
Reviewed-by: Naoto YAMAGUCHI <naoto.yamaguchi@aisin.co.jp>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
13 files changed:
meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl_git.bbappend
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/99-load-modules.lua [deleted file]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/alsa-suspend.lua [new file with mode: 0644]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.conf [new file with mode: 0644]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/bluetooth.lua.d/30-bluez-monitor.lua [moved from meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-bluez-monitor.lua with 96% similarity]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-alsa-monitor.lua [moved from meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/30-alsa-monitor.lua with 100% similarity]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/30-v4l2-monitor.lua [new file with mode: 0644]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/40-device-defaults.lua [new file with mode: 0644]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/host.lua.d/90-enable-all.lua [new file with mode: 0644]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.conf [new file with mode: 0644]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/policy.lua.d/10-default-policy.lua [moved from meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/10-default-policy.lua with 64% similarity]
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl/wireplumber.conf
meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl_git.bb