compress: Add function to get timestamp in samples
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 sample count.
Charles Keepax [Fri, 25 Jan 2013 10:43:14 +0000 (10:43 +0000)]
compress: Do not put newlines on error messages
In the oops function text is appended onto the end of the supplied error
message, so newlines appear in the middle of error messages. This patch
removes all newlines from supplied error messages.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Charles Keepax [Fri, 25 Jan 2013 10:43:13 +0000 (10:43 +0000)]
compress: Return error messages correctly from compress_open
The allocated compress object will be freed and bad_compress will be
returned, so error messages written to the allocated compress struct
will be lost. This patch writes error messages to bad_compress for error
paths in compress_open, ensuring that error messages are returned
correctly.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>