Lines Matching refs:patch

623             createAudioPatchInternal(patchBuilder.patch(), &patchHandle, mUidCached, delayMs);  in createTelephonyPatch()
1185 const auto& patch = msdPatches[i]; in getOutputForDevices() local
1186 for (size_t j = 0; j < patch->mPatch.num_sinks; ++j) { in getOutputForDevices()
1187 const struct audio_port_config *sink = &patch->mPatch.sinks[j]; in getOutputForDevices()
1192 releaseAudioPatch(patch->getHandle(), mUidCached); in getOutputForDevices()
1274 sp<AudioPatch> patch = mAudioPatches.valueAt(i); in getMsdPatches() local
1275 for (size_t j = 0; j < patch->mPatch.num_sources; ++j) { in getMsdPatches()
1276 const struct audio_port_config *source = &patch->mPatch.sources[j]; in getMsdPatches()
1279 msdPatches.addAudioPatch(patch->getHandle(), patch); in getMsdPatches()
1370 audio_port_config sourceConfig = patchBuilder.patch()->sources[0]; in buildMsdPatch()
1371 audio_port_config sinkConfig = patchBuilder.patch()->sinks[0]; in buildMsdPatch()
1400 const struct audio_patch* patch = patchBuilder.patch(); in setMsdPatch() local
1406 if (audio_patches_are_equal(&currentPatch->mPatch, patch)) { in setMsdPatch()
1412 patch, 0 /*delayMs*/, mUidCached, nullptr /*patchDescPtr*/); in setMsdPatch()
1416 device->toString().c_str(), patch->sources[0].format, in setMsdPatch()
1417 patch->sources[0].channel_mask, patch->sources[0].sample_rate); in setMsdPatch()
3369 status_t AudioPolicyManager::createAudioPatchInternal(const struct audio_patch *patch, in createAudioPatchInternal() argument
3375 if (handle == NULL || patch == NULL) { in createAudioPatchInternal()
3378 ALOGV("%s num sources %d num sinks %d", __func__, patch->num_sources, patch->num_sinks); in createAudioPatchInternal()
3380 if (!audio_patch_is_valid(patch)) { in createAudioPatchInternal()
3384 if (patch->num_sources > 1) { in createAudioPatchInternal()
3388 if (patch->sources[0].role != AUDIO_PORT_ROLE_SOURCE) { in createAudioPatchInternal()
3391 for (size_t i = 0; i < patch->num_sinks; i++) { in createAudioPatchInternal()
3392 if (patch->sinks[i].role != AUDIO_PORT_ROLE_SINK) { in createAudioPatchInternal()
3400 ALOGV("%s source id %d role %d type %d", __func__, patch->sources[0].id, in createAudioPatchInternal()
3401 patch->sources[0].role, in createAudioPatchInternal()
3402 patch->sources[0].type); in createAudioPatchInternal()
3404 for (size_t i = 0; i < patch->num_sinks; i++) { in createAudioPatchInternal()
3405 ALOGV("%s sink %zu: id %d role %d type %d", __func__ ,i, patch->sinks[i].id, in createAudioPatchInternal()
3406 patch->sinks[i].role, in createAudioPatchInternal()
3407 patch->sinks[i].type); in createAudioPatchInternal()
3422 if (patch->sources[0].type == AUDIO_PORT_TYPE_MIX) { in createAudioPatchInternal()
3423 sp<SwAudioOutputDescriptor> outputDesc = mOutputs.getOutputFromId(patch->sources[0].id); in createAudioPatchInternal()
3425 ALOGV("%s output not found for id %d", __func__, patch->sources[0].id); in createAudioPatchInternal()
3431 if (patchDesc->mPatch.sources[0].id != patch->sources[0].id) { in createAudioPatchInternal()
3433 __func__, patchDesc->mPatch.sources[0].id, patch->sources[0].id); in createAudioPatchInternal()
3438 for (size_t i = 0; i < patch->num_sinks; i++) { in createAudioPatchInternal()
3441 if (patch->sinks[i].type != AUDIO_PORT_TYPE_DEVICE) { in createAudioPatchInternal()
3446 mAvailableOutputDevices.getDeviceFromId(patch->sinks[i].id); in createAudioPatchInternal()
3448 ALOGV("%s out device not found for id %d", __func__, patch->sinks[i].id); in createAudioPatchInternal()
3453 patch->sources[0].sample_rate, in createAudioPatchInternal()
3455 patch->sources[0].format, in createAudioPatchInternal()
3457 patch->sources[0].channel_mask, in createAudioPatchInternal()
3485 } else if (patch->sources[0].type == AUDIO_PORT_TYPE_DEVICE) { in createAudioPatchInternal()
3486 if (patch->sinks[0].type == AUDIO_PORT_TYPE_MIX) { in createAudioPatchInternal()
3489 if (patch->num_sinks > 1) { in createAudioPatchInternal()
3492 sp<AudioInputDescriptor> inputDesc = mInputs.getInputFromId(patch->sinks[0].id); in createAudioPatchInternal()
3497 if (patchDesc->mPatch.sinks[0].id != patch->sinks[0].id) { in createAudioPatchInternal()
3502 mAvailableInputDevices.getDeviceFromId(patch->sources[0].id); in createAudioPatchInternal()
3508 patch->sinks[0].sample_rate, in createAudioPatchInternal()
3510 patch->sinks[0].format, in createAudioPatchInternal()
3512 patch->sinks[0].channel_mask, in createAudioPatchInternal()
3536 } else if (patch->sinks[0].type == AUDIO_PORT_TYPE_DEVICE) { in createAudioPatchInternal()
3539 if (patchDesc->mPatch.sources[0].id != patch->sources[0].id) { in createAudioPatchInternal()
3544 mAvailableInputDevices.getDeviceFromId(patch->sources[0].id); in createAudioPatchInternal()
3553 srcDevice->toAudioPortConfig(&sourcePortConfig, &patch->sources[0]); in createAudioPatchInternal()
3556 for (size_t i = 0; i < patch->num_sinks; i++) { in createAudioPatchInternal()
3557 if (patch->sinks[i].type != AUDIO_PORT_TYPE_DEVICE) { in createAudioPatchInternal()
3562 mAvailableOutputDevices.getDeviceFromId(patch->sinks[i].id); in createAudioPatchInternal()
3567 sinkDevice->toAudioPortConfig(&sinkPortConfig, &patch->sinks[i]); in createAudioPatchInternal()
3582 if (patch->num_sinks > 1) { in createAudioPatchInternal()
3624 outputDesc->toAudioPortConfig(&srcMixPortConfig, &patch->sources[0]); in createAudioPatchInternal()
3638 __func__, index, handle, patchBuilder.patch(), delayMs, uid, &patchDesc); in createAudioPatchInternal()
3680 struct audio_patch *patch = &patchDesc->mPatch; in releaseAudioPatchInternal() local
3682 if (patch->sources[0].type == AUDIO_PORT_TYPE_MIX) { in releaseAudioPatchInternal()
3683 sp<SwAudioOutputDescriptor> outputDesc = mOutputs.getOutputFromId(patch->sources[0].id); in releaseAudioPatchInternal()
3685 ALOGV("%s output not found for id %d", __func__, patch->sources[0].id); in releaseAudioPatchInternal()
3694 } else if (patch->sources[0].type == AUDIO_PORT_TYPE_DEVICE) { in releaseAudioPatchInternal()
3695 if (patch->sinks[0].type == AUDIO_PORT_TYPE_MIX) { in releaseAudioPatchInternal()
3696 sp<AudioInputDescriptor> inputDesc = mInputs.getInputFromId(patch->sinks[0].id); in releaseAudioPatchInternal()
3698 ALOGV("%s input not found for id %d", __func__, patch->sinks[0].id); in releaseAudioPatchInternal()
3705 } else if (patch->sinks[0].type == AUDIO_PORT_TYPE_DEVICE) { in releaseAudioPatchInternal()
3714 if (patch->num_sources > 1 && patch->sources[1].type == AUDIO_PORT_TYPE_MIX) { in releaseAudioPatchInternal()
3716 mOutputs.getOutputFromId(patch->sources[1].id); in releaseAudioPatchInternal()
3718 ALOGE("%s output not found for id %d", __func__, patch->sources[0].id); in releaseAudioPatchInternal()
3993 createAudioPatchInternal(patchBuilder.patch(), &handle, mUidCached, 0, sourceDesc); in connectAudioSource()
5626 installPatch(__func__, patchHandle, outputDesc.get(), patchBuilder.patch(), in setOutputDevices()
5683 status = installPatch(__func__, patchHandle, inputDesc.get(), patchBuilder.patch(), 0); in setInputDevice()
6285 const struct audio_patch *patch, in installPatch() argument
6293 caller, index, patchHandle, patch, delayMs, mUidCached, &patchDesc); in installPatch()
6303 const struct audio_patch *patch, in installPatch() argument
6315 status_t status = mpClientInterface->createAudioPatch(patch, &afPatchHandle, delayMs); in installPatch()
6317 caller, status, afPatchHandle, patch->num_sources, patch->num_sinks); in installPatch()
6320 patchDesc = new AudioPatch(patch, uid); in installPatch()
6323 patchDesc->mPatch = *patch; in installPatch()