Detect Jabra Link headset power-off via HID - #34
Open
CamilleGuillory wants to merge 1 commit into
Open
Conversation
A Jabra Link USB dongle stays in the CoreAudio device list whether the wireless headset is on, off, or out of range, so powering the headset off emits no device-list change and the app is left with an active but silent input/output. Add JabraHIDMonitor: an IOHIDManager that gates on Jabra's vendor ID (0x0B0E) and watches the vendor-defined link-state element (usage page 0xFF30 / usage 0xFFFC; 1 = off, 0 = on). When the link drops, refreshDevices filters the Jabra device out so it reads as a disconnect and the existing priority path switches to the next device; when it comes back it reads as a reconnect. Fail-safe: if HID can't be opened or the element is absent (unknown dongle, denied Input Monitoring, older firmware) the headset is reported live, so behavior is unchanged from before.
Author
|
Hi @tobi , I know this particular PR is only a few days old, but I've noticed the repo overall hasn't seen much activity in a while, is the project still actively maintained? No rush on this one specifically, just trying to gauge whether there's a realistic chance of it (and other open PRs) getting reviewed at some point. Thanks for all the work that's gone into this! |
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.
Problem
A Jabra Link USB dongle stays in the CoreAudio device list whether the wireless headset is on, off, or out of range. Powering the headset off therefore emits no device-list change, so the app never re-evaluates priority and is left with an active-but-silent input/output until you manually switch.
Fix
Add
JabraHIDMonitor, anIOHIDManagerthat:0x0B0E(shared across GN Audio / Jabra devices).0xFF30/ usage0xFFFC;1= headset off,0= on), confirmed on a Link 380.refreshDevices()filters the Jabra device out so it reads as a disconnect and the existing priority path switches to the next device; on link-up it reads as a reconnect.Fail-safe
If HID can't be opened or the element is absent (unknown dongle, denied Input Monitoring, older firmware), the headset is reported live, so behavior is unchanged from today. No new entitlements; the app is already non-sandboxed.
Notes
AudioDevice.isJabramatches on the CoreAudio device name containing "Jabra"; the HID monitor itself gates on vendor ID. A dongle whose audio device name lacks "Jabra" wouldn't be filtered — happy to switch the match to vendor ID end-to-end if preferred.handleDeviceChange()rather than adding a parallel switching path.Testing
Built and run on macOS 26. Toggling a Link 380 headset off/on switches to the next-priority mic/output and back; custom mode still suppresses auto-switching.