Lines Matching refs:thread

67             ThreadBase *thread,
81 mThread(thread),
100 mThreadIoHandle(thread->id()),
158 const sp<MemoryDealer> roHeap(thread->readOnlyHeap());
173 mBufferMemory = thread->pipeMemory();
297 // will be freed from the main thread once all pending buffers have
363 PlaybackThread *thread,
377 : TrackBase(thread, client, sampleRate, format, channelMask, frameCount,
387 mMainBuffer(thread->mixBuffer()),
434 mName = thread->getTrackName_l(channelMask, format, sessionId, uid);
445 ALOG_ASSERT(thread->mFastTrackAvailMask != 0);
446 int i = __builtin_ctz(thread->mFastTrackAvailMask);
453 thread->mFastTrackAvailMask &= ~(1 << i);
492 sp<ThreadBase> thread = mThread.promote();
493 if (thread != 0) {
494 Mutex::Autolock _l(thread->mLock);
495 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
631 // from a different thread than the one calling Proxy->obtainBuffer() and
686 sp<ThreadBase> thread = mThread.promote();
687 if (thread != 0) {
689 Mutex::Autolock _laf(thread->mAudioFlinger->mLock);
690 Mutex::Autolock _lth(thread->mLock);
691 sp<EffectChain> ec = thread->getEffectChain_l(mSessionId);
692 if (thread->mAudioFlinger->isNonOffloadableGlobalEffectEnabled_l() ||
698 Mutex::Autolock _lth(thread->mLock);
710 ALOGV("PAUSED => STOPPING_1 (%d) on thread %p", mName, this);
713 ALOGV("PAUSED => RESUMING (%d) on thread %p", mName, this);
717 ALOGV("? => ACTIVE (%d) on thread %p", mName, this);
725 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
745 // It is usually unsafe to access the server proxy from a binder thread.
746 // But in this case we know the mixer thread (whether normal mixer or fast mixer)
747 // isn't looking at this track yet: we still hold the normal mixer thread lock,
748 // and for fast tracks the track is not yet in the fast mixer thread's active set.
763 sp<ThreadBase> thread = mThread.promote();
764 if (thread != 0) {
765 Mutex::Autolock _l(thread->mLock);
769 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
786 ALOGV("not stopping/stopped => stopping/stopped (%d) on thread %p", mName,
795 sp<ThreadBase> thread = mThread.promote();
796 if (thread != 0) {
797 Mutex::Autolock _l(thread->mLock);
798 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
813 ALOGV("ACTIVE/RESUMING => PAUSING (%d) on thread %p", mName, thread.get());
826 sp<ThreadBase> thread = mThread.promote();
827 if (thread != 0) {
828 Mutex::Autolock _l(thread->mLock);
829 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
877 // before mixer thread can run. This is important when offloading
883 // must be called with thread lock held
899 // the audioflinger thread detects the track is stopped.
914 sp<ThreadBase> thread = mThread.promote();
915 if (thread == 0) {
916 ALOGE("thread is dead");
918 } else if ((thread->type() == ThreadBase::DIRECT) ||
919 (thread->type() == ThreadBase::OFFLOAD)) {
920 return thread->setParameters(keyValuePairs);
949 // Signal thread to fetch new volume.
950 sp<ThreadBase> thread = mThread.promote();
951 if (thread != 0) {
952 Mutex::Autolock _l(thread->mLock);
953 thread->broadcast_l();
963 // mVolumeHandler is thread safe.
972 sp<ThreadBase> thread = mThread.promote();
973 if (thread == 0) {
977 Mutex::Autolock _l(thread->mLock);
978 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
985 sp<ThreadBase> thread = mThread.promote();
986 if (thread != 0) {
987 PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
1156 sp<ThreadBase> thread = mThread.promote();
1157 if (thread != 0) {
1158 PlaybackThread *t = (PlaybackThread *)thread.get();
1164 //To be called with thread lock held
1177 //To be called with thread lock held
1192 //To be called with thread lock held
1258 ALOGW("Error creating output track on thread %p", playbackThread);
1320 ALOGV("OutputTrack::write() %p thread %p no more output buffers; status %d", this,
1355 ALOGV("OutputTrack::write() %p thread %p released overflow buffer %zu", this,
1365 sp<ThreadBase> thread = mThread.promote();
1366 if (thread != 0 && !thread->standby()) {
1374 ALOGV("OutputTrack::write() %p thread %p adding overflow buffer %zu", this,
1377 ALOGW("OutputTrack::write() %p thread %p no more overflow buffers",
1563 RecordThread *thread,
1575 : TrackBase(thread, client, sampleRate, format,
1592 thread->mChannelMask, thread->mFormat, thread->mSampleRate,
1611 ALOG_ASSERT(thread->mFastTrackAvail);
1612 thread->mFastTrackAvail = false;
1650 sp<ThreadBase> thread = mThread.promote();
1651 if (thread != 0) {
1652 RecordThread *recordThread = (RecordThread *)thread.get();
1661 sp<ThreadBase> thread = mThread.promote();
1662 if (thread != 0) {
1663 RecordThread *recordThread = (RecordThread *)thread.get();
1681 sp<ThreadBase> thread = mThread.promote();
1682 if (thread != 0) {
1683 Mutex::Autolock _l(thread->mLock);
1684 RecordThread *recordThread = (RecordThread *) thread.get();
1831 AudioFlinger::MmapThread::MmapTrack::MmapTrack(ThreadBase *thread,
1838 : TrackBase(thread, NULL, sampleRate, format,