aaudio: factor the format converstion function

Factor the foramt conversion function into a utility function

Bug: 65067568
Bug: 186892145
Test: OboeTester
Test: atest AAudioTests
Change-Id: I3b5566ae77881638e26915fad168c2e5f675cfcf
1 file changed