libaudiohal: When starting write, consider the stream buffer size

When starting writing into a stream, use the bigger value from
the requested bytes to write and the stream buffer size.

This fixes a corner case when offload playback starts close
to the end of the track, and then jumps to the middle.

Bug: 63979005
Test: checked HAL logs for the repro case,
  confirmed that Loopback, PM, YT, Camcoder, still work, also over BT

Change-Id: I924468619d2185fd679b739747c423babfb36ada
2 files changed