Hello all,
I am developing a Voip product with a max
latency requirement of 150ms mouth to ear. Our current tests
show latency moving in a saw-tooth like pattern between 180ms
and 140ms.
The latency will begin at ~180ms, and then drop
over time to around 160 to 140ms. Then, it jumps back up to
~180 and the process repeats.
This is all measured using oscilloscopes and
similar instruments. Running the pjsua application with a call
to sip:localhost shows no sawtooth pattern, and a call between
two COTS Voip phones do not show the sawtooth pattern.
What I recognized was that the latency would
jump back up after a buffer underflow on a split combo port:
17:59:27.446
scombdb-dn !Underflow, buf_cnt=1, will generate 1 frame
17:59:27.446
scombdb-dn Underflow, buf_cnt=126, will generate 1 frame
17:59:33.246
scombdb-dn Underflow, buf_cnt=1, will generate 1 frame
17:59:33.246
scombdb-dn Underflow, buf_cnt=126, will generate 1 frame
17:59:38.365
scombdb-dn Underflow, buf_cnt=1, will generate 1 frame
17:59:38.366
scombdb-dn Underflow, buf_cnt=126, will generate 1 frame
17:59:44.486
scombdb-dn Underflow, buf_cnt=1, will generate 1 frame
17:59:44.486
scombdb-dn Underflow, buf_cnt=126, will generate 1 frame
17:59:49.626
scombdb-dn Underflow, buf_cnt=1, will generate 1 frame
17:59:49.626
scombdb-dn Underflow, buf_cnt=126, will generate 1 frame
17:59:55.426
scombdb-dn Underflow, buf_cnt=1, will generate 1 frame
17:59:55.426
scombdb-dn Underflow, buf_cnt=126, will generate 1 frame
18:00:06.686
scombdb-dn Underflow, buf_cnt=1, will generate 1 frame
18:00:06.687
scombdb-dn Underflow, buf_cnt=126, will generate 1 frame
18:00:12.486
scombdb-dn Underflow, buf_cnt=1, will generate 1 frame
18:00:12.487
scombdb-dn Underflow, buf_cnt=126, will generate 1 frame
18:00:17.926
scombdb-dn Underflow, buf_cnt=1, will generate 1 frame
18:00:17.926
scombdb-dn Underflow, buf_cnt=126, will generate 1 frame
… some time
later …
18:03:39.166
scombdb-dn Underflow, buf_cnt=121, will generate 1 frame
18:03:39.166
scombdb-dn Underflow, buf_cnt=21, will generate 1 frame
18:03:44.646
scombdb-dn Underflow, buf_cnt=121, will generate 1 frame
18:03:44.646
scombdb-dn Underflow, buf_cnt=21, will generate 1 frame
18:03:49.766
scombdb-dn Underflow, buf_cnt=121, will generate 1 frame
18:03:49.766
scombdb-dn Underflow, buf_cnt=21, will generate 1 frame
This
reliably happens every 5 to 6 seconds.
What could
be causing this underflow? We are looking for minimum latency,
so the jitter buffer is at a max of 60ms and the sound device
has a play and record latency of 40ms.
Any
guidance would be appreciated.
Thanks,
John.