bluez5: fix Bluetooth LE audio regression

Backport a fix for a regression introduced in 5.84 which breaks Bluetooth LE audio

(From OE-Core rev: 2b675c5cbfcaa7a5918ddd4a13400be5be60b3e6)

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Guðni Már Gilbert 2025-09-29 04:33:52 +00:00 committed by Richard Purdie
parent bd486ce499
commit a68330f278
2 changed files with 30 additions and 0 deletions

View File

@ -64,6 +64,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
file://init \
file://run-ptest \
file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
file://0001-media-fix-pac_config_cb-error-code-return.patch \
"
S = "${UNPACKDIR}/bluez-${PV}"

View File

@ -0,0 +1,29 @@
From d7966dbb7bcf39f9615c906c47ef7ad895796756 Mon Sep 17 00:00:00 2001
From: Pauli Virtanen <pav@iki.fi>
Date: Thu, 18 Sep 2025 20:19:35 +0300
Subject: [PATCH] media: fix pac_config_cb() error code return
Fixes: a887b1a1b91f ("audio: Add support for specific error codes for A2DP configuration")
Upstream-Status: Backport [https://github.com/bluez/bluez/commit/6b0a08776ae44a9102d7c6875a77e83dc6a11a37]
Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
---
profiles/audio/media.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index 332f643bb..deb321e6c 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -1110,7 +1110,7 @@ static void pac_config_cb(struct media_endpoint *endpoint, void *ret, int size,
if (!transport)
return;
- data->cb(data->stream, error_code == 0 ? 0 : -EINVAL);
+ data->cb(data->stream, (error_code && *error_code == 0) ? 0 : -EINVAL);
}
static struct media_transport *pac_ucast_config(struct bt_bap_stream *stream,
--
2.43.0