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

Commit 24452215 authored by Karthik Reddy Katta's avatar Karthik Reddy Katta Committed by Gerrit - the friendly Code Review server
Browse files

hal : Set the input device for VOIP calls using audio path

For Voip calls using audio path ,the input devices is not
getting selected when output device is changed.
Removed the source type check to select the input device
when there is an active input and output device switch.

Change-Id: Iab7a6fddb3dda045fab94cd72de8e658721d9237
CRs-fixed: 712950
parent 858d316f
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -787,8 +787,7 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
                out_snd_device = platform_get_output_snd_device(adev->platform,
                                            usecase->stream.out->devices);
                if (usecase->stream.out == adev->primary_output &&
                        adev->active_input &&
                        adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION) {
                        adev->active_input) {
                    select_devices(adev, adev->active_input->usecase);
                }
            }
@@ -797,7 +796,9 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
            out_snd_device = SND_DEVICE_NONE;
            if (in_snd_device == SND_DEVICE_NONE) {
                audio_devices_t out_device = AUDIO_DEVICE_NONE;
                if (adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION &&
                if ((adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION ||
                    (adev->mode == AUDIO_MODE_IN_COMMUNICATION &&
                     adev->active_input->source == AUDIO_SOURCE_MIC)) &&
                     adev->primary_output && !adev->primary_output->standby) {
                    out_device = adev->primary_output->devices;
                } else if (usecase->id == USECASE_AUDIO_RECORD_AFE_PROXY) {
+2 −1
Original line number Diff line number Diff line
@@ -1720,7 +1720,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
                snd_device = SND_DEVICE_IN_VOICE_REC_MIC;
            }
        }
    } else if (source == AUDIO_SOURCE_VOICE_COMMUNICATION) {
    } else if ((source == AUDIO_SOURCE_VOICE_COMMUNICATION) ||
              (mode == AUDIO_MODE_IN_COMMUNICATION)) {
        if (out_device & AUDIO_DEVICE_OUT_SPEAKER)
            in_device = AUDIO_DEVICE_IN_BACK_MIC;
        if (adev->active_input) {