audio HAL: optimize compress_write() size

compress_write() does not accept partial writes and will
reject a buffer entirely if the available size is less than
the write size.

This change queries the available size before writing and limits
the write size if needed.

Bug: 26668110

Change-Id: I7bf6c14146c37a7e33006dda8a550ef22e6c65c6
1 file changed
tree: ca55672f7d91f06358e3c4238820f3d3f0af78d9
  1. hal/
  2. legacy/
  3. post_proc/
  4. visualizer/
  5. voice_processing/
  6. Android.mk