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:
- Enable host microphone input in macOS VZ by whatisyourname0 · Pull Request #4228 · linuxkit/linuxkit · GitHub has merged: host microphone input and macOS permission handling in the LinuxKit CLI’s VZ runner.
- Enable virtio-snd modules in the 6.12 ARM64 kernel by whatisyourname0 · Pull Request #4227 · linuxkit/linuxkit · GitHub is open: ALSA and virtio-snd modules for the 6.12 ARM64 guest kernel.
- Reproducers and regression tests document the guest patch dependencies. The tested capture path still uses experimental virtio-snd changes.
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.