Lines Matching refs:sourceDesc
3487 const sp<SourceClientDescriptor>& sourceDesc) in createAudioPatchInternal() argument
3694 (sourceDesc != nullptr && in createAudioPatchInternal()
3701 if (sourceDesc != nullptr) { in createAudioPatchInternal()
3703 audio_attributes_t attributes = sourceDesc->attributes(); in createAudioPatchInternal()
3704 audio_stream_type_t stream = sourceDesc->stream(); in createAudioPatchInternal()
3707 config.sample_rate = sourceDesc->config().sample_rate; in createAudioPatchInternal()
3708 config.channel_mask = sourceDesc->config().channel_mask; in createAudioPatchInternal()
3709 config.format = sourceDesc->config().format; in createAudioPatchInternal()
3715 &stream, sourceDesc->uid(), &config, &flags, in createAudioPatchInternal()
3740 if (sourceDesc != nullptr) { in createAudioPatchInternal()
3741 sourceDesc->setSwOutput(outputDesc); in createAudioPatchInternal()
3744 srcMixPortConfig.ext.mix.usecase.stream = sourceDesc != nullptr ? in createAudioPatchInternal()
3745 sourceDesc->stream() : AUDIO_STREAM_PATCH; in createAudioPatchInternal()
4028 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueAt(i); in clearAudioSources() local
4029 if (sourceDesc->uid() == uid) { in clearAudioSources()
4079 sp<SourceClientDescriptor> sourceDesc = in startAudioSource() local
4085 status_t status = connectAudioSource(sourceDesc); in startAudioSource()
4087 mAudioSources.add(*portId, sourceDesc); in startAudioSource()
4092 status_t AudioPolicyManager::connectAudioSource(const sp<SourceClientDescriptor>& sourceDesc) in connectAudioSource() argument
4094 ALOGV("%s handle %d", __FUNCTION__, sourceDesc->portId()); in connectAudioSource()
4097 disconnectAudioSource(sourceDesc); in connectAudioSource()
4099 audio_attributes_t attributes = sourceDesc->attributes(); in connectAudioSource()
4100 sp<DeviceDescriptor> srcDevice = sourceDesc->srcDevice(); in connectAudioSource()
4113 createAudioPatchInternal(patchBuilder.patch(), &handle, mUidCached, 0, sourceDesc); in connectAudioSource()
4118 sourceDesc->setPatchHandle(handle); in connectAudioSource()
4120 sp<SwAudioOutputDescriptor> swOutput = sourceDesc->swOutput().promote(); in connectAudioSource()
4126 if (swOutput->getClient(sourceDesc->portId()) != nullptr) { in connectAudioSource()
4130 swOutput->addClient(sourceDesc); in connectAudioSource()
4132 status = startSource(swOutput, sourceDesc, &delayMs); in connectAudioSource()
4141 sp<HwAudioOutputDescriptor> hwOutputDesc = sourceDesc->hwOutput().promote(); in connectAudioSource()
4152 releaseOutput(sourceDesc->portId()); in connectAudioSource()
4154 sourceDesc->setSwOutput(nullptr); in connectAudioSource()
4162 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueFor(portId); in stopAudioSource() local
4164 if (sourceDesc == 0) { in stopAudioSource()
4168 status_t status = disconnectAudioSource(sourceDesc); in stopAudioSource()
4398 status_t AudioPolicyManager::disconnectAudioSource(const sp<SourceClientDescriptor>& sourceDesc) in disconnectAudioSource() argument
4400 ALOGV("%s port Id %d", __FUNCTION__, sourceDesc->portId()); in disconnectAudioSource()
4401 sp<SwAudioOutputDescriptor> swOutput = sourceDesc->swOutput().promote(); in disconnectAudioSource()
4403 status_t status = stopSource(swOutput, sourceDesc); in disconnectAudioSource()
4407 releaseOutput(sourceDesc->portId()); in disconnectAudioSource()
4409 sp<HwAudioOutputDescriptor> hwOutputDesc = sourceDesc->hwOutput().promote(); in disconnectAudioSource()
4416 return releaseAudioPatchInternal(sourceDesc->getPatchHandle()); in disconnectAudioSource()
4424 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueAt(i); in getSourceForAttributesOnOutput() local
4425 sp<SwAudioOutputDescriptor> outputDesc = sourceDesc->swOutput().promote(); in getSourceForAttributesOnOutput()
4426 if (followsSameRouting(attr, sourceDesc->attributes()) && in getSourceForAttributesOnOutput()
4428 source = sourceDesc; in getSourceForAttributesOnOutput()
6307 sp<SourceClientDescriptor> sourceDesc = mAudioSources.valueAt(i); in cleanUpForDevice() local
6308 if (sourceDesc->srcDevice()->equals(deviceDesc)) { in cleanUpForDevice()
6309 ALOGV("%s releasing audio source %d", __FUNCTION__, sourceDesc->portId()); in cleanUpForDevice()
6310 stopAudioSource(sourceDesc->portId()); in cleanUpForDevice()