Skip to content

apple: allow sound input and output to be enabled separately - #7902

Merged
osy merged 1 commit into
mainfrom
feature/apple-audio-input
Sep 22, 2026
Merged

osy merged 1 commit into
mainfrom
feature/apple-audio-input

Conversation

@osy

@osy osy commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Since #7692 merged the Apple backend's sound input and output streams into a single virtio-sound device, playing audio in the guest also opens the host microphone. This switches Bluetooth headphones such as AirPods into headset mode (lower quality audio) whenever the guest plays sound, even if microphone access is denied.

This replaces the "Enable Sound" toggle in the Apple VM settings with a Sound picker: Disabled, Input Only, Output Only, Input and Output. The host microphone stream is only added to the device when input is enabled, so "Output Only" never opens the microphone. The single-device layout from #7692 is kept.

For compatibility, the existing Audio key keeps meaning output and a new AudioInput key is added. When AudioInput is missing it defaults to the value of Audio, so existing VMs keep both input and output, and configs saved by this version still load on older UTM releases. New VMs from the wizard and scripting still default to Input and Output.

Resolves #7875

Testing: Tested by a human on macOS 27.0 host (MacBook Air 15-inch, M3) with a macOS 26 guest, using Bluetooth headphones:

The author acknowledges that this change has been tested and/or reviewed by a human in accordance with UTM's AI contribution guidelines.

Since the input and output streams were merged into a single
virtio-sound device, playing audio in the guest also opens the host
microphone, which switches Bluetooth headphones into headset mode.
Replace the "Enable Sound" toggle with a choice of input only, output
only, or both so users can avoid opening the microphone.

The existing "Audio" key keeps meaning output and a new "AudioInput"
key is added. When "AudioInput" is missing it defaults to "Audio", so
existing configs keep both streams and new configs still load on older
versions of UTM.

Resolves #7875

Assisted-by: Claude:claude-opus-5-5
@osy
osy marked this pull request as ready for review September 22, 2026 23:49
@osy osy added this to the v5.0 milestone Sep 22, 2026
@osy
osy merged commit 100701e into main Sep 22, 2026
54 checks passed
@osy
osy deleted the feature/apple-audio-input branch September 22, 2026 23:51
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.

UTM 5.0.5 Beta causes bluetooth headphones to switch to headset mode when playing audio in VM

1 participant