One of the biggest hurdles to people looking for a seamless VFIO experience is audio. Normally, you’re limited to one audio source at a time, or problematic, glitchy workarounds in software.
Your choices out of the box are patching Qemu, trying to configure JACK or dealing with PA loopback latency. Only a few boards in the midrange have adequate isolation for native audio hardware device passthrough, and the overhead introduced by the software solutions usually cause more problems than they solve.
We believe that at present, the best audio solutions are hardware solutions. They work as well as baremetal in the vast majority of cases, and you can spend as little as $3-5 for a better experience, where software workarounds can only get you so far.
This guide is intended for people looking to improve or build an audio hardware setup for their VFIO rig from scratch. We’ve personally vetted each product on the list for quality, to make sure they retain compatibility with the host when the guest isn’t in use, and that passing the devices through won’t present problems. Note that you may also need an extra USB controller if you experience problems with passing an interface as a host device.
Basic Audio Hardware Solutions
USB “Audio Adapter” — USB Sound Card Adapter – $10
These devices are by far the least expensive solution to inadequate gaming VM audio, they’re minimal USB audio hardware interfaces that usually include one 3.5mm TRS for input and output, and occasionally have other features, like SPDIF digital input, or hardware volume adjustment.
Our recommendation includes a volume knob, as well as a TRRS jack for use with mobile headsets, which can lower your overall audio cost if you have some earbuds with an inline mic laying around. This won’t solve the seamlessness issue, but it’ll get you one step closer to truly working VM audio.
There are also cheaper options in the $1-7 range, but they tend to have high noise floors and be susceptible to overloading and interference.
HDMI Audio Extractor — VICTONY HDMI 3.5mm Stereo Audio Extractor – $28
A lot of people don’t realize this, but you already have an audio interface passed through to your VM by virtue of having a GPU attached to it.
Some of you might spring for more expensive monitors to take advantage of this, but for those that either can’t afford a monitor with audio line output, or already have one that doesn’t, there are inexpensive adapters that can read the audio out line of an HDMI connection, and deliver it as an analog signal.
Our recommendation here works well, and has 3.5mm TRS output. There are other models available with RCA if that’s more up your alley
Seamless VM Audio Setup
Explaining Interfaces and Mixers
OK, so this is where things start to get a little more complicated. Our goal here is to set up a system that takes 2 outputs, and mixes them down to one audio hardware source, and takes 1 input, and splits it for use with 2 audio sinks.
That way, you can hear any audio coming from the guest or host at the same time, and use your mic on either system, all without software or appreciable latency. This system also has the advantage of working with high end home theater systems and good microphones without any additional configuration. Here’s a diagram to better illustrate what we’re setting up:
We need 3 devices (and some cables) to make this happen inexpensively: an input splitter and/or mic amp, a mixer, and a USB interface for guest audio:
USB Guest interface — BEHRINGER U-CONTROL UCA202 – $29
This device acts as an external “sound card” for the host, without complicating things with PCIe passthrough. Simply redirect its USB port to the guest, and set it as the primary audio device in the guest’s audio settings.
Our recommendation here comes down to expense and port compatibility — it’s barebones, but has everything you need to connect it to the Mic power and mixer.
Mic Power/Output — BEHRINGER U-PHORIA UMC22 – $39
A lot of nicer microphones need phantom power to operate properly, and this interface works well in that capacity. It’s compatible with both TRS and XLR microphones, so you have your pick of the litter for input, too.
Simply plug in your microphone, hook the interface up to 5v power (via USB port or DC charger) plug the output into the Guest interface, and the monitor into onboard mic or line-in. That’s it. you now have simultaneous mic input on both machines. (if you have a mono mic, you can also just route one channel to each input and leave the monitor port open)
Mixer — Rolls MX51S Mini Mix 2 Stereo Mixer – $54
Essentially, you just need to do the same thing for your mixer as you did your Mic Interface, but with the outputs on your Host and guest instead of the inputs. Just plug it in, hook the line out from each device to the mixer, and plug the output into your speakers and/or headphones.
From here, all you really need to do is adjust the levels on each device so that you aren’t blowing out your mic or speakers, turn on phantom power as needed, and you’re good to go. We recommend short cable runs so that cable management isn’t an issue, and to use adapters with 90 degree fittings when possible to reduce stress on the native connectors. Here’s a list of cables and connectors you’ll need for this specific setup:
- 1 Stereo RCA to Quarter inch TS cable
- 1 Dual RCA to 3.5mm TRS cable
- 1 Stereo RCA to RCA cable
- 1 Stereo TRS to TRS 3.5mm cable OR 1 Mono Quarter inch TS to 3.5mm TS cable
- Whatever your mic and speakers need to interface with the Mixer/Phantom Power
These devices only cost about as much as something like a Blue Yeti USB Microphone, yet offer far more flexibility, and a truly seamless VFIO audio experience. They also have the advantage of being completely modular, upgradeable, and extensible. The system also works without depending on the host or guest, so routing other outputs to your speakers while your computer is off will work fine, as will recording to another device. For a little over a hundred bucks, you’re getting a sound system that will perform better than any software solution can.
Join our Discord and discuss your audio setup with the community!
Images Courtesy Pixabay