From 0bb66d3d1abd7d25b840d535c03b1b9613727d5c Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 16 Aug 2025 11:56:53 +0300 Subject: [PATCH] transport: fix A2DP Delay values missing from DBus With headsets, a2dp_transport::session == NULL usually until stream resumes. During this time, delay_reporting_exists() incorrectly returns FALSE, because streams corresponding to NULL session cannot be found. As no further "Delay" property updates will usually arrive, the property remains missing even though delay reports have been received. Fix by setting a2dp->session when processing a delay report, if missing. Log (bluetoothctl): [NEW] Transport /org/bluez/hci1/dev_XX_XX_XX_XX_XX_XX/sep2/fd1 [CHG] Transport /org/bluez/hci1/dev_XX_XX_XX_XX_XX_XX/sep2/fd1 Delay is nil --- profiles/audio/transport.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 2b9832a76..ab149bcd7 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -2649,6 +2649,9 @@ void media_transport_update_delay(struct media_transport *transport, if (a2dp->delay == delay) return; + if (a2dp->session == NULL) + a2dp->session = a2dp_avdtp_get(transport->device); + a2dp->delay = delay; g_dbus_emit_property_changed(btd_get_dbus_connection(), -- 2.47.3