Skip to content

Detect Jabra Link headset power-off via HID - #34

Open
CamilleGuillory wants to merge 1 commit into
tobi:mainfrom
CamilleGuillory:feature/jabra-headset-detection
Open

Detect Jabra Link headset power-off via HID#34
CamilleGuillory wants to merge 1 commit into
tobi:mainfrom
CamilleGuillory:feature/jabra-headset-detection

Conversation

@CamilleGuillory

Copy link
Copy Markdown

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, an IOHIDManager that:

  • Gates on Jabra's USB vendor ID 0x0B0E (shared across GN Audio / Jabra devices).
  • Watches the vendor-defined link-state element (usage page 0xFF30 / usage 0xFFFC; 1 = headset off, 0 = on), confirmed on a Link 380.
  • On a link drop, 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.isJabra matches 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.
  • Reuses 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.

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.
@CamilleGuillory

Copy link
Copy Markdown
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant