A system update broke qemu/kvm virtualization yesterday. I’m on manjaro and I’ve been using jackaudio for a while. I see the following error:
The necro thread is here: https://forum.level1techs.com/t/qemu-native-jack-audio-support/156494
The magic sauce for creating a patchbay connection for my windows guest looked like this:
<qemu:commandline>
...
<qemu:arg value="-audiodev"/>
<qemu:arg value="jack,id=win10large,in.format=s32,out.format=s32,in.frequency=48000,out.frequency=48000"/>
<qemu:arg value="-device"/>
<qemu:arg value="ich9-intel-hda"/>
<qemu:arg value="-device"/>
<qemu:arg value="hda-duplex,audiodev=win10large"/>
...
</qemu:commandline>
It looked like there is a new PCI Controller in the Hardware list in Virt-Manager. I think virt-manager does it’s best to list hardware based on the xml specification of the virtual machine. Some change seemed like it was made.
/var/log/pacman.log : [2022-01-04T06:03:24-0500] [ALPM] upgraded qemu (6.1.0-5 → 6.2.0-2)
I began looking for documentation to change slots or functions of the ich9-intel-hda device.
Jack is the host backend for the guest’s ich9-intel-hda device. The relevant libvirt.org section is https://libvirt.org/formatdomain.html#sound-devices, which states “Valid values are specific to the underlying hypervisor”.
My hypervisor is qemu/kvm. Qemu.org shows a new 6.1.1 and 6.2.0 release in December 2021. I suspect the 6.1.1 release would not have broken my virtual machine, but I’m an the mercy of my package maintainers at manjaro who within days of the 6.2.0 release updated the repo.
The next breadcrumb comes at https://www.qemu.org/docs/master/system/device-emulation.html
$ qemu-system-x86_64 --device ich9-intel-hda,help
ich9-intel-hda options:
acpi-index=<uint32> - (default: 0)
addr=<int32> - Slot and optional function number, example: 06.0 or 06 (default: -1)
debug=<uint32> - (default: 0)
failover_pair_id=<str>
...
The final working xml portion for jackaudio is now:
<qemu:arg value="-audiodev"/>
<qemu:arg value="jack,id=win10large,in.format=s32,out.format=s32,in.frequency=48000,out.frequency=48000"/>
<qemu:arg value="-device"/>
<qemu:arg value="ich9-intel-hda,bus=pcie.0,addr=0x1b"/>
<qemu:arg value="-device"/>
<qemu:arg value="hda-duplex,audiodev=win10large"/>
Lurking around the gitlab for qemu I found this patch that may be related:
https://gitlab.com/qemu-project/qemu/-/commit/9e2423ef58f37e1d9def4ef33b054cb7e86da1f7