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
diff --git a/hal/voice_extn/compress_voip.c b/hal/voice_extn/compress_voip.c
index 26636db..e8ba1f9 100644
--- a/hal/voice_extn/compress_voip.c
+++ b/hal/voice_extn/compress_voip.c
@@ -328,6 +328,7 @@
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 @@
__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);