QEMU soundhw HDA huge microphone lag

Bug #1492649 reported by Nek
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

I use a Windows 7 x86_64 guest with VGA passthrough and -soundhw hda. The audio plays fine, but the microphone input is delayed by more than 20 seconds.

-soundhw ac97 does not have this delay but it has choppy sound playback and input.

System:
Arch linux
Kernel: 4.1.6-1-ARCH
Audio hardware: 00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller
Audio system: Pulseaudio 6.0

Revision history for this message
Andrew Collett (andrewjamescollett) wrote :

I seem to have this issue too. Using latest 15.04 Ubuntu, qemu and -soundhw all.

Revision history for this message
tinyhitman (custin) wrote :

I can reproduce this on Windows 10 (64bit) with hda device.

Host kernel is 4.1.13-rt15-1-rt, also tried with non-realtime kernel with same results.

Output works without delay, given it is choppy from time to time.
Using the following env vars when starting QEMU:

QEMU_AUDIO_DRV: pa
QEMU_PA_SAMPLE: 32 # also tried with 128, 256, 512 and 1024. Same results for input, output got less choppy but with notable latency
QEMU_PA_SERVER: unix:/run/user/1000/pulse/native # where user with uid is the user with Xorg and PA session, of course.

Revision history for this message
Glenn Sommer (glemsom) wrote :

I cannot figure out why - but, it would seem the input ringbuffer is not processed till the buffer is full.
As an ugly workaround, i tried to set the buffering attributes to the input section - which reduced the delay to less then a second. (important part here is ba.maxlength)

Revision history for this message
Jonathan Rubenstein (jjrcop) wrote :

I've got this issue too on windows 10 with QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-4). It seems to only occur when the device isn't used in the windows host for a while by any application. If an application opens the capture device, the delay slowly gets smaller until it's only a 4th of a second.

My uneducated guess is that the pa/hda driver isn't dequeuing the buffer unless the device is opened and being used by an application. This should not be happening, it should move the read pointer to the sample length even if the device isn't being used.

Revision history for this message
Jonathan Rubenstein (jjrcop) wrote :

Proofread your comments, guys... oops

So it's a debian HOST and windows GUEST, not windows host. :-l

Sorry for the double post.

Revision history for this message
Thomas Huth (th-huth) wrote :

The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now.
If you still think this bug report here is valid, then please switch the state back to "New" within the next 60 days, otherwise this report will be marked as "Expired". Or mark it as "Fix Released" if the problem has been solved with a newer version of QEMU already. Thank you and sorry for the inconvenience.

Changed in qemu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.