Lines Matching defs:thread
66 ThreadBase *thread,
83 mThread(thread),
103 mThreadIoHandle(thread ? thread->id() : AUDIO_IO_HANDLE_NONE),
170 const sp<MemoryDealer> roHeap(thread->readOnlyHeap());
186 mBufferMemory = thread->pipeMemory();
283 const ThreadBase& thread,
291 uint64_t mixBufferNs = ((uint64_t)2 * thread.frameCount() * 1000000000) /
292 thread.sampleRate();
317 // will be freed from the main thread once all pending buffers have
498 PlaybackThread *thread,
515 : TrackBase(thread, client, attr, sampleRate, format, channelMask, frameCount,
525 mMainBuffer(thread->sinkBuffer()),
561 if (!thread->isTrackAllowed_l(channelMask, format, sessionId, uid)) {
571 ALOG_ASSERT(thread->mFastTrackAvailMask != 0);
572 int i = __builtin_ctz(thread->mFastTrackAvailMask);
579 thread->mFastTrackAvailMask &= ~(1 << i);
582 mServerLatencySupported = thread->type() == ThreadBase::MIXER
583 || thread->type() == ThreadBase::DUPLICATING;
631 sp<ThreadBase> thread = mThread.promote();
632 if (thread != 0) {
633 Mutex::Autolock _l(thread->mLock);
634 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
867 // from a different thread than the one calling Proxy->obtainBuffer() and
929 sp<ThreadBase> thread = mThread.promote();
930 if (thread != 0) {
932 Mutex::Autolock _laf(thread->mAudioFlinger->mLock);
933 Mutex::Autolock _lth(thread->mLock);
934 sp<EffectChain> ec = thread->getEffectChain_l(mSessionId);
935 if (thread->mAudioFlinger->isNonOffloadableGlobalEffectEnabled_l() ||
941 Mutex::Autolock _lth(thread->mLock);
953 ALOGV("%s(%d): PAUSED => STOPPING_1 on thread %d",
957 ALOGV("%s(%d): PAUSED => RESUMING on thread %d",
962 ALOGV("%s(%d): ? => ACTIVE on thread %d",
971 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
997 // It is usually unsafe to access the server proxy from a binder thread.
998 // But in this case we know the mixer thread (whether normal mixer or fast mixer)
999 // isn't looking at this track yet: we still hold the normal mixer thread lock,
1000 // and for fast tracks the track is not yet in the fast mixer thread's active set.
1018 sp<ThreadBase> thread = mThread.promote();
1019 if (thread != 0) {
1020 Mutex::Autolock _l(thread->mLock);
1024 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
1041 ALOGV("%s(%d): not stopping/stopped => stopping/stopped on thread %d",
1051 sp<ThreadBase> thread = mThread.promote();
1052 if (thread != 0) {
1053 Mutex::Autolock _l(thread->mLock);
1054 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
1069 ALOGV("%s(%d): ACTIVE/RESUMING => PAUSING on thread %d",
1085 sp<ThreadBase> thread = mThread.promote();
1086 if (thread != 0) {
1087 Mutex::Autolock _l(thread->mLock);
1088 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
1137 // before mixer thread can run. This is important when offloading
1145 // must be called with thread lock held
1161 // the audioflinger thread detects the track is stopped.
1176 sp<ThreadBase> thread = mThread.promote();
1177 if (thread == 0) {
1178 ALOGE("%s(%d): thread is dead", __func__, mId);
1180 } else if ((thread->type() == ThreadBase::DIRECT) ||
1181 (thread->type() == ThreadBase::OFFLOAD)) {
1182 return thread->setParameters(keyValuePairs);
1190 sp<ThreadBase> thread = mThread.promote();
1191 if (thread == 0) {
1192 ALOGE("thread is dead");
1194 } else if ((thread->type() == ThreadBase::DIRECT) || (thread->type() == ThreadBase::OFFLOAD)) {
1195 DirectOutputThread *directOutputThread = static_cast<DirectOutputThread*>(thread.get());
1226 // Signal thread to fetch new volume.
1227 sp<ThreadBase> thread = mThread.promote();
1228 if (thread != 0) {
1229 Mutex::Autolock _l(thread->mLock);
1230 thread->broadcast_l();
1238 // Note: We don't check if Thread exists.
1240 // mVolumeHandler is thread safe.
1271 sp<ThreadBase> thread = mThread.promote();
1272 if (thread == 0) {
1276 Mutex::Autolock _l(thread->mLock);
1277 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
1283 sp<ThreadBase> thread = mThread.promote();
1284 if (thread == nullptr) {
1288 sp<PlaybackThread> dstThread = (PlaybackThread *)thread.get();
1431 sp<ThreadBase> thread = mThread.promote();
1432 if (thread != 0) {
1433 PlaybackThread *t = (PlaybackThread *)thread.get();
1439 //To be called with thread lock held
1452 //To be called with thread lock held
1467 //To be called with thread lock held
1486 // Our timestamps are only updated when the track is on the Thread active list.
1522 sp<ThreadBase> thread = mTrack->mThread.promote();
1523 if (thread != 0) {
1525 Mutex::Autolock _l(thread->mLock);
1526 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
1539 sp<ThreadBase> thread = mTrack->mThread.promote();
1540 if (thread != 0) {
1542 Mutex::Autolock _l(thread->mLock);
1543 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
1589 ALOGW("%s(%d): Error creating output track on thread %d",
1652 ALOGV("%s(%d): thread %d no more output buffers; status %d",
1690 ALOGV("%s(%d): thread %d released overflow buffer %zu",
1701 sp<ThreadBase> thread = mThread.promote();
1702 if (thread != 0 && !thread->standby()) {
1710 ALOGV("%s(%d): thread %d adding overflow buffer %zu", __func__, mId,
1715 ALOGW("%s(%d): thread %d no more overflow buffers",
1943 RecordThread *thread,
1958 : TrackBase(thread, client, attr, sampleRate, format,
1978 thread->mChannelMask, thread->mFormat, thread->mSampleRate,
1998 ALOG_ASSERT(thread->mFastTrackAvail);
1999 thread->mFastTrackAvail = false;
2045 sp<ThreadBase> thread = mThread.promote();
2046 if (thread != 0) {
2047 RecordThread *recordThread = (RecordThread *)thread.get();
2056 sp<ThreadBase> thread = mThread.promote();
2057 if (thread != 0) {
2058 RecordThread *recordThread = (RecordThread *)thread.get();
2071 sp<ThreadBase> thread = mThread.promote();
2072 if (thread != 0) {
2073 Mutex::Autolock _l(thread->mLock);
2074 RecordThread *recordThread = (RecordThread *) thread.get();
2079 // NOTE: if thread doesn't exist, the input descriptor probably doesn't either.
2224 sp<ThreadBase> thread = mThread.promote();
2225 if (thread != 0) {
2226 RecordThread *recordThread = (RecordThread *)thread.get();
2235 sp<ThreadBase> thread = mThread.promote();
2236 if (thread != 0) {
2237 RecordThread *recordThread = (RecordThread *)thread.get();
2245 sp<ThreadBase> thread = mThread.promote();
2246 if (thread != 0) {
2247 RecordThread *recordThread = (RecordThread *)thread.get();
2329 AudioFlinger::MmapThread::MmapTrack::MmapTrack(ThreadBase *thread,
2340 : TrackBase(thread, NULL, attr, sampleRate, format,