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

Commit 8c93ce69 authored by kunleiz's avatar kunleiz
Browse files

hal: avoid echo reference is disabled when closing input stream

When voip runs in background, there is a recording wants to start,
due to APM forbid two input stream are active at same time, the
recording starts failure. And echo reference is disabled when
closing the input stream even if voip is still active in background.

Fix it by avoiding disable echo reference when there are no active
input and hfp call.

CRs-Fixed: 2357317
Change-Id: Ib36ec449fac41f3ed4147660dafbb60c3eb82f67
parent 951dbf9b
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -7431,7 +7431,9 @@ static void adev_close_input_stream(struct audio_hw_device *dev,
    // between the callback and close_stream
    // between the callback and close_stream
    audio_extn_snd_mon_unregister_listener(stream);
    audio_extn_snd_mon_unregister_listener(stream);


    /* Disable echo reference while closing input stream */
    // Disable echo reference if there are no active input and hfp call
    // while closing input stream
    if (!adev->active_input && !audio_extn_hfp_is_active(adev))
        platform_set_echo_reference(adev, false, AUDIO_DEVICE_NONE);
        platform_set_echo_reference(adev, false, AUDIO_DEVICE_NONE);


    if (in == NULL) {
    if (in == NULL) {