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

Commit 786a5372 authored by Dave Burke's avatar Dave Burke Committed by The Android Automerger
Browse files

Revert "alsa_sound: change voice-call stop sequence"

This reverts commit 0f5426b3

Change-Id: I09e3d3cf17c1d775c76e2f8f6276216fbaa9ac92
parent 73df78f5
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -1088,21 +1088,6 @@ static status_t s_close(alsa_handle_t *handle)
    handle->rxHandle = 0;
    ALOGV("s_close: handle %p h %p", handle, h);
    if (h) {
        if ((!strcmp(handle->useCase, SND_USE_CASE_VERB_VOICECALL) ||
             !strcmp(handle->useCase, SND_USE_CASE_MOD_PLAY_VOICE)) &&
            platform_is_Fusion3()) {
#ifdef QCOM_CSDCLIENT_ENABLED
            if (csd_stop_voice == NULL) {
                ALOGE("dlsym:Error:%s Loading csd_client_disable_device", dlerror());
            } else {
                err = csd_stop_voice();
                if (err < 0) {
                    ALOGE("s_close: csd_client error %d\n", err);
                }
            }
#endif
        }

        ALOGV("s_close rxHandle\n");
        err = pcm_close(h);
        if(err != NO_ERROR) {
@@ -1120,6 +1105,21 @@ static status_t s_close(alsa_handle_t *handle)
            ALOGE("s_close: pcm_close failed for handle with err %d", err);
        }

        if ((!strcmp(handle->useCase, SND_USE_CASE_VERB_VOICECALL) ||
             !strcmp(handle->useCase, SND_USE_CASE_MOD_PLAY_VOICE)) &&
            platform_is_Fusion3()) {
#ifdef QCOM_CSDCLIENT_ENABLED
            if (csd_stop_voice == NULL) {
                ALOGE("dlsym:Error:%s Loading csd_client_disable_device", dlerror());
            } else {
                err = csd_stop_voice();
                if (err < 0) {
                    ALOGE("s_close: csd_client error %d\n", err);
                }
            }
#endif
        }

        disableDevice(handle);
    } else if((!strcmp(handle->useCase, SND_USE_CASE_VERB_HIFI_LOW_POWER)) ||
              (!strcmp(handle->useCase, SND_USE_CASE_MOD_PLAY_LPA)) ||