<div dir="ltr">So you're passing the entire usb controller through? Why not just pass the USB device itself through?  Something like:<div><br></div><div><div style="font-size:12.8px">    <hostdev mode='subsystem' type='usb' managed='yes'></div><div style="font-size:12.8px">      <source></div><div style="font-size:12.8px">        <vendor id='0x045e'/></div><div style="font-size:12.8px">        <product id='0x070f'/></div><div style="font-size:12.8px">      </source></div><div style="font-size:12.8px">    </hostdev></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">That may not fix your issue but it's probably simpler.  </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Also did you change the sample rate to DVD quality (to match your host)?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 3, 2017 at 2:53 PM, Tmplt <span dir="ltr"><<a href="mailto:tmplt@dragons.rocks" target="_blank">tmplt@dragons.rocks</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I saw on an older thread here that passing a USB controller through and<br>
using a USB soundcard through it solved that users audio issues. I tried<br>
that myself by adding<br>
<br>
    <hostdev mode='subsystem' type='pci' managed='no'><br>
      <source><br>
        <address domain='0x0000' bus='0x00' slot='0x14' function='0x0'/><br>
      </source><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02'<br>
function='0x0'/><br>
    </hostdev><br>
<br>
to the .xml-file, but I can still hear frequent audio stutters akin to<br>
my quoted thread. Am I passing the controller incorrectly? The device<br>
I'm trying to play through is a FiiO e10k DAC which works without issue<br>
on the host and on bare-metal Windows 8.1.<br>
<br>
Here follows my windows-pciusb.xml:<br>
<br>
<domain type='kvm'><br>
  <name>windows-pciusb</name><br>
  <uuid>7353cd48-34ee-4a26-b8ac-<wbr>7c5d1735777a</uuid><br>
  <memory unit='KiB'>8388608</memory><br>
  <currentMemory unit='KiB'>8388608</<wbr>currentMemory><br>
  <vcpu placement='static'>4</vcpu><br>
  <iothreads>2</iothreads><br>
  <cputune><br>
    <vcpupin vcpu='0' cpuset='0'/><br>
    <vcpupin vcpu='1' cpuset='1'/><br>
    <vcpupin vcpu='2' cpuset='2'/><br>
    <vcpupin vcpu='3' cpuset='3'/><br>
  </cputune><br>
  <os><br>
    <type arch='x86_64' machine='pc-i440fx-2.7'>hvm</<wbr>type><br>
    <loader readonly='yes'<br>
type='pflash'>/usr/share/ovmf/<wbr>x64/ovmf_x64.bin</loader><br>
    <nvram>/var/lib/libvirt/qemu/<wbr>nvram/windows_VARS.fd</nvram><br>
    <bootmenu enable='no'/><br>
  </os><br>
  <features><br>
    <acpi/><br>
    <apic/><br>
    <hyperv><br>
      <relaxed state='on'/><br>
      <vapic state='on'/><br>
      <spinlocks state='on' retries='8191'/><br>
    </hyperv><br>
    <vmport state='off'/><br>
  </features><br>
  <cpu mode='host-passthrough'><br>
    <topology sockets='1' cores='4' threads='1'/><br>
  </cpu><br>
  <clock offset='localtime'><br>
    <timer name='rtc' tickpolicy='catchup'/><br>
    <timer name='pit' tickpolicy='delay'/><br>
    <timer name='hpet' present='no'/><br>
    <timer name='hypervclock' present='yes'/><br>
  </clock><br>
  <on_poweroff>destroy</on_<wbr>poweroff><br>
  <on_reboot>restart</on_reboot><br>
  <on_crash>restart</on_crash><br>
  <pm><br>
    <suspend-to-mem enabled='no'/><br>
    <suspend-to-disk enabled='no'/><br>
  </pm><br>
  <devices><br>
    <emulator>/usr/sbin/qemu-<wbr>system-x86_64</emulator><br>
    <disk type='block' device='disk'><br>
      <driver name='qemu' type='raw' cache='none' io='threads'<br>
iothread='1'/><br>
      <source dev='/dev/sda'/><br>
      <target dev='vdb' bus='virtio'/><br>
      <boot order='3'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08'<br>
function='0x0'/><br>
    </disk><br>
    <disk type='block' device='disk'><br>
      <driver name='qemu' type='raw' cache='none' io='threads'<br>
iothread='2'/><br>
      <source dev='/dev/sde2'/><br>
      <target dev='vdc' bus='virtio'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c'<br>
function='0x0'/><br>
    </disk><br>
    <controller type='usb' index='0' model='ich9-ehci1'><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'<br>
function='0x7'/><br>
    </controller><br>
    <controller type='usb' index='0' model='ich9-uhci1'><br>
      <master startport='0'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'<br>
function='0x0' multifunction='on'/><br>
    </controller><br>
    <controller type='usb' index='0' model='ich9-uhci2'><br>
      <master startport='2'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'<br>
function='0x1'/><br>
    </controller><br>
    <controller type='usb' index='0' model='ich9-uhci3'><br>
      <master startport='4'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'<br>
function='0x2'/><br>
    </controller><br>
    <controller type='pci' index='0' model='pci-root'/><br>
    <controller type='ide' index='0'><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'<br>
function='0x1'/><br>
    </controller><br>
    <controller type='virtio-serial' index='0'><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06'<br>
function='0x0'/><br>
    </controller><br>
    <interface type='network'><br>
      <mac address='52:54:00:0d:18:bf'/><br>
      <source network='default'/><br>
      <model type='virtio'/><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'<br>
function='0x0'/><br>
    </interface><br>
    <input type='mouse' bus='ps2'/><br>
    <input type='keyboard' bus='ps2'/><br>
    <sound model='ich6'><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'<br>
function='0x0'/><br>
    </sound><br>
    <hostdev mode='subsystem' type='pci' managed='yes'><br>
      <source><br>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/><br>
      </source><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09'<br>
function='0x0'/><br>
    </hostdev><br>
    <hostdev mode='subsystem' type='pci' managed='yes'><br>
      <source><br>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/><br>
      </source><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a'<br>
function='0x0'/><br>
    </hostdev><br>
    <hostdev mode='subsystem' type='pci' managed='yes'><br>
      <source><br>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/><br>
      </source><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b'<br>
function='0x0'/><br>
    </hostdev><br>
    <hostdev mode='subsystem' type='usb' managed='yes'><br>
      <source><br>
        <vendor id='0x045e'/><br>
        <product id='0x028e'/><br>
      </source><br>
      <address type='usb' bus='0' port='1'/><br>
    </hostdev><br>
    <hostdev mode='subsystem' type='pci' managed='no'><br>
      <source><br>
        <address domain='0x0000' bus='0x00' slot='0x14' function='0x0'/><br>
      </source><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02'<br>
function='0x0'/><br>
    </hostdev><br>
    <memballoon model='virtio'><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07'<br>
function='0x0'/><br>
    </memballoon><br>
  </devices><br>
</domain><br>
<br>
lsusb reports that everything goes to the same, single USB controller,<br>
which is what I pass. Could that be the issue? I'm qouting my last<br>
thread in case any info there helps.<br>
<br>
Thanks in advance!<br>
<br>
On 01/29/2017 12:38 AM, Tmplt wrote:<br>
> I forgot to mention: I'm using the linux-vfio kernel, v4.8.13, and my<br>
> only kernel options are intel_iommu=on and pcie_acs_override=downstream.<br>
><br>
> On 01/28/2017 06:13 AM, Tmplt wrote:<br>
>> Having spent some hours (unsucessfully) to get stutter-free audio via<br>
>> Pulseaudio (and ALSA) have left me with the options of either dual<br>
>> booting or letting dedicated hardware handle the audio, which I can then<br>
>> mix together into a single output.<br>
>><br>
>> However, passing only the GPU as a soundcard and listening to the audio<br>
>> via my monitor's headphone jack, there is some noticable audio<br>
>> stuttering. While only noticable when running some more heavier games<br>
>> (e.g. Battlefield 1), I'm guessing this shouldn't be the case, and that<br>
>> I've configured something incorrectly. Especially since I've enabled<br>
>> MSIs for both the GPU and the GPUs audio device.<br>
>><br>
>> Here is what my system is:<br>
>> CPU:  i5-6600k @ stock<br>
>> MOBO: ASUS Z170-A<br>
>> RAM:  16GB DDR4 at 2133Mhz (I think, could be 1600)<br>
>> GPU:  ASUS R9 290 (for the VM; reference card)<br>
>><br>
>> HOST OS:  Arch Linux<br>
>> GUEST OS: Windows 8.1<br>
>><br>
>> I run my VM via qemu (2.8.0) and libvirt (2.4.0).<br>
>><br>
>> When Windows was installed it automatically enabled MSI for the GPU. I<br>
>> manually enabled it for the audio device, rebooted, and confirmed that<br>
>> they both appeared below the IRQ drop-down in the device manager.<br>
>><br>
>> It can be worth of note that I flashed my card with a UEFI-bios some<br>
>> time ago so that it got passed-through without issue. I can't recall<br>
>> whether this was required for my qemu config at the time or if a<br>
>> non-UEFI card can't be passed through. I'm also not sure if both BIOSes<br>
>> (there is a switch to toggle between the two on my card) are overwritten<br>
>> during the flash, or just the current one. Either case, the topical<br>
>> issue is present on both settings.<br>
<br>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/vfio-users</a><br>
</blockquote></div><br></div>