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

Commit d789e43c authored by Devin Kim's avatar Devin Kim Committed by Zach Johnson
Browse files

hal: msm8974: select HFP devices based on hfp active session

Bug: 31922459
Change-Id: Iae2a7fb4dc984810b469e1e7e0b1d947e17f8db3
parent 32847eff
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2058,7 +2058,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d

    ALOGV("%s: enter: out_device(%#x) in_device(%#x) channel_count (%d) channel_mask (0x%x)",
          __func__, out_device, in_device, channel_count, channel_mask);
    if ((out_device != AUDIO_DEVICE_NONE) && voice_is_in_call(adev)) {
    if ((out_device != AUDIO_DEVICE_NONE) && (voice_is_in_call(adev) ||
        audio_extn_hfp_is_active(adev))) {
        if (adev->voice.tty_mode != TTY_MODE_OFF) {
            if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
                out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET ||