Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a9c052c authored by Jaideep Sharma's avatar Jaideep Sharma Committed by Automerger Merge Worker
Browse files

audiopolicy: use profile flags during opening an input am: 69e093ec

parents 38d215bb 69e093ec
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -6630,7 +6630,7 @@ void AudioPolicyManager::onNewAudioModulesAvailableInt(DeviceVector *newDevices)
            status_t status = inputDesc->open(nullptr,
                                              availProfileDevices.itemAt(0),
                                              AUDIO_SOURCE_MIC,
                                              AUDIO_INPUT_FLAG_NONE,
                                              (audio_input_flags_t) inProfile->getFlags(),
                                              &input);
            if (status != NO_ERROR) {
                ALOGW("Cannot open input stream for device %s on hw module %s",
@@ -6936,7 +6936,8 @@ status_t AudioPolicyManager::checkInputsForDevice(const sp<DeviceDescriptor>& de

            desc = new AudioInputDescriptor(profile, mpClientInterface);
            audio_io_handle_t input = AUDIO_IO_HANDLE_NONE;
            status = desc->open(nullptr, device, AUDIO_SOURCE_MIC, AUDIO_INPUT_FLAG_NONE, &input);
            status = desc->open(nullptr, device, AUDIO_SOURCE_MIC,
                                (audio_input_flags_t) profile->getFlags(), &input);

            if (status == NO_ERROR) {
                const String8& address = String8(device->address().c_str());