hal: add support for pcm_ioctl() api
- Tinyalsa doesn't expose an api to call
ioctls exposed by the audio drivers.
- Add pcm_ioctl() api to support pcm ioctl.
Change-Id: I448252e8d3347257a73c56bc8ed341abc2dd2dab
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 37bbcba..f0a5a97 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2913,6 +2913,19 @@
return 0;
}
+int pcm_ioctl(struct pcm *pcm, int request, ...)
+{
+ va_list ap;
+ void * arg;
+ int pcm_fd = *(int*)pcm;
+
+ va_start(ap, request);
+ arg = va_arg(ap, void *);
+ va_end(ap);
+
+ return ioctl(pcm_fd, request, arg);
+}
+
static struct hw_module_methods_t hal_module_methods = {
.open = adev_open,
};