diff options
author | Glenn Kasten <gkasten@google.com> | 2012-11-06 15:03:34 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-11-06 17:25:22 -0800 |
commit | c26741598a840f7c1d12ee457fb26f68fcdbcc70 (patch) | |
tree | 01156c9a64d61fe07a82d913c1aaa3aeb30adf94 /services | |
parent | 96f1528dd637c6e806456d56c635ab2e92b0bd9b (diff) | |
download | frameworks_av-c26741598a840f7c1d12ee457fb26f68fcdbcc70.zip frameworks_av-c26741598a840f7c1d12ee457fb26f68fcdbcc70.tar.gz frameworks_av-c26741598a840f7c1d12ee457fb26f68fcdbcc70.tar.bz2 |
Remove CBLK_FAST from control block flags
This is part of a series to clean up the control block.
Change-Id: Ic881a3560d9547cb63fcc0cefec87aa3da480e0d
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 15 | ||||
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 4 |
2 files changed, 9 insertions, 10 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index cb44114..379e936 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -451,7 +451,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( audio_format_t format, audio_channel_mask_t channelMask, int frameCount, - IAudioFlinger::track_flags_t flags, + IAudioFlinger::track_flags_t *flags, const sp<IMemory>& sharedBuffer, audio_io_handle_t output, pid_t tid, @@ -1725,17 +1725,17 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac int frameCount, const sp<IMemory>& sharedBuffer, int sessionId, - IAudioFlinger::track_flags_t flags, + IAudioFlinger::track_flags_t *flags, pid_t tid, status_t *status) { sp<Track> track; status_t lStatus; - bool isTimed = (flags & IAudioFlinger::TRACK_TIMED) != 0; + bool isTimed = (*flags & IAudioFlinger::TRACK_TIMED) != 0; // client expresses a preference for FAST, but we get the final say - if (flags & IAudioFlinger::TRACK_FAST) { + if (*flags & IAudioFlinger::TRACK_FAST) { if ( // not timed (!isTimed) && @@ -1781,7 +1781,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac isTimed, sharedBuffer.get(), frameCount, mFrameCount, format, audio_is_linear_pcm(format), channelMask, sampleRate, mSampleRate, hasFastMixer(), tid, mFastTrackAvailMask); - flags &= ~IAudioFlinger::TRACK_FAST; + *flags &= ~IAudioFlinger::TRACK_FAST; // For compatibility with AudioTrack calculation, buffer depth is forced // to be at least 2 x the normal mixer frame count and cover audio hardware latency. // This is probably too conservative, but legacy application code may depend on it. @@ -1845,7 +1845,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac if (!isTimed) { track = new Track(this, client, streamType, sampleRate, format, - channelMask, frameCount, sharedBuffer, sessionId, flags); + channelMask, frameCount, sharedBuffer, sessionId, *flags); } else { track = TimedTrack::create(this, client, streamType, sampleRate, format, channelMask, frameCount, sharedBuffer, sessionId); @@ -1864,7 +1864,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac chain->incTrackCnt(); } - if ((flags & IAudioFlinger::TRACK_FAST) && (tid != -1)) { + if ((*flags & IAudioFlinger::TRACK_FAST) && (tid != -1)) { pid_t callingPid = IPCThreadState::self()->getCallingPid(); // we don't have CAP_SYS_NICE, nor do we want to have it as it's too powerful, // so ask activity manager to do this on our behalf @@ -4377,7 +4377,6 @@ AudioFlinger::PlaybackThread::Track::Track( } // only allocate a fast track index if we were able to allocate a normal track name if (flags & IAudioFlinger::TRACK_FAST) { - mCblk->flags |= CBLK_FAST; // atomic op not needed yet ALOG_ASSERT(thread->mFastTrackAvailMask != 0); int i = __builtin_ctz(thread->mFastTrackAvailMask); ALOG_ASSERT(0 < i && i < (int)FastMixerState::kMaxFastTracks); diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 2251b45..de2fbfa 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -93,7 +93,7 @@ public: audio_format_t format, audio_channel_mask_t channelMask, int frameCount, - IAudioFlinger::track_flags_t flags, + IAudioFlinger::track_flags_t *flags, const sp<IMemory>& sharedBuffer, audio_io_handle_t output, pid_t tid, @@ -1089,7 +1089,7 @@ public: int frameCount, const sp<IMemory>& sharedBuffer, int sessionId, - IAudioFlinger::track_flags_t flags, + IAudioFlinger::track_flags_t *flags, pid_t tid, status_t *status); |