As an alternative to compiling the source code yourselves, I have attached the capture.exe binary.
** Attachment added: "Executable to reproduce this bug" https://bugs.launchpad.net/qemu/+bug/1499908/+attachment/4806840/+files/capture.exe.bz2 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1499908 Title: hda sound capture broken with VNC Status in QEMU: New Bug description: QEmu is being used to run the Wine conformance tests in Windows virtual machines. Wine's conformance tests check the behavior of various Windows APIs and verify that they behave as expected. One of the tests checks the behavior of the mmdevapi sound capture APIs. This test works fine on real hardware and also works fine in various QEmu VMs but fails in some others. Further investigation showed that: * The mmdevapi:capture tests work on the two Vista VMs. Those use the ac97 sound card and are configured for VNC access to the VM. * The mmdevapi:capture tests fail in the Windows 7+ VMs. Those use an hda sound card and are configured for VNC access to the VM (so '-device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda- duplex,id=sound0-codec0,bus=sound0.0,cad=0' and '-vnc 127.0.0.1:0'). * Furthermore configuring the VM for Spice access fixes the mmdevapi:capture test (so replacing -vnc with '-spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on'), this even if no client connects to the VM. So in effect the -spice and -vnc options change the behavior of the sound device. To reproduce this bug: 1. Set up a Windows 7+ VM with an hda sound card ('ich6' in libvirt). 2. Set it up for access using VNC. 3. Copy the attached mmdevapi_test.exe file to it. (*) 4. Run the tests as follows: mmdevapi_test.exe capture If you see these 'Test Failed' lines then the bug is still present: capture.c:586: Returned latency: 5.8050 ms capture.c:178: Test failed: Position 1015 expected 0 capture.c:186: Wait'ed position 1015 pad 0 flags 1, amount of frames locked: 448 capture.c:228: Test failed: Position 2167 expected 1463 capture.c:248: Sleep.1 position 2167 pad 4032 flags 1, amount of frames locked: 448 capture.c:256: Test failed: Position 2167 expected 1463 capture.c:292: GetBufferSize 21996 period size 448 capture.c:302: Overrun position 4215 pad 8960 flags 1, amount of frames locked: 448 capture.c:308: Test failed: GCP 8960 vs. BufferSize 21996 capture.c:313: Test failed: Position 4215 gap 2304 capture.c:329: Cont'ed position 5303 pad 8512 flags 1, amount of frames locked: 448 capture.c:333: Test failed: Position 5303 expected 4663 capture.c:334: Test failed: flags 1 capture.c:353: Restart position 7351 pad 8064 flags 1, amount of frames locked: 448 capture.c:358: Test failed: Position 7351 expected 5111 capture.c:359: Test failed: flags 1 In case it helps, here is the source of mmdevapi_test.exe: https://source.winehq.org/git/wine.git/?a=blob;f=dlls/mmdevapi/tests/capture.c;hb=60d1d6f5952e8b5d6fb0327a28c047058851fa70#l178 So far I have confirmed that this bug is present in QEmu as shipped in the following Debian packages: * qemu-kvm + qemu-system-x86 1:2.1+dfsg-12+deb8u2 + linux-image-3.16.0-4-amd64 3.16.7-ckt11-1+deb8u3 * qemu-system-x86 1:2.3+dfsg-6a + linux-image-4.1.0-1-amd64 4.1.3-1 (*) As alternatives to using the attached binary you can: - Compile it from Wine's source. See: https://source.winehq.org/git/wine.git/ - Or download the latest WineTest binary from https://test.winehq.org/builds/winetest-latest.exe And extract the mmdevapi_test.exe from there: winetest.exe -x tests tests\mmdevapi_test.exe capture To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1499908/+subscriptions