hal: set initial value of stop_threshold for compress voip
Member stop_threshold of pcm_config for compress voip is not
initialized, then it will be set to default value equals to
buffer size during pcm_open. XRUN may happen and stop the
stream due to delayed writes to fill buffers. When stream is
restarted, path configuration could fail and cause RX mute.
Set the intial value to INT_MAX to avoid XRUN.
Change-Id: Ic405390f43b7d97ffcdfa6f3b749376f8220e24a
CRs-Fixed: 2047671
diff --git a/hal/voice_extn/compress_voip.c b/hal/voice_extn/compress_voip.c
index 6448b38..5fff2d5 100644
--- a/hal/voice_extn/compress_voip.c
+++ b/hal/voice_extn/compress_voip.c
@@ -53,6 +53,7 @@
.period_size = COMPRESS_VOIP_IO_BUF_SIZE_NB/2,
.period_count = 10,
.format = PCM_FORMAT_S16_LE,
+ .stop_threshold = INT_MAX,
};
struct pcm_config pcm_config_voip_wb = {
@@ -61,6 +62,7 @@
.period_size = COMPRESS_VOIP_IO_BUF_SIZE_WB/2,
.period_count = 10,
.format = PCM_FORMAT_S16_LE,
+ .stop_threshold = INT_MAX,
};
struct pcm_config pcm_config_voip_swb = {
@@ -69,6 +71,7 @@
.period_size = COMPRESS_VOIP_IO_BUF_SIZE_SWB/2,
.period_count = 10,
.format = PCM_FORMAT_S16_LE,
+ .stop_threshold = INT_MAX,
};
struct pcm_config pcm_config_voip_fb = {
@@ -77,6 +80,7 @@
.period_size = COMPRESS_VOIP_IO_BUF_SIZE_FB/2,
.period_count = 10,
.format = PCM_FORMAT_S16_LE,
+ .stop_threshold = INT_MAX,
};
struct voip_data {