29 Apr
2010
29 Apr
'10
11:15 a.m.
I'm studying ALSA lib and trying to write a plugin that can perform AEC function. I have to retrieve the data being played and use it as reference. I've read pcm_dmix.c and found dmix just simply mixes data into HW mmap buffer (destination buffer). My problem is, there might be several dmix instances, which doesn't know if there is other dmix instance. So how can I know the mixed data is exactly the data being played. For example, the 1st instance had mixes the data into destination buffer, but 2nd instance haven't complete the mix operation. Would the data in destination buffer be playing by HW? Or there is some mechanism to guarantee the data will be played after all mix operation is done.