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

Commit 51b4b9a6 authored by Pavan Chikkala's avatar Pavan Chikkala Committed by Gerrit - the friendly Code Review server
Browse files

hal: Update pcm_open flag for VOIP

- By default CLOCK_REALTIME is used.
- Change the clock type to CLOCK_MONOTONIC
  to synchronize the framework and VOIP driver
  clock and timestamps.

Change-Id: I8ab64e948cea5d027bf28c4e101ff517fda3558c
parent e0b22e0e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -328,6 +328,7 @@ static int voip_start_call(struct audio_device *adev,
    int i, ret = 0;
    struct audio_usecase *uc_info;
    int pcm_dev_rx_id, pcm_dev_tx_id;
    unsigned int flags = PCM_OUT | PCM_MONOTONIC;

    ALOGD("%s: enter", __func__);

@@ -368,7 +369,7 @@ static int voip_start_call(struct audio_device *adev,
              __func__, adev->snd_card, pcm_dev_rx_id);
        voip_data.pcm_rx = pcm_open(adev->snd_card,
                                    pcm_dev_rx_id,
                                    PCM_OUT, voip_config);
                                    flags, voip_config);
        if (voip_data.pcm_rx && !pcm_is_ready(voip_data.pcm_rx)) {
            ALOGE("%s: %s", __func__, pcm_get_error(voip_data.pcm_rx));
            pcm_close(voip_data.pcm_rx);