From e62e55701ef07bfa9f5805718ceac2c54ead3dbc Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 22 Apr 2010 23:12:46 +0200 Subject: [PATCH] audiod: Avoid busy loop if switched off. Also, request a minimal delay if the status task has to be shut down. --- audiod.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/audiod.c b/audiod.c index cc4164fe..380e53e0 100644 --- 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; - 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); -- 2.39.5