Make getHwAvSync strongly typed above libaudiohal

This CL lays the foundation and pattern for converting more parameters
to a strongly typed interface.

Test: TBD
Change-Id: I5503da3f68c543e441ede4d381518a8e5601fe8c
diff --git a/media/libaudiohal/impl/DeviceHalHidl.cpp b/media/libaudiohal/impl/DeviceHalHidl.cpp
index 3180b7d..f247658 100644
--- a/media/libaudiohal/impl/DeviceHalHidl.cpp
+++ b/media/libaudiohal/impl/DeviceHalHidl.cpp
@@ -515,6 +515,18 @@
     return processReturn("setConnectedState", mDevice->setConnectedState(hidlAddress, connected));
 }
 
+error::Result<audio_hw_sync_t> DeviceHalHidl::getHwAvSync() {
+    if (mDevice == 0) return NO_INIT;
+    audio_hw_sync_t value;
+    Result result;
+    Return<void> ret = mDevice->getHwAvSync([&value, &result](Result r, audio_hw_sync_t v) {
+        value = v;
+        result = r;
+    });
+    RETURN_IF_ERROR(processReturn("getHwAvSync", ret, result));
+    return value;
+}
+
 status_t DeviceHalHidl::dump(int fd, const Vector<String16>& args) {
     if (mDevice == 0) return NO_INIT;
     native_handle_t* hidlHandle = native_handle_create(1, 0);