Solaar/lib
Ken Sanislo 299dc4daab HeadsetMicGain: query device-reported gain bounds from GetInfo
Per newly-documented HEADSET_MIC_WIRE_PROTOCOL.md, feature 0x0611
returns device-specific NACK 0x0B when SetMicGain is written with a
value outside the device's supported range. LGHUB calls GetInfo
(function 0) once at startup to cache (min_gain, max_gain) as two
signed int8 bytes, then rescales subsequent writes into that range.

Solaar was using int8's full range (-128..127) as validator bounds
and accepting any UI value — which goes out-of-range on devices with
narrow ranges like the G522 (current gain is 8, suggesting small
range). Every gain change attempt NACK'd with 0x0B.

Fix: add HeadsetMicGain.build() that queries GetInfo at probe time,
parses the two-byte [min, max] response as signed int8, and hands
those to the RangeValidator. Falls back to the int8 default range
if GetInfo is unavailable or returns nonsense. Logs the reported
range at INFO so testers can verify in the log.

Does NOT address mic-mute NACK 0x0A — per the same doc that's the
hardware mic-flip boom position locking software mute on the G522,
and there's nothing software can do about it.
2026-05-10 15:39:17 -07:00
..
hid_parser Fix duplicate class field typo in HID parser data 2026-05-05 14:43:03 -04:00
hidapi Add G522 LIGHTSPEED headset support (Centurion 0x50 transport variant) 2026-05-10 15:39:16 -07:00
keysyms keysymdef: Rename key symbols 2024-10-11 07:42:38 -04:00
logitech_receiver HeadsetMicGain: query device-reported gain bounds from GetInfo 2026-05-10 15:39:17 -07:00
solaar Fix G522 0x50 Centurion init failure and protocol version crash 2026-05-10 15:39:17 -07:00