Device: Fix call controls setting not applying on AirPods#510
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.0x20with 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.0x1Areplacing LibrePods'0x1E, which was also silently ignored).0x21decode branch as a forward-compat safety net, but the comment now warns against using it on writes.init { require(...) }toSetEndCallMuteMicso invalid combinations fail at construction, before the optimistic UI update inAapConnection.send()runs.