[alsa-devel] ask about audio latency

周勇发 zyfa2008 at gmail.com
Sun May 22 17:00:01 CEST 2011


hi

I want to get the latency between record and playback, so i use following
solution to calculate it.

#audio.sh
arecord -d 3 -r 96000 in.wav &
sleep 1
aplay mode.wav

model.wav is a sine wave. this file is used for calculate the delta
timestamp of record and playback.
I have append do_gettimeofday() function in azx_stream_start()  in
hda_intel.c file. it will printk the dma trigger time after trigger dma.

the result is about 12ms. as far as i known. fifo size is 192, sample rate
is 96000, so it will take about 2ms latency,  my question is where does the
other 10ms latency come from?

Thanks

-- 
Best Regards!


More information about the Alsa-devel mailing list