diff options
author | Chris Elliott <chriselliott@google.com> | 2014-10-15 00:49:17 +0000 |
---|---|---|
committer | Chris Elliott <chriselliott@google.com> | 2014-10-15 00:49:17 +0000 |
commit | 2feb18ddfdbd20941ebcc3314780a582da5608e4 (patch) | |
tree | 56c8eebf0dda1560737408bf8c8e20019d17193b /media | |
parent | 8c0417c173d1fd618ae54e2d721b0ec360ea70cc (diff) | |
download | frameworks_av-2feb18ddfdbd20941ebcc3314780a582da5608e4.zip frameworks_av-2feb18ddfdbd20941ebcc3314780a582da5608e4.tar.gz frameworks_av-2feb18ddfdbd20941ebcc3314780a582da5608e4.tar.bz2 |
Revert "audio: prevent larger than required sleeps - DO NOT MERGE"
This reverts commit 8c0417c173d1fd618ae54e2d721b0ec360ea70cc.
Reverting as we only wanted to include this CL the KNX01M build
Change-Id: Ib53292de658078285a38710915168e1746486fea
Diffstat (limited to 'media')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 4cc50cc..e290627 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -18,21 +18,15 @@ //#define LOG_NDEBUG 0 #define LOG_TAG "AudioTrack" -#define ATRACE_TAG ATRACE_TAG_AUDIO #include <sys/resource.h> #include <audio_utils/primitives.h> #include <binder/IPCThreadState.h> #include <media/AudioTrack.h> #include <utils/Log.h> -#include <utils/Trace.h> #include <private/media/AudioTrackShared.h> #include <media/IAudioFlinger.h> -extern "C" { -#include "../private/bionic_futex.h" -} - #define WAIT_PERIOD_MS 10 #define WAIT_STREAM_END_TIMEOUT_SEC 120 @@ -1612,21 +1606,7 @@ nsecs_t AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread) if (ns < 0 || myns < ns) { ns = myns; } - int32_t old = android_atomic_and(~CBLK_FUTEX_WAKE, &mCblk->mFutex); - char str[64] = {0}; - struct timespec ts; - - snprintf(str, sizeof(str), "futex_wait timeout %lld Us", ns/1000LL); - - ATRACE_BEGIN(str); - ts.tv_sec = 0; - ts.tv_nsec = ns; - // wait for max ns allowing server to wake us up if possible - int ret = __futex_syscall4(&mCblk->mFutex, - FUTEX_WAIT, - old & ~CBLK_FUTEX_WAKE, &ts); - ATRACE_END(); - return 0; //retry immediately as space (possibly) became available + return ns; } } |