Solaar/lib/logitech_receiver
Ken Sanislo 2e07b112ff G522 bug batch from log df178225
Five fixes from analysis of the latest user log:

A. HeadsetMicMute.build() now matches device.product_id as the hex
   string ("0B18", "0B19") rather than ints. product_id is set as a
   str by hidapi_impl.f"{pid:04X}", so the int comparison was always
   False and the suppression never fired. The G522 was still being
   asked to write mic-mute on each connect and erroring out 0x0A.

B. RGB-effects probe sub-device feature dump tolerates "unknown:HHHH"
   string features. _format_feature now detects that shape explicitly
   (and renders 0xHHHH from the suffix) instead of letting int(feat)
   raise ValueError mid-iteration and abort the whole table dump.

C. HeadsetActiveEQPreset.write replaces the bare `_value = None` cache
   invalidation with a synchronous read(cached=False) so _value is a
   real dict before returning. Prevents a UI band-click crash with
   'NoneType' object is not subscriptable when a user clicks an EQ
   band before the panel re-reads after a preset switch.

D. New probe_advanced_eq_slots() iterates every advertised slot via
   getCustomEQ at build time, logs which respond, and caches a list
   of (slot, name, bands) on device._advanced_eq_working_slots. The
   HeadsetActiveEQPreset selector builds choices only from working
   slots and returns None from build() if ≤1 slot responds — G522's
   firmware advertises 16 slots but only honors slot 0, so the user
   no longer sees a 16-option dropdown they can't actually use.
   HeadsetAdvancedEQ.build now reuses the same probe (cached) rather
   than the old probe_all_presets path. The legacy alias is kept in
   the hidpp20 facade for any external callers still on it.

E. (capture only — no parse change yet) get_advanced_eq_params and
   get_advanced_eq_defaults now log raw=<hex> on success too. The
   two functions decode the same slot to wildly different bands on
   G522 (likely a different header size between getCustomEQ's reply
   and getEQDefaults's reply); raw bytes will let us pin down the
   exact framing difference and adjust the parser in a follow-up.
   Fix path will land alongside docs/features.md notes documenting
   the per-call format variation, since other 0x020D headsets may
   diverge differently from G522.
2026-05-10 15:39:17 -07:00
..
__init__.py Refactor: Distinguish module from package 2024-09-15 09:18:51 -04:00
advanced_para_eq.py G522 bug batch from log df178225 2026-05-10 15:39:17 -07:00
base.py Tighten Centurion probe and silence FeaturesArray query spam 2026-05-10 15:39:17 -07:00
base_usb.py device: Support per-slot unpair on Lightspeed receivers (CLI + GUI) (#3183) 2026-04-17 09:34:58 -04:00
centurion.py Fix FeatureNotSupported crash on pending CenturionReceiver 2026-05-10 15:39:17 -07:00
centurion_constants.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
common.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
descriptors.py Add G522 LIGHTSPEED headset support (Centurion 0x50 transport variant) 2026-05-10 15:39:16 -07:00
desktop_notifications.py testing: upgrade desktop notifications tests to take notifications availability into account 2025-01-02 10:47:53 -05:00
device.py Audit diagnostic logging added during G522 bring-up 2026-05-10 15:39:17 -07:00
diversion.py rules: remove use of XTest and use uinput in all cases 2026-03-08 20:58:43 -04:00
exceptions.py Use double quotes for module level docstrings 2024-06-02 09:54:21 -04:00
headset_rgb.py Refactor G522 RGB to match keyboard/mouse LED Control pattern 2026-05-10 15:39:17 -07:00
hidpp10.py cli: Fix crash when showing notification flags. (#3070) 2025-12-12 04:54:10 -05:00
hidpp10_constants.py device: Handle composite IntFlag.name on Python < 3.11 (#3187) 2026-04-16 11:38:25 -04:00
hidpp20.py G522 bug batch from log df178225 2026-05-10 15:39:17 -07:00
hidpp20_constants.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
i18n.py Unify imports in logitech package 2024-05-23 16:42:18 -04:00
listener.py Add G522 LIGHTSPEED headset support (Centurion 0x50 transport variant) 2026-05-10 15:39:16 -07:00
logivoice.py LogiVoice: rewrite Parameters field tables and decode GetInfo bounds 2026-05-10 15:39:17 -07:00
notifications.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
onboard_eq.py Remove references to internal RE docs and lghub_agent from code comments 2026-05-10 15:39:17 -07:00
receiver.py device: Support per-slot unpair on Lightspeed receivers (CLI + GUI) (#3183) 2026-04-17 09:34:58 -04:00
rgb_effects_probe.py G522 bug batch from log df178225 2026-05-10 15:39:17 -07:00
settings.py Don't misreport empty-ACK writes as failed (Setting.write) 2026-05-10 15:39:17 -07:00
settings_new.py settings: add setting for HAPTIC feature 2025-11-12 14:50:46 -05:00
settings_templates.py G522 bug batch from log df178225 2026-05-10 15:39:17 -07:00
settings_validator.py Add per-key RGB color painter and replace MAP_CHOICE color validator 2026-05-10 17:52:55 -04:00
special_keys.py device: add special keys from Logitech 2025-10-16 20:57:15 -04:00