I am using my gentoo as host os for kvm with vga passthrough for playing on windows, but I have problem with sound, it is not good quality, I hear something like crackles in sound. I am using pulseaudio (with --system mode) on host os, and tried different sample rates but didnt helped. My command for vm:
qemu-system-x86_64 \
-vga none \
-enable-kvm -m 10000 -cpu host -smp 8,cores=4,threads=2,sockets=1 \
-device ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-net nic,macaddr=50:E5:49:57:74:E3 -net bridge,vlan=0 \
-soundhw hda \
-boot d \
-hda /dev/sdb \
-usb -usbdevice host:09da:000a
I tried setting PULSE_LATENCY_MSEC, QEMU_PA_SAMPLES, but didnt helped. I also checked with live cd on guest vm, to make sure if its not windows problem, but the result is the same. I also tried setting -soundhw ac97, but there is no official support for ac97 on windows 10 and I have some delays with sounds, but less interference.
my audio is:
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31) (snd_hda_intel on msi z170a m7),
and versions of qemu and pulseaudio:
QEMU emulator version 2.3.0, Copyright (c) 2003-2008 Fabrice Bellard
pulseaudio 5.0
Could anyone help with this?