
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