audio: improve read delay estimation
audio: improve read delay estimation

The compressed stream has to rate-limit the incoming audio to
avoid triggering a bug in the Android audio stack. This change
improves this to base the delay on the time since the last read
completed, which is where the next chunk of real captured audio
would have started. The same code can be re-used to for the
delays needed when a read fails and just memsets the returned
buffer to zeros.

Change-Id: Ia919380f1595863f41c21dbb2bb9c6821c2d545d
Signed-off-by: Richard Fitzgerald <22ee0097135072451429b5ac45630d52779cd49b@opensource.wolfsonmicro.com>

CirrusLogic/tinyhal,CirrusLogic/tinyhal,CirrusLogic/tinyhal