[alsa-devel] [PATCH v2] ALSA: hda/ca0132 - Update latency based on DSP state.

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Fri Apr 5 18:28:58 CEST 2013


> I thought that the timestamp and the runtime delay are basically
> independent parameters.  Why must the former be disabled?

In HDA you have DPIB and LPIB. The position in the buffer is reported by 
DPIB and the # of samples rendered is reported by LPIB. The delay is the 
difference between the two when you use the LPIB_DELAY implementation. 
As a result, when you look-up the timestamps and query the delay, what 
you get is the current time as seen by the HDA interface. If you 
increment the runtime delay to add the codec delay, then you must also 
increment by the same amount in azx_get_wallclock_tstamp(). Just 
updating the runtime delay is not enough.
One problem I also have with this approach is that the delay may be 
different if you have multiple streams processed with different 
algorithms, and that isn't exposed here.
-Pierre



More information about the Alsa-devel mailing list