Changes

Jump to navigation Jump to search

Using JACK and PipeWire

1,192 bytes removed, 27 March
Then, you can run <code>virsh edit win10</code>, and perform the following changes:
# If the <code><domain></code> line doesn't already contain <code>xmlns:qemu</code>, add <code><nowiki>xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'</nowiki></code>. The line should look like:#: <syntaxhighlight lang="xml"><domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'></syntaxhighlight># Add the following block to the <code><devices></code> section:#: <syntaxhighlight lang="xml"> <audio id="1" type="jack"> <input clientName="win10" connectPorts="input-name"/> <output clientName="win10" connectPorts="output-name"/> </audio> <sound model="ich9"> <alias name="sound0"/> </sound></syntaxhighlight>#: <code>input-name</code> and <code>output-name</code> should be replaced with a regular expression that matches the name of the JACK input and output ports, for example <code>connectPorts='Built-in Audio Analog Stereo:playback_F[LR]'</code>. Essentially, these are the names of microphone and speaker devices that the VM would connect to. You can get the names by looking at your patchbay, or run <code>jack_lsp</code>.
#: If there is an existing <code><sound></code> block, it should be removed.
# Finally, we need to set PipeWire's runtime directory and latency. These are configured by environment variables. To do this, the following block right before <code></domain></code>:
</source>
If you are using NixOS, you'll also need to add <code><qemu:env name="LD_LIBRARY_PATH" value="$LD_LIBRARY_PATH:/run/current-system/sw/lib/pipewire"/></code> to your <code><qemu:commandline></code> section. 
Once you shutdown your VM and restart it, you should see an emulated HD audio device, and any sound should go into PipeWire. If you don't hear anything, check your patchbay connections.
Anonymous user

Navigation menu