Package: qemu-kvm
Version: 0.12.4+dfsg-1
Severity: normal
Tags: upstream patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The qemu monitor prints "alsa: Unexpected state 1" in a tight busy
loop when running kvm with "-soundhw ac97". This loop consumes so
much CPU that it slows down the virtual machine, and the large 
number of error messages makes the monitor useless.

This bug has been fixed upstream, but for some reason not in the 
stable upstream branch.  I'm attaching a patch, cherry picked
from the upstream master branch.  

This patch fixes the problem for me when applied to the currently
unreleased 0.12.4+dfsg-2 debian version.



Bjørn

- -- Package-specific info:


/proc/cpuinfo:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     U9400  @ 1.40GHz
stepping        : 6
cpu MHz         : 800.000
cache size      : 3072 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm 
constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor 
ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm ida tpr_shadow vnmi 
flexpriority
bogomips        : 2793.38
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     U9400  @ 1.40GHz
stepping        : 6
cpu MHz         : 800.000
cache size      : 3072 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm 
constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor 
ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm ida tpr_shadow vnmi 
flexpriority
bogomips        : 2793.67
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:




- -- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (700, 'stable'), (600, 'unstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages qemu-kvm depends on:
ii  adduser                 3.112            add and remove users and groups
ii  bridge-utils            1.4-5            Utilities for configuring the Linu
ii  iproute                 20100519-2       networking and traffic control too
ii  libaio1                 0.3.107-7        Linux kernel AIO access library - 
ii  libasound2              1.0.23-1         shared library for ALSA applicatio
ii  libbluetooth3           4.66-1           Library to use the BlueZ Linux Blu
ii  libbrlapi0.5            4.2-2+b1         braille display access via BRLTTY 
ii  libc6                   2.11.2-2         Embedded GNU C Library: Shared lib
ii  libcurl3-gnutls         7.21.0-1         Multi-protocol file transfer libra
ii  libgnutls26             2.8.6-1          the GNU TLS library - runtime libr
ii  libncurses5             5.7+20100313-2   shared libraries for terminal hand
ii  libpci3                 1:3.1.7-4        Linux PCI Utilities (shared librar
ii  libpulse0               0.9.21-3         PulseAudio client libraries
ii  libsasl2-2              2.1.23.dfsg1-5   Cyrus SASL - authentication abstra
ii  libsdl1.2debian         1.2.14-6         Simple DirectMedia Layer
ii  libuuid1                2.17.2-3.1       Universally Unique ID library
ii  libvdeplug2             2.2.3-3          Virtual Distributed Ethernet - Plu
ii  libx11-6                2:1.3.3-3        X11 client-side library
ii  python                  2.6.5-5          An interactive high-level object-o
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages qemu-kvm recommends:
ii  linux-image-2.6.32-4-amd64 [l 2.6.32-11  Linux 2.6.32 for 64-bit PCs
ii  linux-image-2.6.32-5-amd64 [l 2.6.32-17  Linux 2.6.32 for 64-bit PCs

Versions of packages qemu-kvm suggests:
pn  debootstrap                   <none>     (no description available)
pn  samba                         <none>     (no description available)
ii  vde2                          2.2.3-3    Virtual Distributed Ethernet

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkw8Of0ACgkQ10rqkowbIsnJZwCeO70wUbqX4FNRAtHLMMEBV02v
LMwAoIZdyYR7hnOrzstKFmQ0UDzza6D6
=NupA
-----END PGP SIGNATURE-----
>From cf50ec03c78e2ac976f731cc890dd0824ac43658 Mon Sep 17 00:00:00 2001
From: malc <[email protected]>
Date: Sun, 28 Feb 2010 18:34:21 +0300
Subject: [PATCH] audio/alsa: Handle SND_PCM_STATE_SETUP in alsa_poll_handler
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: malc <[email protected]>
(cherry picked from commit d9812b033a17c82f9e933757c1c3ef364e3ba62d)

Signed-off-by: Bjørn Mork <[email protected]>
---
 audio/alsaaudio.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 6a9b87a..88344ff 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -213,6 +213,10 @@ static void alsa_poll_handler (void *opaque)
 
     state = snd_pcm_state (hlp->handle);
     switch (state) {
+    case SND_PCM_STATE_SETUP:
+        alsa_recover (hlp->handle);
+        break;
+
     case SND_PCM_STATE_XRUN:
         alsa_recover (hlp->handle);
         break;
-- 
1.7.1

Reply via email to