Stubborn Audio Crackling with USB Audio

After trying a ton of suggestions from various sites, I can’t seem to of the audio crackling. This is happening when I pass through a USB DAC. Using HDA Audio just makes it worse.

System Specs:
CPU: Ryzen 5 3600 RAM: 16GB GPU= GTX 1070

Here is my XML File (I’m using virt-manager if that helps)
<domain type="kvm"> <name>win10</name> <uuid>499ad03a-ee0c-40a7-ad3f-574c091cd5ca</uuid> <metadata> <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> <libosinfo:os id="http://microsoft.com/win/10"/> </libosinfo:libosinfo> </metadata> <memory unit="KiB">8388608</memory> <currentMemory unit="KiB">8388608</currentMemory> <vcpu placement="static">8</vcpu> <cputune> <vcpupin vcpu="0" cpuset="0"/> <vcpupin vcpu="1" cpuset="1"/> <vcpupin vcpu="2" cpuset="2"/> <vcpupin vcpu="3" cpuset="3"/> <vcpupin vcpu="4" cpuset="4"/> <vcpupin vcpu="5" cpuset="5"/> <vcpupin vcpu="6" cpuset="6"/> <vcpupin vcpu="7" cpuset="7"/> </cputune> <os> <type arch="x86_64" machine="pc-q35-5.1">hvm</type> <loader readonly="yes" type="pflash">/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader> <nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram> <bootmenu enable="yes"/> </os> <features> <acpi/> <apic/> <hyperv> <relaxed state="on"/> <vapic state="on"/> <spinlocks state="on" retries="8191"/> <vendor_id state="on" value="123456789ab"/> </hyperv> <kvm> <hidden state="on"/> </kvm> <vmport state="off"/> </features> <cpu mode="host-passthrough" check="none" migratable="on"> <topology sockets="1" dies="1" cores="4" threads="2"/> <cache mode="passthrough"/> </cpu> <clock offset="localtime"> <timer name="rtc" tickpolicy="catchup"/> <timer name="pit" tickpolicy="delay"/> <timer name="hpet" present="no"/> <timer name="hypervclock" present="yes"/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <pm> <suspend-to-mem enabled="no"/> <suspend-to-disk enabled="no"/> </pm> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type="file" device="disk"> <driver name="qemu" type="qcow2"/> <source file="/var/lib/libvirt/images/win10.qcow2"/> <target dev="vda" bus="virtio"/> <boot order="2"/> <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/> </disk> <disk type="file" device="cdrom"> <driver name="qemu" type="raw"/> <source file="/var/lib/libvirt/images/Win10_20H2_English_x64.iso"/> <target dev="sdb" bus="sata"/> <readonly/> <boot order="1"/> <address type="drive" controller="0" bus="0" target="0" unit="1"/> </disk> <disk type="file" device="cdrom"> <driver name="qemu" type="raw"/> <source file="/var/lib/libvirt/images/virtio-win-0.1.185.iso"/> <target dev="sdc" bus="sata"/> <readonly/> <address type="drive" controller="0" bus="0" target="0" unit="2"/> </disk> <controller type="usb" index="0" model="qemu-xhci" ports="15"> <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/> </controller> <controller type="sata" index="0"> <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/> </controller> <controller type="pci" index="0" model="pcie-root"/> <controller type="pci" index="1" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="1" port="0x10"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/> </controller> <controller type="pci" index="2" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="2" port="0x11"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/> </controller> <controller type="pci" index="3" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="3" port="0x12"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/> </controller> <controller type="pci" index="4" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="4" port="0x13"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/> </controller> <controller type="pci" index="5" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="5" port="0x14"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/> </controller> <controller type="pci" index="6" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="6" port="0x15"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/> </controller> <controller type="pci" index="7" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="7" port="0x8"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/> </controller> <controller type="virtio-serial" index="0"> <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/> </controller> <interface type="network"> <mac address="52:54:00:cd:07:97"/> <source network="default"/> <model type="e1000e"/> <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/> </interface> <serial type="pty"> <target type="isa-serial" port="0"> <model name="isa-serial"/> </target> </serial> <console type="pty"> <target type="serial" port="0"/> </console> <channel type="spicevmc"> <target type="virtio" name="com.redhat.spice.0"/> <address type="virtio-serial" controller="0" bus="0" port="1"/> </channel> <input type="mouse" bus="ps2"/> <input type="keyboard" bus="ps2"/> <hostdev mode="subsystem" type="pci" managed="yes"> <source> <address domain="0x0000" bus="0x26" slot="0x00" function="0x0"/> </source> <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/> </hostdev> <hostdev mode="subsystem" type="pci" managed="yes"> <source> <address domain="0x0000" bus="0x26" slot="0x00" function="0x1"/> </source> <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/> </hostdev> <hostdev mode="subsystem" type="usb" managed="yes"> <source> <vendor id="0x1b1c"/> <product id="0x1b2d"/> </source> <address type="usb" bus="0" port="4"/> </hostdev> <hostdev mode="subsystem" type="usb" managed="yes"> <source> <vendor id="0x1b1c"/> <product id="0x1b8b"/> </source> <address type="usb" bus="0" port="5"/> </hostdev> <hostdev mode="subsystem" type="usb" managed="yes"> <source> <vendor id="0x0d8c"/> <product id="0x0066"/> </source> <address type="usb" bus="0" port="1"/> </hostdev> <redirdev bus="usb" type="spicevmc"> <address type="usb" bus="0" port="2"/> </redirdev> <redirdev bus="usb" type="spicevmc"> <address type="usb" bus="0" port="3"/> </redirdev> <memballoon model="virtio"> <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/> </memballoon> </devices> </domain>

Any help would be appreciated!

I’ve been seeing the same on my vfio based Win10 workstation. The USB audio is not at all clean like it was months ago. Something must have changed in the kernel or the multitude of modules it loads.

I’ve noticed something weird, I think it might be a potential cause. While setting up other stuff for the VM (HugePages, CPU Pinning, etc…), it was freezing seemingly at random. After some digging I found some weirdness with a program called LatencyMon that doesn’t happen on bare-metal.

In the VM:

On Bare-metal:

Sorry for the potatocam.

Not a direct solution but if you’re only playing audio and not inputting any, then Scream (https://github.com/duncanthrax/scream) might work for you. It’s like LookingGlass but for audio. It can be transmitted over network unicast or IVSHMEM. It’s what I used when I last ran a VFIO setup and it seemed to work fine.

Did you try to unpin cpus? In some cases it can make things worse.
Also it would be good to post your iommu groups.

And please use three back apostrophes ` for listings

Because your vm xml is very painful to read.

Scream might work, but since HDA doesn’t work properly it might not…

VM XML is ugly but it doesn’t let me edit the post anymore, so here it is but hopefully not messed up:

<domain type="kvm">
	<name>win10</name>
	<uuid>499ad03a-ee0c-40a7-ad3f-574c091cd5ca</uuid>
	<metadata>
		<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
			<libosinfo:os id="http://microsoft.com/win/10"/>
		</libosinfo:libosinfo>
	</metadata>
	<memory unit="KiB">8388608</memory>
	<currentMemory unit="KiB">8388608</currentMemory>
	<vcpu placement="static">8</vcpu>
	<cputune>
		<vcpupin vcpu="0"
       			cpuset="0"/>
		<vcpupin vcpu="1"
       			cpuset="1"/>
		<vcpupin vcpu="2"
       			cpuset="2"/>
		<vcpupin vcpu="3"
       			cpuset="3"/>
		<vcpupin vcpu="4"
       			cpuset="4"/>
		<vcpupin vcpu="5"
       			cpuset="5"/>
		<vcpupin vcpu="6"
       			cpuset="6"/>
		<vcpupin vcpu="7"
       			cpuset="7"/>
	</cputune>
	<os>
		<type arch="x86_64"
    			machine="pc-q35-5.1">hvm</type>
		<loader readonly="yes"
      			type="pflash">/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
		<nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
		<bootmenu enable="yes"/>
	</os>
	<features>
		<acpi/>
		<apic/>
		<hyperv>
			<relaxed state="on"/>
			<vapic state="on"/>
			<spinlocks state="on"
         				retries="8191"/>
			<vendor_id state="on"
         				value="123456789ab"/>
		</hyperv>
		<kvm>
			<hidden state="on"/>
		</kvm>
		<vmport state="off"/>
	</features>
	<cpu mode="host-passthrough"
   		check="none"
   		migratable="on">
		<topology sockets="1"
        			dies="1"
        			cores="4"
        			threads="2"/>
		<cache mode="passthrough"/>
	</cpu>
	<clock offset="localtime">
		<timer name="rtc"
     			tickpolicy="catchup"/>
		<timer name="pit"
     			tickpolicy="delay"/>
		<timer name="hpet"
     			present="no"/>
		<timer name="hypervclock"
     			present="yes"/>
	</clock>
	<on_poweroff>destroy</on_poweroff>
	<on_reboot>restart</on_reboot>
	<on_crash>destroy</on_crash>
	<pm>
		<suspend-to-mem enabled="no"/>
		<suspend-to-disk enabled="no"/>
	</pm>
	<devices>
		<emulator>/usr/bin/qemu-system-x86_64</emulator>
		<disk type="file"
    			device="disk">
			<driver name="qemu"
      				type="qcow2"/>
			<source file="/var/lib/libvirt/images/win10.qcow2"/>
			<target dev="vda"
      				bus="virtio"/>
			<boot order="2"/>
			<address type="pci"
       				domain="0x0000"
       				bus="0x03"
       				slot="0x00"
       				function="0x0"/>
		</disk>
		<disk type="file"
    			device="cdrom">
			<driver name="qemu"
      				type="raw"/>
			<source file="/var/lib/libvirt/images/Win10_20H2_English_x64.iso"/>
			<target dev="sdb"
      				bus="sata"/>
			<readonly/>
			<boot order="1"/>
			<address type="drive"
       				controller="0"
       				bus="0"
       				target="0"
       				unit="1"/>
		</disk>
		<disk type="file"
    			device="cdrom">
			<driver name="qemu"
      				type="raw"/>
			<source file="/var/lib/libvirt/images/virtio-win-0.1.185.iso"/>
			<target dev="sdc"
      				bus="sata"/>
			<readonly/>
			<address type="drive"
       				controller="0"
       				bus="0"
       				target="0"
       				unit="2"/>
		</disk>
		<controller type="usb"
          			index="0"
          			model="qemu-xhci"
          			ports="15">
			<address type="pci"
       				domain="0x0000"
       				bus="0x01"
       				slot="0x00"
       				function="0x0"/>
		</controller>
		<controller type="sata"
          			index="0">
			<address type="pci"
       				domain="0x0000"
       				bus="0x00"
       				slot="0x1f"
       				function="0x2"/>
		</controller>
		<controller type="pci"
          			index="0"
          			model="pcie-root"/>
		<controller type="pci"
          			index="1"
          			model="pcie-root-port">
			<model name="pcie-root-port"/>
			<target chassis="1"
      				port="0x10"/>
			<address type="pci"
       				domain="0x0000"
       				bus="0x00"
       				slot="0x02"
       				function="0x0"
       				multifunction="on"/>
		</controller>
		<controller type="pci"
          			index="2"
          			model="pcie-root-port">
			<model name="pcie-root-port"/>
			<target chassis="2"
      				port="0x11"/>
			<address type="pci"
       				domain="0x0000"
       				bus="0x00"
       				slot="0x02"
       				function="0x1"/>
		</controller>
		<controller type="pci"
          			index="3"
          			model="pcie-root-port">
			<model name="pcie-root-port"/>
			<target chassis="3"
      				port="0x12"/>
			<address type="pci"
       				domain="0x0000"
       				bus="0x00"
       				slot="0x02"
       				function="0x2"/>
		</controller>
		<controller type="pci"
          			index="4"
          			model="pcie-root-port">
			<model name="pcie-root-port"/>
			<target chassis="4"
      				port="0x13"/>
			<address type="pci"
       				domain="0x0000"
       				bus="0x00"
       				slot="0x02"
       				function="0x3"/>
		</controller>
		<controller type="pci"
          			index="5"
          			model="pcie-root-port">
			<model name="pcie-root-port"/>
			<target chassis="5"
      				port="0x14"/>
			<address type="pci"
       				domain="0x0000"
       				bus="0x00"
       				slot="0x02"
       				function="0x4"/>
		</controller>
		<controller type="pci"
          			index="6"
          			model="pcie-root-port">
			<model name="pcie-root-port"/>
			<target chassis="6"
      				port="0x15"/>
			<address type="pci"
       				domain="0x0000"
       				bus="0x00"
       				slot="0x02"
       				function="0x5"/>
		</controller>
		<controller type="pci"
          			index="7"
          			model="pcie-root-port">
			<model name="pcie-root-port"/>
			<target chassis="7"
      				port="0x8"/>
			<address type="pci"
       				domain="0x0000"
       				bus="0x00"
       				slot="0x01"
       				function="0x0"/>
		</controller>
		<controller type="virtio-serial"
          			index="0">
			<address type="pci"
       				domain="0x0000"
       				bus="0x02"
       				slot="0x00"
       				function="0x0"/>
		</controller>
		<interface type="network">
			<mac address="52:54:00:cd:07:97"/>
			<source network="default"/>
			<model type="e1000e"/>
			<address type="pci"
       				domain="0x0000"
       				bus="0x07"
       				slot="0x00"
       				function="0x0"/>
		</interface>
		<serial type="pty">
			<target type="isa-serial"
      				port="0">
				<model name="isa-serial"/>
			</target>
		</serial>
		<console type="pty">
			<target type="serial"
      				port="0"/>
		</console>
		<channel type="spicevmc">
			<target type="virtio"
      				name="com.redhat.spice.0"/>
			<address type="virtio-serial"
       				controller="0"
       				bus="0"
       				port="1"/>
		</channel>
		<input type="mouse"
     			bus="ps2"/>
		<input type="keyboard"
     			bus="ps2"/>
		<hostdev mode="subsystem"
       			type="pci"
       			managed="yes">
			<source>
				<address domain="0x0000"
       					bus="0x26"
       					slot="0x00"
       					function="0x0"/>
			</source>
			<address type="pci"
       				domain="0x0000"
       				bus="0x05"
       				slot="0x00"
       				function="0x0"/>
		</hostdev>
		<hostdev mode="subsystem"
       			type="pci"
       			managed="yes">
			<source>
				<address domain="0x0000"
       					bus="0x26"
       					slot="0x00"
       					function="0x1"/>
			</source>
			<address type="pci"
       				domain="0x0000"
       				bus="0x06"
       				slot="0x00"
       				function="0x0"/>
		</hostdev>
		<hostdev mode="subsystem"
       			type="usb"
       			managed="yes">
			<source>
				<vendor id="0x1b1c"/>
				<product id="0x1b2d"/>
			</source>
			<address type="usb"
       				bus="0"
       				port="4"/>
		</hostdev>
		<hostdev mode="subsystem"
       			type="usb"
       			managed="yes">
			<source>
				<vendor id="0x1b1c"/>
				<product id="0x1b8b"/>
			</source>
			<address type="usb"
       				bus="0"
       				port="5"/>
		</hostdev>
		<hostdev mode="subsystem"
       			type="usb"
       			managed="yes">
			<source>
				<vendor id="0x0d8c"/>
				<product id="0x0066"/>
			</source>
			<address type="usb"
       				bus="0"
       				port="1"/>
		</hostdev>
		<redirdev bus="usb"
        			type="spicevmc">
			<address type="usb"
       				bus="0"
       				port="2"/>
		</redirdev>
		<redirdev bus="usb"
        			type="spicevmc">
			<address type="usb"
       				bus="0"
       				port="3"/>
		</redirdev>
		<memballoon model="virtio">
			<address type="pci"
       				domain="0x0000"
       				bus="0x04"
       				slot="0x00"
       				function="0x0"/>
		</memballoon>
	</devices>
</domain>

IOMMU Groups:

IOMMU Group 0:
	00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
IOMMU Group 1:
	00:01.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge [1022:1483]
IOMMU Group 10:
	00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
IOMMU Group 11:
	00:08.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
IOMMU Group 12:
	00:08.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
IOMMU Group 13:
	00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 61)
	00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
IOMMU Group 14:
	00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 0 [1022:1440]
	00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 1 [1022:1441]
	00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 2 [1022:1442]
	00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 3 [1022:1443]
	00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 4 [1022:1444]
	00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 5 [1022:1445]
	00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 6 [1022:1446]
	00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 7 [1022:1447]
IOMMU Group 15:
	03:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller [1022:43d5] (rev 01)
	03:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller [1022:43c8] (rev 01)
	03:00.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Bridge [1022:43c6] (rev 01)
	20:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
	20:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
	20:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port [1022:43c7] (rev 01)
	22:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
IOMMU Group 16:
	26:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1070] [10de:1b81] (rev a1)
	26:00.1 Audio device [0403]: NVIDIA Corporation GP104 High Definition Audio Controller [10de:10f0] (rev a1)
IOMMU Group 17:
	27:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function [1022:148a]
IOMMU Group 18:
	28:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP [1022:1485]
IOMMU Group 19:
	28:00.1 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP [1022:1486]
IOMMU Group 2:
	00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
IOMMU Group 20:
	28:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller [1022:149c]
IOMMU Group 21:
	30:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)
IOMMU Group 22:
	31:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 51)
IOMMU Group 3:
	00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
IOMMU Group 4:
	00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge [1022:1483]
IOMMU Group 5:
	00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
IOMMU Group 6:
	00:05.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
IOMMU Group 7:
	00:07.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]
IOMMU Group 8:
	00:07.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [1022:1484]
IOMMU Group 9:
	00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [1022:1482]

Now it’s OK. So if I read this right you passing audo card as usb device.
You may want to try to pass whole PCI USB controller and plug in sound card into it.
This one probably is good candidate:

28:00.3 USB controller [0c03]:

Also repinning vcpus to higher cores might help. This one is working well for me. I pin vcpu 0 and 1 to whole core skipping threads 9 and 11 (I have 8c, so you need to modify this for 6c):

<cputune>
    <vcpupin vcpu="0" cpuset="8"/>
    <vcpupin vcpu="1" cpuset="10"/>
    <vcpupin vcpu="2" cpuset="12"/>
    <vcpupin vcpu="3" cpuset="13"/>
    <vcpupin vcpu="4" cpuset="14"/>
    <vcpupin vcpu="5" cpuset="15"/>
    <emulatorpin cpuset="0-7"/>
  </cputune>

Or just leave it on auto. Last time I was doing testing, auto pinning sometimes worked better than bad manual one.

Also you may try to isolate threads for VM with isolcpus or cset. I wrote a bit more about this here:

https://forum.level1techs.com/t/high-kernel-process-usage-on-cpu-0-isolcpus/164066/26

Also tsc may help you:

<timer name="tsc" present="yes"/>
1 Like

It seems like passing through the PCI USB controller fixed the audio problems! While I still hear some very slight pops, I’m not sure if it’s just me listening for audio problems, VLC being weird, or the fact that the test video is a youtube rip, it’s a WHOLE lot better.