Lines Matching refs:sourceDesc
3793 const sp<SourceClientDescriptor>& sourceDesc) in createAudioPatchInternal() argument
4006 if (sourceDesc != nullptr) { in createAudioPatchInternal()
4008 audio_attributes_t attributes = sourceDesc->attributes(); in createAudioPatchInternal()
4009 audio_stream_type_t stream = sourceDesc->stream(); in createAudioPatchInternal()
4012 config.sample_rate = sourceDesc->config().sample_rate; in createAudioPatchInternal()
4013 config.channel_mask = sourceDesc->config().channel_mask; in createAudioPatchInternal()
4014 config.format = sourceDesc->config().format; in createAudioPatchInternal()
4020 &stream, sourceDesc->uid(), &config, &flags, in createAudioPatchInternal()
4033 sourceDesc->setSwOutput(outputDesc); in createAudioPatchInternal()
4044 (sourceDesc != nullptr && in createAudioPatchInternal()
4050 if (sourceDesc == nullptr) { in createAudioPatchInternal()
4070 srcMixPortConfig.ext.mix.usecase.stream = sourceDesc != nullptr ? in createAudioPatchInternal()
4071 sourceDesc->stream() : AUDIO_STREAM_PATCH; in createAudioPatchInternal()
4356 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueAt(i); in clearAudioSources() local
4357 if (sourceDesc->uid() == uid) { in clearAudioSources()
4407 sp<SourceClientDescriptor> sourceDesc = in startAudioSource() local
4413 status_t status = connectAudioSource(sourceDesc); in startAudioSource()
4415 mAudioSources.add(*portId, sourceDesc); in startAudioSource()
4420 status_t AudioPolicyManager::connectAudioSource(const sp<SourceClientDescriptor>& sourceDesc) in connectAudioSource() argument
4422 ALOGV("%s handle %d", __FUNCTION__, sourceDesc->portId()); in connectAudioSource()
4425 disconnectAudioSource(sourceDesc); in connectAudioSource()
4427 audio_attributes_t attributes = sourceDesc->attributes(); in connectAudioSource()
4430 sourceDesc->srcDevice()->type(), in connectAudioSource()
4431 String8(sourceDesc->srcDevice()->address().c_str()), in connectAudioSource()
4445 createAudioPatchInternal(patchBuilder.patch(), &handle, mUidCached, 0, sourceDesc); in connectAudioSource()
4450 sourceDesc->connect(handle, sinkDevice); in connectAudioSource()
4452 sp<SwAudioOutputDescriptor> swOutput = sourceDesc->swOutput().promote(); in connectAudioSource()
4458 if (swOutput->getClient(sourceDesc->portId()) != nullptr) { in connectAudioSource()
4462 swOutput->addClient(sourceDesc); in connectAudioSource()
4464 status = startSource(swOutput, sourceDesc, &delayMs); in connectAudioSource()
4473 sp<HwAudioOutputDescriptor> hwOutputDesc = sourceDesc->hwOutput().promote(); in connectAudioSource()
4484 releaseOutput(sourceDesc->portId()); in connectAudioSource()
4486 sourceDesc->setSwOutput(nullptr); in connectAudioSource()
4494 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueFor(portId); in stopAudioSource() local
4496 if (sourceDesc == 0) { in stopAudioSource()
4500 status_t status = disconnectAudioSource(sourceDesc); in stopAudioSource()
4758 status_t AudioPolicyManager::disconnectAudioSource(const sp<SourceClientDescriptor>& sourceDesc) in disconnectAudioSource() argument
4760 ALOGV("%s port Id %d", __FUNCTION__, sourceDesc->portId()); in disconnectAudioSource()
4761 if (!sourceDesc->isConnected()) { in disconnectAudioSource()
4762 ALOGV("%s port Id %d already disconnected", __FUNCTION__, sourceDesc->portId()); in disconnectAudioSource()
4765 sp<SwAudioOutputDescriptor> swOutput = sourceDesc->swOutput().promote(); in disconnectAudioSource()
4767 status_t status = stopSource(swOutput, sourceDesc); in disconnectAudioSource()
4771 if (releaseOutput(sourceDesc->portId())) { in disconnectAudioSource()
4777 sp<HwAudioOutputDescriptor> hwOutputDesc = sourceDesc->hwOutput().promote(); in disconnectAudioSource()
4784 status_t status = releaseAudioPatchInternal(sourceDesc->getPatchHandle()); in disconnectAudioSource()
4785 sourceDesc->disconnect(); in disconnectAudioSource()
4794 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueAt(i); in getSourceForAttributesOnOutput() local
4795 sp<SwAudioOutputDescriptor> outputDesc = sourceDesc->swOutput().promote(); in getSourceForAttributesOnOutput()
4796 if (followsSameRouting(attr, sourceDesc->attributes()) && in getSourceForAttributesOnOutput()
4798 source = sourceDesc; in getSourceForAttributesOnOutput()
5555 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueAt(i); in checkAudioSourceForAttributes() local
5556 if (sourceDesc != nullptr && followsSameRouting(attr, sourceDesc->attributes()) in checkAudioSourceForAttributes()
5557 && sourceDesc->getPatchHandle() == AUDIO_PATCH_HANDLE_NONE in checkAudioSourceForAttributes()
5558 && !isCallRxAudioSource(sourceDesc)) { in checkAudioSourceForAttributes()
5559 connectAudioSource(sourceDesc); in checkAudioSourceForAttributes()
5567 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueAt(i); in clearAudioSourcesForOutput() local
5568 if (sourceDesc != nullptr && sourceDesc->swOutput().promote() != nullptr in clearAudioSourcesForOutput()
5569 && sourceDesc->swOutput().promote()->mIoHandle == output) { in clearAudioSourcesForOutput()
5570 disconnectAudioSource(sourceDesc); in clearAudioSourcesForOutput()
6703 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueAt(i); in cleanUpForDevice() local
6704 if (sourceDesc->isConnected() && (sourceDesc->srcDevice()->equals(deviceDesc) || in cleanUpForDevice()
6705 sourceDesc->sinkDevice()->equals(deviceDesc)) in cleanUpForDevice()
6706 && !isCallRxAudioSource(sourceDesc)) { in cleanUpForDevice()
6707 disconnectAudioSource(sourceDesc); in cleanUpForDevice()