SPDIFEncoder: support flush burst buffer over multiple output writes

SPDIFEncoder writeOutput may not consume all bytes on first write.
Add loop to cycle through all bytes over multiple writes.

Test: atest android.media.audio.cts.LoopbackPassthroughTest#testEac3JocLoopback
      on AIDL remote submix HAL timestamps advance correctly because all
      iec61937 encapsulated bytes are written to the HAL correctly.
Change-Id: I5e5ff56792c6fc823d06c60dfca1d317fe1955ba
1 file changed