audio: Provide operations common to input and output streams am: e9f10fc9dc

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2256002

Change-Id: I60df299d1cf8d9e1724325afcd0da2f72de66f1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>