Repository navigation
Maintain Sennheiser GAIA battery and noise integration - #125
Draft
silverpoetry wants to merge 6 commits into
Draft
silverpoetry wants to merge 6 commits into
silverpoetry wants to merge 6 commits into
Conversation
Implement the Qualcomm GAIA V3 subset needed for MiLink integration: - SennheiserGaiaWireCodec: 8-byte big-endian framing, streaming reader with resynchronisation, battery / combined noise mode / toggle parsing. - SennheiserEarbudAdapter: family adapter, three model configs and two noise dialects. MOMENTUM 4 uses combined modes (0x1A00 / 0x1A01) and offers four states including anti-wind; ACCENTUM and ACCENTUM True Wireless use the independent 0x1A04 / 0x1804 switch pair and offer three states. - Private capabilities stay locked until a valid GAIA response arrives. - MiLink anti-wind card for MOMENTUM 4, plus the Sennheiser Smart Control entry in the control app catalog and all four LSPosed scopes. The RFCOMM endpoint is resolved from the SDP UUID a2129ff3-081b-4c45-8afe-469d9c4842ec; no channel number is hardcoded because channel 14 carries iAP2 and a GAIA frame there powers the headset off. MOMENTUM 4 is hardware-verified on 2026-11-02: exact match, headphone form factor, private channel, protocol confirmation, private aggregate battery and all four noise states. ACCENTUM remains reference-protocol pending hardware. 44 new unit tests cover framing, parsing, mode projection, write sequences and capability gating.
The noise layer only wrote the 0x1A00 sub-mode table and never touched the ANC master switch (0x1A04), so "off" and "transparency" both landed on "master switch on, no sub-selector active" -- the headset pass-through state -- and were indistinguishable to the listener. 0x1A00 is not the master switch: it tunes anti-wind (1), comfort (2) and adaptive (3) on top of it, and writing it always ends transparent hearing and resets the level. Drive 0x1A04 / 0x1804 directly instead: - off -> 1A04 [00] alone; transparent hearing stays formally on but has no effect without ANC, and switching it off would discard the level - anc -> 1A04 [01], 1804 [00] - th -> 1A04 [01], 1804 [01] (ANC first: switching ANC on ends TH) - wind -> 1A04 [01], 1804 [00], 1A00 [01 02] Projection now reads the two switches plus the anti-wind selector, and the mode table no longer claims selector 2 is transparency -- it is comfort. Both dialects share the same readback and notification set. Covered by 24 adapter tests including the previously untested off path.
The first round of hardware testing found two regressions: every mode switch played two confirmation chimes, and the four states flickered through modes the user never selected. The write path built a fixed frame list that ignored the observed state, so each switch resent frames whose value was already correct. Every accepted write is answered by the headset with a chime, and every write also pushes its own notification, which is how the intermediate states leaked into the snapshot. Writes are now computed as a diff against the observed master switches and the cached anti-wind selector, so a frame is only sent when it actually changes the device. The anti-wind selector is cleared when entering ANC, because nothing else clears it, and the protocol reset now drops the cached selector as well. Reports that disagree with a pending request are held behind a bounded delay ladder (150/300/500 ms) instead of being published, while the requested mode is published optimistically right after the write. Device-initiated reports pass through untouched. The state query no longer re-registers notifications on every poll: it re-reads the three noise commands only.
The changelog described the master-switch rework but not the write minimisation and the intermediate-report suppression that followed the second round of hardware testing.
8 of 9 tasks
Owner
Author
|
@ErodeNine 跟进一下 #125 的最终维护包 方便时请基于上面提供的最终签名包确认电量、三态互切(尤其关闭与通透)、实际效果与回读、重连,以及厂商 App 退出后的恢复。开启详细日志并导出一次测试记录即可。如果已经测试但遇到问题,也可以直接补充现象与日志,我们继续在这个分支处理。谢谢! |
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.
本维护版
基于 #122,保留 ErodeNine 的全部原始提交并同步当前 main。范围为整机电量、核心噪声模式、既有抗风噪卡片扩展与 Smart Control 导航/退避。
验证
定向 codec、Adapter、控制 App、继承与卡片注册测试通过;Markdown、链接及 32 项控制 App 目录一致性检查通过。最终提交
b1244027dd731ae83615689494777cbdcb74cfd4的 CI 与签名构建均通过。下载官方签名维护包(登录 GitHub 后下载 ZIP,解压 APK);构建记录。APK SHA-256:
ebc4016bc1a96cf92705fbdeca1d06fc9f85a1381bc8613564ab808254196334,证书与正式版一致。原 PR 的 MOMENTUM 4 实测已保留。维护版改变了协议确认及模式行为,需以最终签名包复核关闭后通透、四态互切、卡片回读、重连、Smart Control 跳转与退避恢复;ACCENTUM 两款仍按参考协议记录。
等待最终实机复核期间,本 PR 保持 Draft,原 #122 保持开放,不提前合入。