]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod.c
audiod: Avoid busy loop if switched off.
[paraslash.git] / audiod.c
index cc4164fead07425382e539f90261dead037c6279..380e53e0fbae30cf9c949afea6d247d71396eb37 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -1152,7 +1152,9 @@ static void status_pre_select(struct sched *s, struct task *t)
        ret = btr_node_status(st->btrn, 0, BTR_NT_LEAF);
        if (ret > 0)
                goto min_delay;
        ret = btr_node_status(st->btrn, 0, BTR_NT_LEAF);
        if (ret > 0)
                goto min_delay;
-       if (!st->ct)
+       if (st->ct && audiod_status == AUDIOD_OFF)
+               goto min_delay;
+       if (!st->ct && audiod_status != AUDIOD_OFF)
                sched_request_barrier_or_min_delay(&st->restart_barrier, s);
        if (cafn >= 0)
                sched_request_barrier(&afi[cafn].restart_barrier, s);
                sched_request_barrier_or_min_delay(&st->restart_barrier, s);
        if (cafn >= 0)
                sched_request_barrier(&afi[cafn].restart_barrier, s);