MC7304 audio delay


we are using MC7304 with firmware in an automatic call generator. We would like to use the modems to measure voice quality, including audio delay (latency). The problem is, that audio is delayed quite a bit internally in the modem.

We are configuring the devices for audio via USB using
at! AVCFG=1, 3, 3

When I manually set up a call with the modem to a public phone and talk into the public phone, recording the audio output of the modem with Audacity, the audio is initially delayed by about 1s. When I switch recording off and on during the call, the delay grows, I’ve seen more than 6 seconds delay. The only way I found so far to reset the delay is to make an intermediate call without accessing the audio port (a dummy call atd0; ath is sufficient). I suppose, this performs a flush on the audio data buffer. The next call will then start with ca. 1s delay.

But this initial delay seems to be on the high side already. I have tried to measure the internal audio card delay by configuring a loopback with at!avaudiolpbk=1, which returned ok, but there is no audio output when I feed the input with audio from the PC. Thus, I could not figure out how to determine the internal delay of the modem without the delay of the mobile network.

My questions are:

  • is there a way to flush the audio buffer within an ongoing call to hopefully get a much shorter initial delay than we observe?
  • is there a way to measure the audio buffer delay without the delay of the mobile network, so we can possibly just subtract it from the the total delay that comprises the network latency plus any delays inside the modem?
  • or maybe do we just configure the modem in the wrong way for USB audio? The problems are the same in our test system under Linux and in my tests on a laptop under Windows 7 (control of the modem via Putty).

Thanks for any hints!