From: Jindrich Makovicka Date: Sun, 17 Oct 2010 17:28:14 +0000 (+0200) Subject: fix 100% CPU load when idle with ALSA X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~7082 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22d948a2d97434192018bdabaf0a50cda7f994be;p=sdk%2Femulator%2Fqemu.git 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 Signed-off-by: malc --- diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index f0171f9..3ca4078 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); }