Add opt-in software volume fallback for digital monitor audio by jodansi90 · Pull Request #1929 · MonitorControl/MonitorControl · GitHub
Skip to content

Add opt-in software volume fallback for digital monitor audio - #1929

Open
jodansi90 wants to merge 2 commits into
MonitorControl:mainfrom
jodansi90:software-volume-fallback
Open

jodansi90 wants to merge 2 commits into
MonitorControl:mainfrom
jodansi90:software-volume-fallback

Conversation

@jodansi90

@jodansi90 jodansi90 commented Oct 18, 2026 •

Copy link
Copy Markdown

Digital monitor outputs such as the Samsung Smart M80F can expose no writable CoreAudio volume and ignore DDC volume commands: the OSD moves, but the sound stays unchanged. This adds an opt-in software-volume fallback for the selected monitor output on macOS 15+, using a device-scoped CoreAudio process tap and a private aggregate device. It attenuates the audio signal, not the monitor’s internal volume.

The existing slider and multimedia volume/mute keys share one state and the existing OSD. Duplicate press notifications observed 2–4 ms apart are coalesced within 20 ms, so mute does not immediately toggle back and volume does not advance twice. Volume repeat and fine adjustment are preserved. The backend pauses on another output, releases resources on quit/sleep, and uses an idle-aware progress watchdog with bounded recovery.

The change is disabled by default, explains audio capture before opt-in, and is availability-gated without raising the existing deployment target. Brightness, slider layout, signing, application version and updater behavior are retained. No Logitech-specific reader, key remapping, driver or companion app is added. Vendored CoreAudioTapKit is MIT-licensed; its attribution and pinned revision are included in source and app resources. See implementation and testing notes.

Validation

  • Release build on Apple Silicon; an Intel Release build also passed during preparation. Xcode 27 requires a deployment-target override of 12.0 for these builds; the project’s older deployment settings are unchanged.
  • bash Tests/run-software-audio-tests.sh: gain bounds/NaN, stereo ramp to silence, duplicate media events, mute repeat, output matching, watchdog idle/stall/recovery.
  • The local prototype with the same audio backend worked on Apple Silicon/macOS 27.2 beta + Samsung Smart M80F DisplayPort audio + MX Keys Mini/Bolt: brightness, volume, mute/unmute and a fresh sign-out/sign-in were physically confirmed. The cleaned upstream integration is compiled and unit-tested separately; its availability facade and opt-in menu still need additional runtime review. Sleep/wake, hotplug, output switching and wider format/device coverage are not claimed as tested.

Related discussion: #1077, particularly #1077 (comment) . This PR offers a concrete implementation for maintainer review; architecture and broader support can be refined together.

Playback-key compatibility update

The dedicated volume interceptor now uses cgSessionEventTap instead of cgAnnotatedSessionEventTap. In the local Samsung prototype, this restored Spotify previous/next/play-pause keys while retaining software volume and mute; the user confirmed playback keys and volume worked together. Playback events are passed through unchanged, without Spotify-specific handling or key remapping. The cleaned PR integration was rebuilt for Apple Silicon and the software-audio test suite passed; the physical confirmation applies to the local prototype. Existing OSD and brightness behavior in this PR remain unchanged.

@waydabber waydabber added the AI contribution / fork recommendation Unplanned PR (typically AI) with improvements which may be of interest to the community label Oct 18, 2026

This branch has not been deployed

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

Labels

AI contribution / fork recommendation Unplanned PR (typically AI) with improvements which may be of interest to the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants