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

Commit 851d3ff2 authored by Haynes Mathew George's avatar Haynes Mathew George Committed by David Lin
Browse files

APM: Allow VOIP_TX input selection

Set flag to select VOIP_TX input profile if input source
is VOICE_COMMUNICATION and phone state is MODE_IN_COMMUNICATION

Bug: 62495679
Test: Hangout call
Change-Id: I3b1bb9fbcdd5687ebb002facf0684983333e9a53
parent 5dd96d24
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1595,6 +1595,10 @@ audio_io_handle_t AudioPolicyManager::getInputForDevice(audio_devices_t device,
        } else {
            halInputSource = AUDIO_SOURCE_VOICE_RECOGNITION;
        }
    } else if (inputSource == AUDIO_SOURCE_VOICE_COMMUNICATION &&
               getPhoneState() == AUDIO_MODE_IN_COMMUNICATION &&
               audio_is_linear_pcm(format)) {
        flags = (audio_input_flags_t)(flags | AUDIO_INPUT_FLAG_VOIP_TX);
    }

    // find a compatible input profile (not necessarily identical in parameters)