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

Commit 0f330380 authored by Yamit Mehta's avatar Yamit Mehta Committed by Alain Vongsouvanh
Browse files

DO NOT MERGE ANYWHERE audio: hal: Update Tx mute calling in HFP call.

Apply TX mute in HFP call based on MODE_IN_CALL.

BUG: 30912161

Change-Id: I594fba5f160a8c164e2f22ade8ea60a2d12c8f3b
parent ede5c490
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ int hfp_set_mic_mute(struct audio_device *adev, bool state)

    ALOGI("%s: enter, state=%d", __func__, state);

    if (adev->mode == AUDIO_MODE_IN_COMMUNICATION) {
    if (adev->mode == AUDIO_MODE_IN_CALL) {
        set_values[0] = state;
        ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
        if (!ctl) {
+3 −3
Original line number Diff line number Diff line
@@ -329,10 +329,10 @@ int voice_set_mic_mute(struct audio_device *adev, bool state)
    int err = 0;

    adev->voice.mic_mute = state;
    if (adev->mode == AUDIO_MODE_IN_CALL)
        err = platform_set_mic_mute(adev->platform, state);
    if (adev->mode == AUDIO_MODE_IN_COMMUNICATION && audio_extn_hfp_is_active(adev)) {
    if (adev->mode == AUDIO_MODE_IN_CALL && audio_extn_hfp_is_active(adev)) {
        err = hfp_set_mic_mute(adev, state);
    } else if (adev->mode == AUDIO_MODE_IN_CALL) {
        err = platform_set_mic_mute(adev->platform, state);
    } else if (adev->mode == AUDIO_MODE_IN_COMMUNICATION) {
        err = voice_extn_compress_voip_set_mic_mute(adev, state);
    }