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>
This commit is contained in:
Jindrich Makovicka 2010-10-17 19:28:14 +02:00 committed by malc
parent f871d6893a
commit 22d948a2d9

View File

@ -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);
}