<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 16, 2015 at 1:04 PM, Mateusz Górczak <span dir="ltr"><<a href="mailto:gorczak.mateusz@gmail.com" target="_blank">gorczak.mateusz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello,<br><br></div>I have been trying to passtrough my usb sound card (Creative Sound Blaster X-Fi Pro USB). My host is arch linux and my guest - win 8.1. I use qemu-kvm with ovmf.<br><br></div>Windows recognize my sound card and works perfectly, but after a while (about 30 second of playing music), a lot of noises are occured. I also install windows 10 (just for compare) the problem are exactly the same. I also trying run ubuntu as a guest, but after passtrough my sound card <b>all usb devices turn off </b>-<b> </b>even the ones, which are not passtrough to guest (without passing sound card, ubuntu works perfectly).<br><br></div><div>On my host (arch) card works great, so there are no problem with the card itself (I believe...; also on 'native' Windows there is no problem with the card).<br><br></div><div>Any advice? Qemu doesn't print anything useful.<br>If you need more information - just ask.<br><br></div><div>my config (minimal - only mouse, keyboard and sound card are passtrough to guest):<br><br>qemu-system-x86_64 -enable-kvm -m 5G -cpu host,kvm=off \<br>-smp 4,sockets=1,cores=4,threads=2 \<br>-drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF-pure-efi.fd \<br>-drive if=pflash,format=raw,file=/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd \<br>-device virtio-scsi-pci,id=scsi \<br>-drive file=Downloads/virtio-win-0.1.96.iso,id=virtiocd,if=none -device ide-cd,bus=ide.1,drive=virtiocd \<br>-drive file=ubuntu15.iso,id=isocd,if=none -device scsi-cd,drive=isocd \<br>-vga none \<br>-drive file=windowsUefi.img,id=disk,format=raw,if=none -device scsi-hd,drive=disk \<br>-device vfio-pci,host=01:00.0 \<br>-device vfio-pci,host=01:00.1 \<br>-usb -usbdevice host:09da:1343 \<br>-usb -usbdevice host:041e:3237 \<br>-usb -usbdevice host:046d:c52b<br></div></div></blockquote><div><br></div><div>I've spent the last week or so playing with an incredibly similar setup, and what I've found is that USB Passthrough is simply not good for audio.  I've tried two alternate options, both of which work, one better than the other.  First, I was able to assign my HDMI audio device from my GPU to my guest with vfio-pci.  I then ran audio through my monitor (no integrated speakers) and then to speaker output from my monitor.  I found the audio levels to be extremely low with that option, with limited ways to increase volume.</div><div><br></div><div>The second option was doing a PCI device assignment of my integrated audio controller.  This option worked significantly better, as I didn't have to reconnect any speakers in a different configuration.  Of course, you will only have audio on either the host or the VM with this option.  There are still slight pops and noise in the audio, but it's very infrequent, and typically only in more intensive games at this point.  I found that I could use the USB sound card on the host without issue in this configuration.</div><div><br></div><div>The only problem I've come across in option 2 is that occasionally on VM poweroff, the PCI audio doesn't get properly recognized by pulseaudio and I need to run "pulseaudio -k" as non-root user to reestablish sound on the host.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div></div>
<br>_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
<br></blockquote></div><br></div></div>