summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorJindrich Makovicka <makovick@gmail.com>2010-10-17 19:28:14 +0200
committermalc <av1474@comtv.ru>2010-10-18 00:39:02 +0400
commit22d948a2d97434192018bdabaf0a50cda7f994be (patch)
tree78452d341f2a4146f88c7eb8aa62df92584635ce /audio
parentf871d6893a7bf8c14db162f6e75a5f8157e4c2bb (diff)
downloadqemu-22d948a2d97434192018bdabaf0a50cda7f994be.tar.gz
qemu-22d948a2d97434192018bdabaf0a50cda7f994be.tar.bz2
qemu-22d948a2d97434192018bdabaf0a50cda7f994be.zip
fix 100% CPU load when idle with ALSA
Playback control function did not disable polling when playback stops. Caused busy spinning of the main loop due to unprocessed events. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'audio')
-rw-r--r--audio/alsaaudio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index f0171f9842..3ca40780ec 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -889,6 +889,10 @@ static int alsa_ctl_out (HWVoiceOut *hw, int cmd, ...)
case VOICE_DISABLE:
ldebug ("disabling voice\n");
+ if (hw->poll_mode) {
+ hw->poll_mode = 0;
+ alsa_fini_poll (&alsa->pollhlp);
+ }
return alsa_voice_ctl (alsa->handle, "playback", 1);
}