Skip to content

Audio: missing ability to disable microphone input from host?

Host environment

  • Operating system: Windows Server 2022
  • OS/kernel version: 20348.2159
  • Architecture: x86_64
  • QEMU flavor: qemu-system-x86_64
  • QEMU version: QEMU emulator version 8.2.0
  • QEMU command line:

For a linux guest VM:

qemu-system-x86_64.exe -audio dsound,model=virtio,out.frequency=44100,out.channels=2,in.channels=0

For a Windows guest VM:

qemu-system-x86_64.exe -audio dsound,model=hda,out.frequency=44100,out.channels=2,in.channels=0

Emulated/Virtualized environment

  • Operating system: Windows 10, Fedora 39
  • OS/kernel version:
  • Architecture: x86_64

Description of problem

It appears there is no way to disable the microphone / input to the audio backend device(s).

There are at least two cases where this matters:

  1. The host has no microphone input (e.g. only HDMI audio output with video).
  2. The host has a microphone input, but the user doesn't want the guest VM to have access to the microphone/input.

I tried the option in.channels=0, as that seemed the most obvious way, though that doesn't work.

For -audio dsound, it appears that CLSID_DirectSoundCapture is unconditionally acquired.

There will also be later periodic warning/text outputs from QEMU "Could not create a backend for voice virtio.in", if you're running on a host system with no audio input device.

Adding a couple backend checks for channels > 0 may work well. Not sure if it matters that audio front end device in the VM still thinks there is an audio input.

Edited by scott fo
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information