Skip to content

RFC asha: Notify connection interval changes

Kyle Pepper linux-bluetooth 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 RFC Latest4 patches 1 replyIn review
  2. v5 RFC4 patches 2 repliesSuperseded
  3. v4 RFC4 patches 1 replySuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v3 RFC1 patch2 repliesSuperseded
v2 RFC posting 2/21 patch1 replySuperseded
v2 RFC posting 1/21 patch3 repliesSuperseded
v1 RFC1 patch1 replySuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4shared/asha: Unregister set members by objectsrc/shared/asha.c+24 -51 reply
2/4asha: Add connection interval STATUS helpersrc/shared/asha.c src/shared/asha.h+73 -00 replies
3/4asha: Notify observed connection intervalsprofiles/audio/asha.c+231 -00 replies
4/4unit: Test ASHA connection interval notifications.gitignore Makefile.am unit/test-asha-conn.c +2 more+1026 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [RFC PATCH BlueZ v6 0/4] asha: Notify connection interval changes

Report observed connection intervals to attached hearing aids.

Apply patches 1-4 in order: set lifetime fix, shared STATUS helper, profile observer, then tests. No out-of-tree dependency is required.

Changes since v5, addressing Copilot's review highlighted by Luiz:
- Recreate the set queue when an attached aid completes START after the only registered aid resets or is freed. Fold the fix into patch 1.
- Define _GNU_SOURCE before system headers in the observer test so older glibc headers declare asprintf. Fold the fix into patch 4.
- Cover successful START after reset/free of the only registered peer, in both directions, followed by reattachment and peer-state checks.
- Rebase onto BlueZ 79162c1089110c896cb48118c3f7eb0db1fa0f2b.

The set bug affects START's other-connected state. Interval STATUS uses the separate attached-aid queue. The header failure is reproducible with glibc 2.35's stdio.h; the unchanged test builds on this host's glibc 2.44.

The v5 bot run passed all 12 jobs, including TestFunctional. No v6 remote CI, native functional VM or hearing-aid validation is claimed.

The observer still reports only its last successful observation. Lost or preexisting events remain unknown until a supported event arrives; LE Enhanced Connection Complete v2 is not registered. Controller power-cycle cache behavior and the profile ownership of the raw observer remain open.

Previous v5 cover (this series replies to it):
https://lore.kernel.org/linux-bluetooth/[email protected]/
Review and CI:
https://github.com/bluez/bluez/pull/2911#pullrequestreview-6046633570

AI assistance: prior OpenCode work is retained; Codex prepared and tested the v6 fixes, regression cases and revision. Copilot identified both bugs.

Kyle Pepper (4):
shared/asha: Unregister set members by object
asha: Add connection interval STATUS helper
asha: Notify observed connection intervals
unit: Test ASHA connection interval notifications

 .gitignore                |   2 +
 Makefile.am               |  17 ++
 profiles/audio/asha.c     | 231 +++++++++++++++
 src/shared/asha.c         | 101 ++++++-
 src/shared/asha.h         |   1 +
 unit/test-asha-conn.c     | 579 ++++++++++++++++++++++++++++++++++++++
 unit/test-asha-conn.h     |  11 +
 unit/test-asha-interval.c | 417 +++++++++++++++++++++++++++
 8 files changed, 1354 insertions(+), 5 deletions(-)
 create mode 100644 unit/test-asha-conn.c
 create mode 100644 unit/test-asha-conn.h
 create mode 100644 unit/test-asha-interval.c

base-commit: 79162c1089110c896cb48118c3f7eb0db1fa0f2b

Signature · 1 line
2.56.1