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

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

Merge "hal: avoid stopping VoIP mistakenly when VoIP standby"

parents 50f4c6bb 93e88d6c
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -4372,6 +4372,7 @@ static int in_standby(struct audio_stream *stream)
        pthread_mutex_lock(&adev->lock);
        in->standby = true;
        if (in->usecase == USECASE_COMPRESS_VOIP_CALL) {
            do_stop = false;
            voice_extn_compress_voip_close_input_stream(stream);
            ALOGD("VOIP input entered standby");
        } else if (in->usecase == USECASE_AUDIO_RECORD_MMAP) {
@@ -4380,18 +4381,13 @@ static int in_standby(struct audio_stream *stream)
        } else {
            if (audio_extn_cin_attached_usecase(in->usecase))
                audio_extn_cin_stop_input_stream(in);
            if (in->pcm) {
                pcm_close(in->pcm);
                in->pcm = NULL;
            }
            status = stop_input_stream(in);
        }

        if (do_stop) {
            if (in->pcm) {
                pcm_close(in->pcm);
                in->pcm = NULL;
            }

        if (do_stop) {
            status = stop_input_stream(in);
        }
        pthread_mutex_unlock(&adev->lock);