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

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

Merge "hal: Fix device selection at start of the voice call" into audio-userspace.lnx.2.1-dev

parents e91a0cf0 6b32c4c5
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -2306,14 +2306,6 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
        if (val != 0) {
            out->devices = val;

            if (!out->standby) {
                audio_extn_perf_lock_acquire(&adev->perf_lock_handle, 0,
                                             adev->perf_lock_opts,
                                             adev->perf_lock_opts_size);
                select_devices(adev, out->usecase);
                audio_extn_perf_lock_release(&adev->perf_lock_handle);
            }

            if (output_drives_call(adev, out)) {
                if(!voice_is_in_call(adev)) {
                    if (adev->mode == AUDIO_MODE_IN_CALL) {
@@ -2325,6 +2317,14 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
                    voice_update_devices_for_all_voice_usecases(adev);
                }
            }

            if (!out->standby) {
                audio_extn_perf_lock_acquire(&adev->perf_lock_handle, 0,
                                             adev->perf_lock_opts,
                                             adev->perf_lock_opts_size);
                select_devices(adev, out->usecase);
                audio_extn_perf_lock_release(&adev->perf_lock_handle);
            }
        }

        pthread_mutex_unlock(&adev->lock);