sound broken in qemu 0.12.x

Bug #510612 reported by SergK
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Low
Unassigned
qemu (Debian)
New
Undecided
Unassigned
qemu-kvm (Debian)
Fix Released
Unknown

Bug Description

In qemu 0.12.x there is a jitter when sound is played by guest Windows XP SP2. Also there are warnings on console:

alsa: Unexpected state 1
alsa: Unexpected state 1

and qemu tries to eat 100% cpu. According to strace it polls alsa device continuously:

futex(0x849e60, FUTEX_WAKE_PRIVATE, 1) = 1
select(23, [6 10 12 20 22], [18], [], {1, 0}) = 1 (out [18], left {0, 999997})
poll([{fd=18, events=POLLOUT|POLLERR|POLLNVAL}], 1, 0) = 1 ([{fd=18, revents=POLLOUT|POLLERR}])
write(2, "alsa: "..., 6) = 6
write(2, "Unexpected state 1\n"..., 19) = 19

The bug appears with ac97 and es1370 guest sound devices (i didn't test others).

With OSS host sound driver there are no warnings and consumption of cpu by qemu is normal, but jitter in the sound is still there.

Tags: alsa
Revision history for this message
SergK (sergk) wrote :

P.S. qemu 0.11.1 works perfectly in the same situation

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 510612] Re: sound broken in qemu 0.12.x

I'm curious if you've tried the pa (pulseaudio) sound driver?

Revision history for this message
SergK (sergk) wrote :

I'v tried pulseaudio. There is no problem with it. Sound is clear and cpu consumption is normal.
But with sdl driver sound is worse than with alsa or oss and there are such warnings:

A bug was just triggered in audio_run_out
Context:
audio: played=1024 sw->total_hw_samples_mixed=1022
A bug was just triggered in audio_run_out
Context:
audio: played=2044 sw->total_hw_samples_mixed=1024

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Anthony, can you reproduce this?

I use pulseaudio here, and it works well.

Changed in qemu:
importance: Undecided → Low
Revision history for this message
Anthony Liguori (anthony-codemonkey) wrote :

Best thing to do is send a note to qemu-devel CC'ing the audio maintainer (malc <email address hidden>).

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

SergK- I recommend you send that email, as pulseaudio is the
recommended sound driver for Ubuntu, and that seems to be working here
well for me. Thanks.

tags: added: windows
Revision history for this message
Michael Tokarev (mjt+launchpad-tls) wrote :

Isn't it the case that's fixed by commit d9812b033a17c82f9e933757c1c3ef364e3ba62d as shown in http://comments.gmane.org/gmane.comp.emulators.qemu/72593 which is actually this very bugreport mirrored to qemu-devel mailinglist?

Revision history for this message
Michael Tokarev (mjt+launchpad-tls) wrote :

More information about this. The mentioned commit fixes just the messages apparently, but not the actual problem which is elsewhere. The complete fix consists of 3 patches: the above in comment#7, and also 22d948a2d97434192018bdabaf0a50cda7f994be and 38cc9b607f85017b095793cab6c129bc9844f441 from qemu-kvm git tree (both applies and applicable for 0.12 as well as 0.13).

tags: added: alsa
removed: windows
Changed in qemu-kvm (Debian):
status: Unknown → Fix Committed
Changed in qemu-kvm (Debian):
status: Fix Committed → Fix Released
Aurelien Jarno (aurel32)
Changed in qemu:
status: New → Fix Released
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.