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

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

hal: avoid sending audio calibration during voice call

Pilot tone is audible during voice call over headset because of sending
wrong device calibration. Audio calibration is not required to send
during voice call. Fix this issue by not sending audio calibration
during voice call.

Change-Id: I923d1e39af805c9fccf386fb2930c2819ddf6363
parent 2421d964
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1261,11 +1261,15 @@ void audio_extn_utils_send_audio_calibration(struct audio_device *adev,
        platform_send_audio_calibration(adev->platform, usecase,
                         usecase->stream.in->app_type_cfg.app_type,
                         usecase->stream.in->app_type_cfg.sample_rate);
    } else {
    } else if (type == PCM_HFP_CALL) {
        /* when app type is default. the sample rate is not used to send cal */
        platform_send_audio_calibration(adev->platform, usecase,
                         platform_get_default_app_type_v2(adev->platform, usecase->type),
                         48000);
    } else {
        /* No need to send audio calibration for voice and voip call usecases */
        if ((type != VOICE_CALL) && (type != VOIP_CALL))
            ALOGW("%s: No audio calibration for usecase type = %d",  __func__, type);
    }
}