audiod: Avoid busy loop in standby/off mode.
authorAndre Noll <maan@systemlinux.org>
Thu, 22 Apr 2010 21:05:26 +0000 (23:05 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 22 Apr 2010 21:05:26 +0000 (23:05 +0200)
Without this patch, must_start_decoder() incorrectly returned true if para_server
is announcing a stream but the audiod status is not on. This results in
status_pre_select() requesting a minimal delay.

audiod.c

index 32047a1..1bed20c 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -633,6 +633,8 @@ static bool must_start_decoder(void)
        int cafn = stat_task->current_audio_format_num;
        unsigned vs = stat_task->vss_status;
 
+       if (audiod_status != AUDIOD_ON)
+               return false;
        if (cafn < 0)
                return false;
        if (!stat_task->ct)