summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-02-07 23:36:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-07 23:36:34 +0000
commit8f762d577f2dcf34357eb8731070ae465649ec9a (patch)
treedd74d379fd4067025aae50732e5964904132e903 /services
parentbbbb1e80f461616cd9814de125f95f5b89cf5870 (diff)
parent4944acb7355b3aa25748fd25945a363a69d65444 (diff)
downloadframeworks_av-8f762d577f2dcf34357eb8731070ae465649ec9a.zip
frameworks_av-8f762d577f2dcf34357eb8731070ae465649ec9a.tar.gz
frameworks_av-8f762d577f2dcf34357eb8731070ae465649ec9a.tar.bz2
Merge "Fix whitespace"
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioPolicyService.cpp2
-rw-r--r--services/audioflinger/Threads.cpp28
-rw-r--r--services/audioflinger/Threads.h4
-rw-r--r--services/audioflinger/Tracks.cpp3
4 files changed, 19 insertions, 18 deletions
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index 6a115ff..03a5390 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -60,7 +60,7 @@ namespace {
// ----------------------------------------------------------------------------
AudioPolicyService::AudioPolicyService()
- : BnAudioPolicyService() , mpAudioPolicyDev(NULL) , mpAudioPolicy(NULL)
+ : BnAudioPolicyService(), mpAudioPolicyDev(NULL), mpAudioPolicy(NULL)
{
char value[PROPERTY_VALUE_MAX];
const struct hw_module_t *module;
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 7de688e..7751b08 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -2360,20 +2360,20 @@ bool AudioFlinger::PlaybackThread::threadLoop()
(mMixerStatus == MIXER_DRAIN_ALL)) {
threadLoop_drain();
}
-if (mType == MIXER) {
- // write blocked detection
- nsecs_t now = systemTime();
- nsecs_t delta = now - mLastWriteTime;
- if (!mStandby && delta > maxPeriod) {
- mNumDelayedWrites++;
- if ((now - lastWarning) > kWarningThrottleNs) {
- ATRACE_NAME("underrun");
- ALOGW("write blocked for %llu msecs, %d delayed writes, thread %p",
- ns2ms(delta), mNumDelayedWrites, this);
- lastWarning = now;
+ if (mType == MIXER) {
+ // write blocked detection
+ nsecs_t now = systemTime();
+ nsecs_t delta = now - mLastWriteTime;
+ if (!mStandby && delta > maxPeriod) {
+ mNumDelayedWrites++;
+ if ((now - lastWarning) > kWarningThrottleNs) {
+ ATRACE_NAME("underrun");
+ ALOGW("write blocked for %llu msecs, %d delayed writes, thread %p",
+ ns2ms(delta), mNumDelayedWrites, this);
+ lastWarning = now;
+ }
}
}
-}
} else {
usleep(sleepTime);
@@ -4631,8 +4631,7 @@ reacquire_wakelock:
readInto = mRsmpInBuffer;
mRsmpInIndex = 0;
}
- mBytesRead = mInput->stream->read(mInput->stream, readInto,
- mBufferSize);
+ mBytesRead = mInput->stream->read(mInput->stream, readInto, mBufferSize);
if (mBytesRead <= 0) {
// TODO: verify that it's benign to use a stale track state
if ((mBytesRead < 0) && (activeTrackState == TrackBase::ACTIVE))
@@ -4819,6 +4818,7 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe
ALOGE("createRecordTrack_l() audio driver not initialized");
goto Exit;
}
+
// client expresses a preference for FAST, but we get the final say
if (*flags & IAudioFlinger::TRACK_FAST) {
if (
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 9bf59d8..f5b5efd 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -307,12 +307,12 @@ protected:
Vector<ConfigEvent *> mConfigEvents;
// These fields are written and read by thread itself without lock or barrier,
- // and read by other threads without lock or barrier via standby() , outDevice()
+ // and read by other threads without lock or barrier via standby(), outDevice()
// and inDevice().
// Because of the absence of a lock or barrier, any other thread that reads
// these fields must use the information in isolation, or be prepared to deal
// with possibility that it might be inconsistent with other information.
- bool mStandby; // Whether thread is currently in standby.
+ bool mStandby; // Whether thread is currently in standby.
audio_devices_t mOutDevice; // output device
audio_devices_t mInDevice; // input device
audio_source_t mAudioSource; // (see audio.h, audio_source_t)
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 8004b99..d1c6a06 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -1001,7 +1001,8 @@ AudioFlinger::PlaybackThread::TimedTrack::create(
size_t frameCount,
const sp<IMemory>& sharedBuffer,
int sessionId,
- int uid) {
+ int uid)
+{
if (!client->reserveTimedTrack())
return 0;