Feature request: opt-in microphone capture on macOS through virtio-sound

I’d like Docker Desktop for Mac to expose the host’s default microphone to Linux containers through virtio-sound when using the Apple Virtualization Framework backend.

I run a Python recorder using PortAudio/sounddevice. On Linux, it can use an ALSA capture device inside a container. I’d like to use the same container on macOS, with explicit /dev/snd device access.

I’ve opened macOS: opt-in microphone capture through virtio-sound · Issue #743 · docker/desktop-feedback · GitHub and contributed some of the supporting work:

Docker Desktop would still need its own VZ audio device setup, microphone authorization, sharing setting, and guest kernel support. I’m requesting an opt-in setting, disabled by default, that stops forwarding audio when disabled. The LinuxKit CLI’s default-enabled behavior is separate from this request. Docker VMM would also need its own integration.

Would this be a reasonable starting point for microphone support in Desktop’s Apple Virtualization Framework backend? I’m happy to help with the LinuxKit side and capture tests.

First of all, thank you for your contributions. And second, would you like a feedback from the comunity or rather discussing it with Docker staff members?

The forum is mostly the place for comunity members, and most of them (including myself) are not working with virtualization at that level.

What I think I understand is that you would like to have a feature that supports audio input inside containers, but only as an optional setting that is disabled by default. That sounds good to me.

Please, let us know if you need more than discussing the topic like if you have any problem with how the issues are handled in the git repos. so we can help you find someone to look at them.

Thanks, @rimelek! Community feedback is very welcome. My main goal is to discuss the implementation approach with the Docker Desktop team working on the Apple Virtualization Framework backend.

Could you help connect me with someone who could take a look at desktop-feedback #743? I’d appreciate the guidance and am happy to help with the LinuxKit work and testing.

I see someone at Docker is already assigned to that issue, so it is posisble that they just have too much to do at the moment, but I raised your issue in an internal chat asking if you can get some feedback.

UPDATE:

They will try to look at it next week.