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

Commit 1879875f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: add primary output validity check during voip device switch"

parents aa1e94bc 3ca773fb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2146,13 +2146,14 @@ 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);
                voip_usecase = get_usecase_from_list(adev, USECASE_AUDIO_PLAYBACK_VOIP);
                if (voip_usecase == NULL)
                if (voip_usecase == NULL && adev->primary_output && !adev->primary_output->standby)
                    voip_usecase = get_usecase_from_list(adev, adev->primary_output->usecase);

                if ((usecase->stream.out != NULL &&
                     voip_usecase != NULL &&
                     usecase->stream.out->usecase == voip_usecase->id) &&
                    adev->active_input &&
                    adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION &&
                    out_snd_device != usecase->out_snd_device) {
                    select_devices(adev, adev->active_input->usecase);
                }