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

Commit 7a7bd08c authored by Vikram Panduranga's avatar Vikram Panduranga
Browse files

hal: remove sending handset mic calibration

In order to flush the feedback path speaker protection calibration,
handset mic cal was applied. Remove the additional code as the
condition can be handled by driver.

Change-Id: Ie77f962c5f0e6bc5b6fd54536373b2aa11f17e4f
parent 2ab55f3c
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -916,14 +916,6 @@ exit:
        if (handle.pcm_tx)
            pcm_close(handle.pcm_tx);
        handle.pcm_tx = NULL;
        /* Clear TX calibration to handset mic */
        if (disable_tx) {
            uc_info_tx->in_snd_device = SND_DEVICE_IN_HANDSET_MIC;
            uc_info_tx->out_snd_device = SND_DEVICE_NONE;
            platform_send_audio_calibration(adev->platform,
              uc_info_tx,
              platform_get_default_app_type(adev->platform), 8000);
        }
        if (!status.status) {
            protCfg.mode = MSM_SPKR_PROT_CALIBRATED;
            protCfg.r0[SP_V2_SPKR_1] = status.r0[SP_V2_SPKR_1];
@@ -1792,7 +1784,6 @@ int audio_extn_spkr_prot_start_processing(snd_device_t snd_device)
    struct audio_usecase *uc_info_tx;
    struct audio_device *adev = handle.adev_handle;
    int32_t pcm_dev_tx_id = -1, ret = 0;
    bool disable_tx = false;
    snd_device_t in_snd_device;

    ALOGV("%s: Entry", __func__);
@@ -1829,7 +1820,6 @@ int audio_extn_spkr_prot_start_processing(snd_device_t snd_device)
        uc_info_tx->out_snd_device = SND_DEVICE_NONE;
        handle.pcm_tx = NULL;
        list_add_tail(&adev->usecase_list, &uc_info_tx->list);
        disable_tx = true;
        enable_snd_device(adev, in_snd_device);
        enable_audio_route(adev, uc_info_tx);

@@ -1855,14 +1845,6 @@ int audio_extn_spkr_prot_start_processing(snd_device_t snd_device)
    }

exit:
   /* Clear VI feedback cal and replace with handset MIC  */
    if (disable_tx) {
        uc_info_tx->in_snd_device = SND_DEVICE_IN_HANDSET_MIC;
        uc_info_tx->out_snd_device = SND_DEVICE_NONE;
        platform_send_audio_calibration(adev->platform,
          uc_info_tx,
          platform_get_default_app_type(adev->platform), 8000);
     }
     if (ret) {
        if (handle.pcm_tx)
            pcm_close(handle.pcm_tx);