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

Commit 7992b8ed authored by Vidyakumar Athota's avatar Vidyakumar Athota Committed by Gerrit - the friendly Code Review server
Browse files

hal: fix to set tty mode properly

If set parameters API called with key "tty_mode" and
MULTI_VOICE_SESSION_ENABLED flag is not enabled then tty mode is
not executed because voice_extn_set_parameters returns error(-ENOSYS).
Fix by ignore -ENOSYS return code for voice_extn_set_parameters
and voice_extn_compress_voip_set_parameters.

Change-Id: Id2308b2218fdf74e420ecbe25eeadd49756494f1
parent 9fcb0552
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -397,12 +397,20 @@ int voice_set_parameters(struct audio_device *adev, struct str_parms *parms)
    ALOGV_IF(kv_pairs != NULL, "%s: enter: %s", __func__, kv_pairs);

    ret = voice_extn_set_parameters(adev, parms);
    if (ret != 0)
    if (ret != 0) {
        if (ret == -ENOSYS)
            ret = 0;
        else
            goto done;
    }

    ret = voice_extn_compress_voip_set_parameters(adev, parms);
    if (ret != 0)
    if (ret != 0) {
        if (ret == -ENOSYS)
            ret = 0;
        else
            goto done;
    }

    err = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_TTY_MODE, value, sizeof(value));
    if (err >= 0) {