[alsa-devel] [PATCH TINYCOMPRESS 1/14] compress: Add function to get timestamp in samples

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Mon Feb 11 15:11:04 CET 2013


>> The compress_get_hpointer() converts the timestamp into actual
>> time. But Android needs it in samples. To avoid the inefficiency
>> of using compress_get_hpointer() and converting into time and then
>> back into samples, this change adds compress_get_tstamp() which
>> returns the raw struct snd_compr_tstamp.
> I am fine with adding new API for returning the samples, but then why return the
> raw struct. Would make sense to just get samples if that is only thing desired.

Loss of efficiency? It's not that bad really and the conversion could be 
handled in tinycompress (user-space) rather than adding a new kernel 
ioctl that everyone will need to implement. The htimestamp could give 
you better precision than samples if a wall clock is available in the 
hardware.
-Pierre



More information about the Alsa-devel mailing list