Lines Matching refs:thread

68             ThreadBase *thread,  in TrackBase()  argument
86 mThread(thread), in TrackBase()
106 mThreadIoHandle(thread ? thread->id() : AUDIO_IO_HANDLE_NONE), in TrackBase()
174 const sp<MemoryDealer> roHeap(thread->readOnlyHeap()); in TrackBase()
190 mBufferMemory = thread->pipeMemory(); in TrackBase()
282 const ThreadBase& thread, in PatchTrackBase() argument
290 uint64_t mixBufferNs = ((uint64_t)2 * thread.frameCount() * 1000000000) / in PatchTrackBase()
291 thread.sampleRate(); in PatchTrackBase()
497 PlaybackThread *thread, in Track() argument
515 : TrackBase(thread, client, attr, sampleRate, format, channelMask, frameCount, in Track()
531 mMainBuffer(thread->sinkBuffer()), in Track()
559 if (!thread->isTrackAllowed_l(channelMask, format, sessionId, uid)) { in Track()
580 ALOG_ASSERT(thread->mFastTrackAvailMask != 0); in Track()
581 int i = __builtin_ctz(thread->mFastTrackAvailMask); in Track()
588 thread->mFastTrackAvailMask &= ~(1 << i); in Track()
591 mServerLatencySupported = thread->type() == ThreadBase::MIXER in Track()
592 || thread->type() == ThreadBase::DUPLICATING; in Track()
644 sp<ThreadBase> thread = mThread.promote(); in destroy() local
645 if (thread != 0) { in destroy()
646 Mutex::Autolock _l(thread->mLock); in destroy()
647 PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); in destroy()
919 sp<ThreadBase> thread = mThread.promote(); in start() local
920 if (thread != 0) { in start()
922 Mutex::Autolock _laf(thread->mAudioFlinger->mLock); in start()
923 Mutex::Autolock _lth(thread->mLock); in start()
924 sp<EffectChain> ec = thread->getEffectChain_l(mSessionId); in start()
925 if (thread->mAudioFlinger->isNonOffloadableGlobalEffectEnabled_l() || in start()
931 Mutex::Autolock _lth(thread->mLock); in start()
961 PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); in start()
1017 sp<ThreadBase> thread = mThread.promote(); in stop() local
1018 if (thread != 0) { in stop()
1019 Mutex::Autolock _l(thread->mLock); in stop()
1023 PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); in stop()
1050 sp<ThreadBase> thread = mThread.promote(); in pause() local
1051 if (thread != 0) { in pause()
1052 Mutex::Autolock _l(thread->mLock); in pause()
1053 PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); in pause()
1084 sp<ThreadBase> thread = mThread.promote(); in flush() local
1085 if (thread != 0) { in flush()
1086 Mutex::Autolock _l(thread->mLock); in flush()
1087 PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); in flush()
1175 sp<ThreadBase> thread = mThread.promote(); in setParameters() local
1176 if (thread == 0) { in setParameters()
1179 } else if ((thread->type() == ThreadBase::DIRECT) || in setParameters()
1180 (thread->type() == ThreadBase::OFFLOAD)) { in setParameters()
1181 return thread->setParameters(keyValuePairs); in setParameters()
1189 sp<ThreadBase> thread = mThread.promote(); in selectPresentation() local
1190 if (thread == 0) { in selectPresentation()
1193 } else if ((thread->type() == ThreadBase::DIRECT) || (thread->type() == ThreadBase::OFFLOAD)) { in selectPresentation()
1194 DirectOutputThread *directOutputThread = static_cast<DirectOutputThread*>(thread.get()); in selectPresentation()
1226 sp<ThreadBase> thread = mThread.promote(); in applyVolumeShaper() local
1227 if (thread != 0) { in applyVolumeShaper()
1228 Mutex::Autolock _l(thread->mLock); in applyVolumeShaper()
1229 thread->broadcast_l(); in applyVolumeShaper()
1271 sp<ThreadBase> thread = mThread.promote(); in getTimestamp() local
1272 if (thread == 0) { in getTimestamp()
1276 Mutex::Autolock _l(thread->mLock); in getTimestamp()
1277 PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); in getTimestamp()
1283 sp<ThreadBase> thread = mThread.promote(); in attachAuxEffect() local
1284 if (thread == nullptr) { in attachAuxEffect()
1288 sp<PlaybackThread> dstThread = (PlaybackThread *)thread.get(); in attachAuxEffect()
1432 sp<ThreadBase> thread = mThread.promote(); in signal() local
1433 if (thread != 0) { in signal()
1434 PlaybackThread *t = (PlaybackThread *)thread.get(); in signal()
1550 sp<ThreadBase> thread = mTrack->mThread.promote(); in mute() local
1551 if (thread != 0) { in mute()
1553 Mutex::Autolock _l(thread->mLock); in mute()
1554 PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); in mute()
1567 sp<ThreadBase> thread = mTrack->mThread.promote(); in unmute() local
1568 if (thread != 0) { in unmute()
1570 Mutex::Autolock _l(thread->mLock); in unmute()
1571 PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); in unmute()
1729 sp<ThreadBase> thread = mThread.promote(); in write() local
1730 if (thread != 0 && !thread->standby()) { in write()
2097 RecordThread *thread, in RecordTrack() argument
2113 : TrackBase(thread, client, attr, sampleRate, format, in RecordTrack()
2135 thread->mChannelMask, thread->mFormat, thread->mSampleRate, in RecordTrack()
2155 ALOG_ASSERT(thread->mFastTrackAvail); in RecordTrack()
2156 thread->mFastTrackAvail = false; in RecordTrack()
2205 sp<ThreadBase> thread = mThread.promote(); in start() local
2206 if (thread != 0) { in start()
2207 RecordThread *recordThread = (RecordThread *)thread.get(); in start()
2216 sp<ThreadBase> thread = mThread.promote(); in stop() local
2217 if (thread != 0) { in stop()
2218 RecordThread *recordThread = (RecordThread *)thread.get(); in stop()
2231 sp<ThreadBase> thread = mThread.promote(); in destroy() local
2232 if (thread != 0) { in destroy()
2233 Mutex::Autolock _l(thread->mLock); in destroy()
2234 RecordThread *recordThread = (RecordThread *) thread.get(); in destroy()
2392 sp<ThreadBase> thread = mThread.promote(); in getActiveMicrophones() local
2393 if (thread != 0) { in getActiveMicrophones()
2394 RecordThread *recordThread = (RecordThread *)thread.get(); in getActiveMicrophones()
2403 sp<ThreadBase> thread = mThread.promote(); in setPreferredMicrophoneDirection() local
2404 if (thread != 0) { in setPreferredMicrophoneDirection()
2405 RecordThread *recordThread = (RecordThread *)thread.get(); in setPreferredMicrophoneDirection()
2413 sp<ThreadBase> thread = mThread.promote(); in setPreferredMicrophoneFieldDimension() local
2414 if (thread != 0) { in setPreferredMicrophoneFieldDimension()
2415 RecordThread *recordThread = (RecordThread *)thread.get(); in setPreferredMicrophoneFieldDimension()
2558 sp<ThreadBase>* thread) in obtainStream() argument
2560 *thread = mThread.promote(); in obtainStream()
2561 if (!*thread) return nullptr; in obtainStream()
2562 RecordThread *recordThread = static_cast<RecordThread*>((*thread).get()); in obtainStream()
2586 sp<ThreadBase> thread; in obtainBuffer() local
2587 sp<StreamInHalInterface> stream = obtainStream(&thread); in obtainBuffer()
2673 sp<ThreadBase> thread; in getCapturePosition() local
2674 sp<StreamInHalInterface> stream = obtainStream(&thread); in getCapturePosition()
2709 AudioFlinger::MmapThread::MmapTrack::MmapTrack(ThreadBase *thread, in MmapTrack() argument
2720 : TrackBase(thread, NULL, attr, sampleRate, format, in MmapTrack()