summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/ISchedulingPolicyService.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-04-23 12:39:37 -0700
committerGlenn Kasten <gkasten@google.com>2013-04-23 14:18:18 -0700
commita07f17ca46db04c9d5d9e7d6b2878db59ca2b9ea (patch)
tree5f35039b1b7ed7518280e9a436536600a5aac5c9 /services/audioflinger/ISchedulingPolicyService.h
parent5e43772296d7c5b8faf4b0ce4efe68778729bc74 (diff)
downloadframeworks_av-a07f17ca46db04c9d5d9e7d6b2878db59ca2b9ea.zip
frameworks_av-a07f17ca46db04c9d5d9e7d6b2878db59ca2b9ea.tar.gz
frameworks_av-a07f17ca46db04c9d5d9e7d6b2878db59ca2b9ea.tar.bz2
Remove timing jitter during startup of audio
This fixes a regression introduced recently, that increased timing jitter during the startup of the FastMixer and AudioTrack callback threads. The regression was to make requestPriority() asynchronous as a way to avoid an apparent priority inversion in system_server. This means that the target thread could run briefly with the initial priority, before the new priority takes effect. This change removes the startup jitter for FastMixer, by making the requestPriority() synchronous again for that case. It doesn't matter that this restores the priority inversion involving normal mixer thread, because it happens during startup of both threads. The change also removes the startup jitter for the AudioTrack callback thread, by having the target thread check whether the requestPriority() has completed yet. If not, the target thread blocks with a timeout until the priority boost finishes. Finally, we now log an error message if the expected priority boost doesn't happen. Bug: 8698989 Change-Id: Id590e9a274b70ec1ba85b44a585ee37a22e41cbc
Diffstat (limited to 'services/audioflinger/ISchedulingPolicyService.h')
-rw-r--r--services/audioflinger/ISchedulingPolicyService.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/audioflinger/ISchedulingPolicyService.h b/services/audioflinger/ISchedulingPolicyService.h
index a38e67e..b94b191 100644
--- a/services/audioflinger/ISchedulingPolicyService.h
+++ b/services/audioflinger/ISchedulingPolicyService.h
@@ -27,7 +27,7 @@ public:
DECLARE_META_INTERFACE(SchedulingPolicyService);
virtual int requestPriority(/*pid_t*/int32_t pid, /*pid_t*/int32_t tid,
- int32_t prio) = 0;
+ int32_t prio, bool asynchronous) = 0;
};