Hi, all
I used an oscilloscope to audio latency from input to output. And found it is so big. I used DMAI funtions Sound_read() Sound_write() in a loop , record data and directly send it to playback. Basic params settting was like following, record 576 BYTES per Sound_read(). The latency is about 40 ms .
const Sound_Attrs Sound_Attrs_MONO_48_2048 = {
48000,
1,
100,
100,
Sound_Mode_FULLDUPLEX,
Sound_Input_MIC,
Sound_Std_ALSA,
8,
};
I have try to set a different value of Sound_Attrs.bufSize , found that the smaller value of Sound_Attrs.bufSize, the lower latency it is. But the minimise value only could be set to 8. When I set it ot 0 or 1, it is not effective to Sound_alsa.c initHwParams() buffer_time. That is to say, no matter I set Sound_Attrs.bufSize to 1 or 0, buffer_time is the same.
I am wonder, Is that the Buffering creates latency ? And which params should I set ?
My EVM Board
DM365,
Linux arago 2.6.32-rc2-davinci1 ,
dvsdk_3_10_00_19,
arm-2009q1
Regards,
yuan