diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2024-12-13 12:03:52 +0200 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2024-12-16 17:06:16 +0000 |
commit | 993439c93ac10f799bbacf4dcf286b5ce7fd2bfa (patch) | |
tree | a0553e90717547b0d8a136d30f4b55e97550d6e3 | |
parent | b4ceb8545fc0f62984fca6c0db38eb0d7cad37f9 (diff) |
wireplumber: fix audio randomly not working at boot timericefish_18.0.3ricefish/18.0.318.0.3ricefish
This issue is caused by a race condition that triggers some links to be
created and then destroyed very fast, but at a certain point where the
managing object (si-standard-link) is not fully configured yet. At that
point, droping the ref count of the si-standard-link doesn't destroy it
and the links remain dangling, causing a loop in the graph that prevents
audio from working properly.
This patch mitigates the issue by forcing si-standard-link to reset to
its initial state, forcing the pipewire links to be destroyed. This does
not, however, prevent the potential leak of the si-standard-link.
A better solution is being worked on for upstreaming.
Bug-AGL: SPEC-5244
Change-Id: I61477c0c021351903239d58fff0217e25e08db02
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/30658
ci-image-boot-test: Jenkins Job builder account
Tested-by: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
-rw-r--r-- | meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-linking-reset-link-when-moving-target.patch | 30 | ||||
-rw-r--r-- | meta-pipewire/recipes-multimedia/wireplumber/wireplumber_%.bbappend | 6 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-linking-reset-link-when-moving-target.patch b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-linking-reset-link-when-moving-target.patch new file mode 100644 index 000000000..690d3de1f --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0001-linking-reset-link-when-moving-target.patch @@ -0,0 +1,30 @@ +From 658e9bbe4daee17844cd5b5bf5014bca9ec76ba4 Mon Sep 17 00:00:00 2001 +From: George Kiagiadakis <george.kiagiadakis@collabora.com> +Date: Fri, 13 Dec 2024 11:58:24 +0200 +Subject: [PATCH] linking: reset link when moving target + +This ensures that the real pipewire links will be +destroyed, since the link may not be fully activated yet. +This fix is not entirely correct, because it will likely +leak the si-standard-link, but it will get audio working. + +Upstream-Status: Inappropriate [not entirely correct] +--- + src/scripts/linking/prepare-link.lua | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/scripts/linking/prepare-link.lua b/src/scripts/linking/prepare-link.lua +index 69da939c..38fee98f 100644 +--- a/src/scripts/linking/prepare-link.lua ++++ b/src/scripts/linking/prepare-link.lua +@@ -57,6 +57,7 @@ SimpleEventHook { + log:warning (link, "Link was not activated before removing") + end + si_flags.peer_id = nil ++ link:reset () + link:remove () + log:info (si, "... moving to new target") + end +-- +2.45.2 + diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_%.bbappend b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_%.bbappend index 16d3817cd..bf71dc3c3 100644 --- a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_%.bbappend +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber_%.bbappend @@ -1,3 +1,9 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0001-linking-reset-link-when-moving-target.patch \ +" + do_install:append() { systemd_dir="${D}${sysconfdir}/systemd/system/" |