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

Commit a2bdf6ed authored by Yamit Mehta's avatar Yamit Mehta Committed by Tom Cherry
Browse files

hal: Update mixer control for voice/volte call

Update mixer control with session id in
voice/volte call so that mute and unmute
commands can work properly.

Bug: 32395731

Change-Id: Ib64707e644eda29bd145ad67ae6d2519ac643969
parent 7533dc8b
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1428,7 +1428,9 @@ int platform_set_mic_mute(void *platform, bool state)
    struct mixer_ctl *ctl;
    const char *mixer_ctl_name = "Voice Tx Mute";
    int ret = 0;
    uint32_t set_values[ ] = {0};
    uint32_t set_values[ ] = {0,
                              ALL_SESSION_VSID,
                              DEFAULT_MUTE_RAMP_DURATION_MS};

    if (audio_extn_hfp_is_active(adev))
        mixer_ctl_name = "HFP TX Mute";
@@ -1441,6 +1443,10 @@ int platform_set_mic_mute(void *platform, bool state)
        return -EINVAL;
    }
    ALOGV("Setting voice mute state: %d", state);
    // "HFP TX mute" mixer control has xcount of 1.
    if (audio_extn_hfp_is_active(adev))
        ret = mixer_ctl_set_array(ctl, set_values, 1 /*count*/);
    else
        ret = mixer_ctl_set_array(ctl, set_values, ARRAY_SIZE(set_values));
    return ret;
}