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

Commit 35b5cc5e authored by Venkata Narendra Kumar Gutta's avatar Venkata Narendra Kumar Gutta
Browse files

hal: Fix incorrect fluence devices selection for VoIP calls

VoIP calls using audio path are selecting fluence devices
even though fluence is not enabled. This is happening
due to incorrect device selection logic in audio HAL.
Fix this by ensuring fluence device selection only when
the fluence is enabled.

CRs-Fixed: 841602
Change-Id: I65cd0ca4e30cc8d1db87d81b2d84122164ea548e
parent 0c3fc691
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -2310,7 +2310,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
        if (out_device & AUDIO_DEVICE_OUT_SPEAKER)
            in_device = AUDIO_DEVICE_IN_BACK_MIC;
        if (adev->active_input) {
            if (adev->active_input->enable_aec &&
            if (my_data->fluence_type != FLUENCE_NONE &&
                adev->active_input->enable_aec &&
                adev->active_input->enable_ns) {
                if (in_device & AUDIO_DEVICE_IN_BACK_MIC) {
                    if (my_data->fluence_in_spkr_mode) {
@@ -2335,7 +2336,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
                    snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
                }
                platform_set_echo_reference(adev->platform, true);
            } else if (adev->active_input->enable_aec) {
            } else if (my_data->fluence_type != FLUENCE_NONE &&
                       adev->active_input->enable_aec) {
                if (in_device & AUDIO_DEVICE_IN_BACK_MIC) {
                    if (my_data->fluence_in_spkr_mode) {
                        if (my_data->fluence_type & FLUENCE_QUAD_MIC) {
@@ -2359,7 +2361,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
                    snd_device = SND_DEVICE_IN_HEADSET_MIC_FLUENCE;
                }
                platform_set_echo_reference(adev->platform, true);
            } else if (adev->active_input->enable_ns) {
            } else if (my_data->fluence_type != FLUENCE_NONE &&
                       adev->active_input->enable_ns) {
                if (in_device & AUDIO_DEVICE_IN_BACK_MIC) {
                    if (my_data->fluence_in_spkr_mode) {
                        if (my_data->fluence_type & FLUENCE_QUAD_MIC) {