What actually is dom0:mic?

@corporateblush That is a virtual mic device, it’s not an actual mic hardware. It is made available by qubes gui daemon running in dom0 (ref.: qubes-gui-daemon/qubesguidaemon/mic.py at f66fb34c90d3400772df7e11dfea47331c08407f · QubesOS/qubes-gui-daemon · GitHub). So it should exist in every >=4.3 Qubes OS installation, as it does in mine.

As I understand it, this virtual mic device exist to provide a modular mechanism to send audio input to domUs (AppVMs, StandaloneVMs, and so on) regardless of your audiovm backend.

I did not read the specific code section to confirm the following claim, but that’s my guess given my experience with Qubes audio virtualization, so take that as you will: while this virtual mic (ie, dom0:mic) is the one you attach to your domU, dom0 will actually proxy all audio input from your audiovm, which could be dom0 itself, to your target domU through a qrexec channel using a specialized and simple audio transfer protocol.

It is my understanding that by default all audio output, that is audio data leaving your application to your audio hardware device, is transferred through qrexec channels using that simple audio protocol. I say by default, because you certainly can attach your audio hardware directly to a domU via USB attach, and if you configure your system to use said USB audio controller, audio will also be transferred through qrexec, but this time using usbip protocol. In the former, the default, you should get the least overhead and possibly lower attack surface; I’d say it is the easiest method to get audio output, it should just work for every VM. The same should be true for audio input when you attach the dom0:mic virtual device to a domU. See more: Audio virtualization — Qubes OS Documentation

The only way I am able to record my voice is through 3.5mm jack when I connect headset with a mic. But that one is handled by sys-audio and specific Intel HDA.

You should be able to attach dom0:mic to whatever VM and get audio input from your “3.5mm jack” you described, as long as the whatever VM uses your sys-audio as audiovm (qvm-prefs <whatever-vm> audiovm). What did you already try? And what do you mean by “that one is handled by sys-audio”? Do you manually attach your “3.5mm jack” USB controller to the domU to get audio input to work?

2 Likes