Lines Matching refs:thread
225 sp<ThreadBase> thread = in createAudioPatch() local
227 if (thread == 0) { in createAudioPatch()
234 reinterpret_cast<PlaybackThread*>(thread.get()), false /*closeThread*/); in createAudioPatch()
251 sp<ThreadBase> thread = mAudioFlinger.openOutput_l( in createAudioPatch() local
258 ALOGV("mAudioFlinger.openOutput_l() returned %p", thread.get()); in createAudioPatch()
259 if (thread == 0) { in createAudioPatch()
263 newPatch.mPlayback.setThread(reinterpret_cast<PlaybackThread*>(thread.get())); in createAudioPatch()
273 config.sample_rate = newPatch.mPlayback.thread()->sampleRate(); in createAudioPatch()
279 newPatch.mPlayback.thread()->channelCount()); in createAudioPatch()
284 config.format = newPatch.mPlayback.thread()->format(); in createAudioPatch()
290 sp<ThreadBase> thread = mAudioFlinger.openInput_l(srcModule, in createAudioPatch() local
300 thread.get(), config.channel_mask); in createAudioPatch()
301 if (thread == 0) { in createAudioPatch()
305 newPatch.mRecord.setThread(reinterpret_cast<RecordThread*>(thread.get())); in createAudioPatch()
315 sp<ThreadBase> thread = mAudioFlinger.checkRecordThread_l( in createAudioPatch() local
317 if (thread == 0) { in createAudioPatch()
318 thread = mAudioFlinger.checkMmapThread_l(patch->sinks[0].ext.mix.handle); in createAudioPatch()
319 if (thread == 0) { in createAudioPatch()
326 status = thread->sendCreateAudioPatchConfigEvent(patch, &halHandle); in createAudioPatch()
329 if (iter.second.mAudioPatch.sinks[0].ext.mix.handle == thread->id()) { in createAudioPatch()
369 sp<ThreadBase> thread = in createAudioPatch() local
371 if (thread == 0) { in createAudioPatch()
372 thread = mAudioFlinger.checkMmapThread_l(patch->sources[0].ext.mix.handle); in createAudioPatch()
373 if (thread == 0) { in createAudioPatch()
380 if (thread == mAudioFlinger.primaryPlaybackThread_l()) { in createAudioPatch()
387 status = thread->sendCreateAudioPatchConfigEvent(patch, &halHandle); in createAudioPatch()
391 if (iter.second.mAudioPatch.sources[0].ext.mix.handle == thread->id()) { in createAudioPatch()
428 addSink(mRecord.thread(), { .source = AUDIO_SOURCE_MIC }).patch(), in createConnections()
438 PatchBuilder().addSource(mPlayback.thread()).addSink(mAudioPatch.sinks[0]).patch(), in createConnections()
449 size_t playbackFrameCount = mPlayback.thread()->frameCount(); in createConnections()
451 size_t recordFrameCount = mRecord.thread()->frameCount(); in createConnections()
461 uint32_t channelCount = mPlayback.thread()->channelCount(); in createConnections()
463 audio_channel_mask_t outChannelMask = mPlayback.thread()->channelMask(); in createConnections()
464 uint32_t sampleRate = mPlayback.thread()->sampleRate(); in createConnections()
465 audio_format_t format = mPlayback.thread()->format(); in createConnections()
467 audio_format_t inputFormat = mRecord.thread()->format(); in createConnections()
475 if (sampleRate == mRecord.thread()->sampleRate() && in createConnections()
476 inChannelMask == mRecord.thread()->channelMask() && in createConnections()
477 mRecord.thread()->fastTrackAvailable() && in createConnections()
478 mRecord.thread()->hasFastCapture()) { in createConnections()
487 mRecord.thread().get(), in createConnections()
507 if (mPlayback.thread()->hasFastMixer()) { in createConnections()
518 mPlayback.thread().get(), in createConnections()
657 sp<ThreadBase> thread = mAudioFlinger.checkRecordThread_l(ioHandle); in releaseAudioPatch() local
658 if (thread == 0) { in releaseAudioPatch()
659 thread = mAudioFlinger.checkMmapThread_l(ioHandle); in releaseAudioPatch()
660 if (thread == 0) { in releaseAudioPatch()
666 status = thread->sendReleaseAudioPatchConfigEvent(removedPatch.mHalHandle); in releaseAudioPatch()
678 sp<ThreadBase> thread = mAudioFlinger.checkPlaybackThread_l(ioHandle); in releaseAudioPatch() local
679 if (thread == 0) { in releaseAudioPatch()
680 thread = mAudioFlinger.checkMmapThread_l(ioHandle); in releaseAudioPatch()
681 if (thread == 0) { in releaseAudioPatch()
687 status = thread->sendReleaseAudioPatchConfigEvent(removedPatch.mHalHandle); in releaseAudioPatch()