Skip to content

Device: Fix call controls setting not applying on AirPods#510

Merged
d4rken merged 1 commit intomainfrom
fix/call-controls-aap-compact-write
Apr 14, 2026
Merged

Device: Fix call controls setting not applying on AirPods#510
d4rken merged 1 commit intomainfrom
fix/call-controls-aap-compact-write

Conversation

@d4rken
Copy link
Copy Markdown
Member

@d4rken d4rken commented Apr 14, 2026

What changed

Toggling the "Call Controls" option in device settings (single press = end call vs. mute mic) had no effect on AirPods. Changing the option now takes effect immediately and persists across reconnects.

Technical Context

  • Root cause: the setting write was encoded with subtype 0x21 (LibrePods/MagicPodsCore "standard" format), but no real device has ever been captured emitting that subtype — Pro Gen 1, Pro 2 USB-C, and Pro 3 all use the compact format (0x20/0x00). Firmware silently dropped the unknown frame and re-emitted the unchanged state, matching the bug-report log exactly.
  • Switched the encoder to compact 0x20 with the single-byte combined mapping that mirrors the existing decoder's compact branch. Verified on Pro 3: echoes now reflect the new value within ~50 ms.
  • Same pattern as the rename fix in this file (opcode 0x1A replacing LibrePods' 0x1E, which was also silently ignored).
  • Kept the 0x21 decode branch as a forward-compat safety net, but the comment now warns against using it on writes.
  • Added init { require(...) } to SetEndCallMuteMic so invalid combinations fail at construction, before the optimistic UI update in AapConnection.send() runs.
  • Write path is untested on Pro 2 (Lightning) and AirPods 4 ANC (no session captures); read-side captures for those models are consistent with compact format, so risk is low.

Real AirPod firmware silently drops writes with the LibrePods-documented 0x21 subtype. Switch to the compact 0x20 format that matches what devices actually emit in their echo frames. Also enforce the complementary-pair invariant at the SetEndCallMuteMic command boundary so validation runs before the optimistic UI update.
@d4rken d4rken merged commit f3b5409 into main Apr 14, 2026
10 checks passed
@d4rken d4rken deleted the fix/call-controls-aap-compact-write branch April 14, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant