* [PATCH BlueZ 1/2] adapter: Notify adapter drivers of settings changes
@ 2026-11-22 10:50 Simon Mikuda
2026-11-22 10:50 ` [PATCH BlueZ 2/2] media: Signal SupportedUUIDs when the adapter's ISO settings change Simon Mikuda
2026-11-22 18:54 ` [BlueZ,1/2] adapter: Notify adapter drivers of settings changes bluez.test.bot
0 siblings, 2 replies; 3+ messages in thread
From: Simon Mikuda @ 2026-11-22 10:50 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Simon Mikuda
Add a settings_changed callback to adapter drivers, called with the
MGMT_SETTING_* bits that changed whenever the adapter's current
settings change. The media driver needs it to follow the CIS and ISO
broadcast settings, which the kernel only sets once the controller is
up.
Assisted-by: Claude:claude-opus-5-5
---
src/adapter.c | 11 +++++++++++
src/adapter.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/src/adapter.c b/src/adapter.c
index 1439642cb..112312651 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -688,6 +688,17 @@ static void settings_changed(struct btd_adapter *adapter, uint32_t settings)
trigger_pairable_timeout(adapter);
}
+
+ if (changed_mask) {
+ GSList *l;
+
+ for (l = adapter->drivers; l; l = g_slist_next(l)) {
+ struct btd_adapter_driver *driver = l->data;
+
+ if (driver->settings_changed)
+ driver->settings_changed(adapter, changed_mask);
+ }
+ }
}
static void adapter_set_power_state(struct btd_adapter *adapter, uint32_t value)
diff --git a/src/adapter.h b/src/adapter.h
index 18e6eaa78..63016c8e1 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -134,6 +134,8 @@ struct btd_adapter_driver {
struct btd_device *device);
void (*device_resolved)(struct btd_adapter *adapter,
struct btd_device *device);
+ void (*settings_changed)(struct btd_adapter *adapter,
+ uint32_t changed);
/* Indicates the driver is experimental and shall only be registered
* when experimental has been enabled (see: main.conf:Experimental).
base-commit: 1adfe662efeff12997df9ddd0960dbd0de9c8ea7
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH BlueZ 2/2] media: Signal SupportedUUIDs when the adapter's ISO settings change
2026-11-22 10:50 [PATCH BlueZ 1/2] adapter: Notify adapter drivers of settings changes Simon Mikuda
@ 2026-11-22 10:50 ` Simon Mikuda
2026-11-22 18:54 ` [BlueZ,1/2] adapter: Notify adapter drivers of settings changes bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: Simon Mikuda @ 2026-11-22 10:50 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Simon Mikuda
Media1.SupportedUUIDs lists the LE Audio endpoints only when the
adapter has the CIS or ISO broadcast settings, which the kernel sets
once the controller is up. An adapter registered before that, such as
a USB controller that finishes loading its firmware after bluetoothd
started, first lists none, and no PropertiesChanged followed when the
settings came on. PipeWire then registered its A2DP endpoints only, and
the adapter had no LE Audio until PipeWire was restarted.
Signal SupportedUUIDs from the media driver's settings_changed callback
when a CIS or ISO broadcast setting changes.
Fixes: f2a29899297a ("media: Check adapter CIS support to add BAP in SupportedUUIDs")
Assisted-by: Claude:claude-opus-5-5
---
profiles/audio/a2dp.c | 1 +
profiles/audio/media.c | 22 ++++++++++++++++++++++
profiles/audio/media.h | 1 +
3 files changed, 24 insertions(+)
diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index 3b29ec204..3eb3e3bfd 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -3893,6 +3893,7 @@ static struct btd_adapter_driver media_driver = {
.name = "media",
.probe = media_server_probe,
.remove = media_server_remove,
+ .settings_changed = media_settings_changed,
};
static int a2dp_init(void)
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index 3433a7b6e..78eb0982f 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -3864,6 +3864,28 @@ int media_register(struct btd_adapter *btd_adapter)
return 0;
}
+void media_settings_changed(struct btd_adapter *btd_adapter, uint32_t changed)
+{
+ GSList *l;
+
+ if (!(changed & (MGMT_SETTING_CIS_CENTRAL | MGMT_SETTING_CIS_PERIPHERAL |
+ MGMT_SETTING_ISO_BROADCASTER |
+ MGMT_SETTING_ISO_SYNC_RECEIVER)))
+ return;
+
+ for (l = adapters; l; l = l->next) {
+ struct media_adapter *adapter = l->data;
+
+ if (adapter->btd_adapter == btd_adapter) {
+ g_dbus_emit_property_changed(btd_get_dbus_connection(),
+ adapter_get_path(btd_adapter),
+ MEDIA_INTERFACE,
+ "SupportedUUIDs");
+ return;
+ }
+ }
+}
+
void media_unregister(struct btd_adapter *btd_adapter)
{
GSList *l;
diff --git a/profiles/audio/media.h b/profiles/audio/media.h
index a84634fff..eb95a8b06 100644
--- a/profiles/audio/media.h
+++ b/profiles/audio/media.h
@@ -17,6 +17,7 @@ typedef void (*media_endpoint_cb_t) (struct media_endpoint *endpoint,
int media_register(struct btd_adapter *btd_adapter);
void media_unregister(struct btd_adapter *btd_adapter);
+void media_settings_changed(struct btd_adapter *btd_adapter, uint32_t changed);
#ifdef HAVE_A2DP
struct a2dp_sep *media_endpoint_get_sep(struct media_endpoint *endpoint);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ,1/2] adapter: Notify adapter drivers of settings changes
2026-11-22 10:50 [PATCH BlueZ 1/2] adapter: Notify adapter drivers of settings changes Simon Mikuda
2026-11-22 10:50 ` [PATCH BlueZ 2/2] media: Signal SupportedUUIDs when the adapter's ISO settings change Simon Mikuda
@ 2026-11-22 18:54 ` bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-11-22 18:54 UTC (permalink / raw)
To: linux-bluetooth, simon.mikuda
[-- Attachment #1: Type: text/plain, Size: 2009 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1218576/
---Test result---
Test Summary:
CheckPatch FAIL 0.74 seconds
GitLint PASS 0.47 seconds
BuildEll PASS 21.09 seconds
BluezMake PASS 320.55 seconds
MakeCheck PASS 3.66 seconds
MakeDistcheck PASS 152.04 seconds
CheckValgrind PASS 162.57 seconds
CheckSmatch PASS 328.49 seconds
bluezmakeextell PASS 101.93 seconds
TestFunctional PASS 1238.32 seconds
IncrementalBuild PASS 323.26 seconds
ScanBuild PASS 1218.48 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,2/2] media: Signal SupportedUUIDs when the adapter's ISO settings change
WARNING:LONG_LINE: line length of 81 exceeds 80 columns
#160: FILE: profiles/audio/media.c:3871:
+ if (!(changed & (MGMT_SETTING_CIS_CENTRAL | MGMT_SETTING_CIS_PERIPHERAL |
/home/runner/work/bluez/bluez/src/patch/15010056.patch total: 0 errors, 1 warnings, 42 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluez/bluez/src/patch/15010056.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
https://github.com/bluez/bluez/pull/2870
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-22 18:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 10:50 [PATCH BlueZ 1/2] adapter: Notify adapter drivers of settings changes Simon Mikuda
2026-11-22 10:50 ` [PATCH BlueZ 2/2] media: Signal SupportedUUIDs when the adapter's ISO settings change Simon Mikuda
2026-11-22 18:54 ` [BlueZ,1/2] adapter: Notify adapter drivers of settings changes bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox