From: Simon Mikuda <simon.mikuda@streamunlimited.com>
To: linux-bluetooth@vger.kernel.org
Cc: Simon Mikuda <simon.mikuda@streamunlimited.com>
Subject: [PATCH BlueZ 1/2] adapter: Notify adapter drivers of settings changes
Date: Sun, 22 Nov 2026 11:50:25 +0100 [thread overview]
Message-ID: <20261122105026.753191-1-simon.mikuda@streamunlimited.com> (raw)
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
next reply other threads:[~2026-11-22 10:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 10:50 Simon Mikuda [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261122105026.753191-1-simon.mikuda@streamunlimited.com \
--to=simon.mikuda@streamunlimited.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox