Lines Matching refs:inputDesc
1935 sp<AudioInputDescriptor> inputDesc; in getInputForAttr() local
1963 sp<AudioInputDescriptor> inputDesc = mInputs.valueAt(index); in getInputForAttr() local
1964 RecordClientVector clients = inputDesc->getClientsForSession(session); in getInputForAttr()
1992 device = inputDesc->getDevice(); in getInputForAttr()
2073 inputDesc = mInputs.valueFor(*input); in getInputForAttr()
2074 inputDesc->addClient(clientDesc); in getInputForAttr()
2184 sp<AudioInputDescriptor> inputDesc = new AudioInputDescriptor(profile, mpClientInterface); in getInputForDevice() local
2191 status_t status = inputDesc->open(&lConfig, device, halInputSource, profileFlags, &input); in getInputForDevice()
2202 inputDesc->close(); in getInputForDevice()
2207 inputDesc->mPolicyMix = policyMix; in getInputForDevice()
2209 addInput(input, inputDesc); in getInputForDevice()
2219 sp<AudioInputDescriptor> inputDesc = mInputs.getInputForClient(portId); in startInput() local
2220 if (inputDesc == 0) { in startInput()
2224 audio_io_handle_t input = inputDesc->mIoHandle; in startInput()
2225 sp<RecordClientDescriptor> client = inputDesc->getClient(portId); in startInput()
2237 status_t status = inputDesc->start(); in startInput()
2244 inputDesc->setClientActive(client, true); in startInput()
2248 sp<DeviceDescriptor> device = getNewInputDevice(inputDesc); in startInput()
2251 if (inputDesc->activeCount() == 1) { in startInput()
2252 sp<AudioPolicyMix> policyMix = inputDesc->mPolicyMix.promote(); in startInput()
2269 if (audio_is_remote_submix_device(inputDesc->getDeviceType())) { in startInput()
2293 sp<AudioInputDescriptor> inputDesc = mInputs.getInputForClient(portId); in stopInput() local
2294 if (inputDesc == 0) { in stopInput()
2298 audio_io_handle_t input = inputDesc->mIoHandle; in stopInput()
2299 sp<RecordClientDescriptor> client = inputDesc->getClient(portId); in stopInput()
2305 inputDesc->setClientActive(client, false); in stopInput()
2307 inputDesc->stop(); in stopInput()
2308 if (inputDesc->isActive()) { in stopInput()
2309 setInputDevice(input, getNewInputDevice(inputDesc), false /* force */); in stopInput()
2311 sp<AudioPolicyMix> policyMix = inputDesc->mPolicyMix.promote(); in stopInput()
2321 if (audio_is_remote_submix_device(inputDesc->getDeviceType())) { in stopInput()
2339 if (primaryInputDevices.contains(inputDesc->getDevice()) && in stopInput()
2343 inputDesc->clearPreemptedSessions(); in stopInput()
2352 sp<AudioInputDescriptor> inputDesc = mInputs.getInputForClient(portId); in releaseInput() local
2353 if (inputDesc == 0) { in releaseInput()
2357 sp<RecordClientDescriptor> client = inputDesc->getClient(portId); in releaseInput()
2358 audio_io_handle_t input = inputDesc->mIoHandle; in releaseInput()
2362 inputDesc->removeClient(portId); in releaseInput()
2364 if (inputDesc->getClientCount() > 0) { in releaseInput()
2365 ALOGV("%s(%d) %zu clients remaining", __func__, portId, inputDesc->getClientCount()); in releaseInput()
3429 sp<AudioInputDescriptor> inputDesc = mInputs.getInputFromId(patch->sinks[0].id); in createAudioPatch() local
3430 if (inputDesc == NULL) { in createAudioPatch()
3444 if (!inputDesc->mProfile->isCompatibleProfile(DeviceVector(device), in createAudioPatch()
3459 device->toString().c_str(), inputDesc->mIoHandle); in createAudioPatch()
3460 setInputDevice(inputDesc->mIoHandle, device, true, handle); in createAudioPatch()
3581 sp<AudioInputDescriptor> inputDesc = mInputs.getInputFromId(patch->sinks[0].id); in releaseAudioPatch() local
3582 if (inputDesc == NULL) { in releaseAudioPatch()
3586 setInputDevice(inputDesc->mIoHandle, in releaseAudioPatch()
3587 getNewInputDevice(inputDesc), in releaseAudioPatch()
3642 sp<AudioInputDescriptor> inputDesc = mInputs.getInputFromId(config->id); in setAudioPortConfig() local
3643 if (inputDesc == NULL) { in setAudioPortConfig()
3646 audioPortConfig = inputDesc; in setAudioPortConfig()
3753 sp<AudioInputDescriptor> inputDesc = mInputs.valueAt(i); in clearSessionRoutes() local
3754 for (const auto& client : inputDesc->getClientIterable()) { in clearSessionRoutes()
3764 sp<AudioInputDescriptor> inputDesc = mInputs.valueAt(i); in clearSessionRoutes() local
3765 if (affectedSources.indexOf(inputDesc->source()) >= 0) { in clearSessionRoutes()
3766 inputsToClose.add(inputDesc->mIoHandle); in clearSessionRoutes()
4429 sp<AudioInputDescriptor> inputDesc = in initialize() local
4433 status_t status = inputDesc->open(nullptr, in initialize()
4451 inputDesc->close(); in initialize()
4541 const sp<AudioInputDescriptor>& inputDesc) in addInput() argument
4543 mInputs.add(input, inputDesc); in addInput()
4960 sp<AudioInputDescriptor> inputDesc = mInputs.valueFor(input); in closeInput() local
4961 if (inputDesc == NULL) { in closeInput()
4968 sp<DeviceDescriptor> device = inputDesc->getDevice(); in closeInput()
4969 ssize_t index = mAudioPatches.indexOfKey(inputDesc->getPatchHandle()); in closeInput()
4977 inputDesc->close(); in closeInput()
5228 const sp<AudioInputDescriptor>& inputDesc) in getNewInputDevice() argument
5232 ssize_t index = mAudioPatches.indexOfKey(inputDesc->getPatchHandle()); in getNewInputDevice()
5237 inputDesc->getDevice()->toString().c_str(), inputDesc->getPatchHandle()); in getNewInputDevice()
5238 return inputDesc->getDevice(); in getNewInputDevice()
5245 device = findPreferredDevice(inputDesc, AUDIO_SOURCE_DEFAULT, active, mAvailableInputDevices); in getNewInputDevice()
5252 audio_attributes_t attributes = inputDesc->getHighestPriorityAttributes(); in getNewInputDevice()
5577 sp<AudioInputDescriptor> inputDesc = mInputs.valueFor(input); in setInputDevice() local
5578 if ((device != nullptr) && ((device != inputDesc->getDevice()) || force)) { in setInputDevice()
5579 inputDesc->setDevice(device); in setInputDevice()
5583 patchBuilder.addSink(inputDesc, in setInputDevice()
5586 [inputDesc](const PatchBuilder::mix_usecase_t& usecase) { in setInputDevice()
5588 if (result.source == AUDIO_SOURCE_HOTWORD && !inputDesc->isSoundTrigger()) { in setInputDevice()
5594 status = installPatch(__func__, patchHandle, inputDesc.get(), patchBuilder.patch(), 0); in setInputDevice()
5603 sp<AudioInputDescriptor> inputDesc = mInputs.valueFor(input); in resetInputDevice() local
5608 index = mAudioPatches.indexOfKey(inputDesc->getPatchHandle()); in resetInputDevice()
5616 inputDesc->setPatchHandle(AUDIO_PATCH_HANDLE_NONE); in resetInputDevice()