aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2014-08-03 08:35:22 -0700
committerSteve Kondik <shade@chemlab.org>2014-08-03 22:13:01 -0700
commite23d708a8b43fee61950101f88e3da3ad624535c (patch)
tree2ddf188bb1fb91aabf8d4f303d05554e7680c820
parent0faa063518b2e15e4447fc6b932a8a6925e3c8b4 (diff)
downloadandroid_external_tinyalsa-cm-11.0.tar.gz
android_external_tinyalsa-cm-11.0.tar.bz2
android_external_tinyalsa-cm-11.0.zip
* At least one thing still wants this. This reverts commit 0faa063518b2e15e4447fc6b932a8a6925e3c8b4. Change-Id: I656940cb0bd6dd1f354f6a104a2d89c9922340a0
-rw-r--r--include/tinyalsa/asoundlib.h6
-rw-r--r--pcm.c15
2 files changed, 21 insertions, 0 deletions
diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h
index ec526e6..c1cef00 100644
--- a/include/tinyalsa/asoundlib.h
+++ b/include/tinyalsa/asoundlib.h
@@ -1,5 +1,8 @@
/* asoundlib.h
**
+** Copyright (c) 2013, The Linux Foundation. All rights reserved.
+** Not a contribution.
+**
** Copyright 2011, The Android Open Source Project
**
** Redistribution and use in source and binary forms, with or without
@@ -203,6 +206,9 @@ int pcm_mmap_commit(struct pcm *pcm, unsigned int offset, unsigned int frames);
int pcm_start(struct pcm *pcm);
int pcm_stop(struct pcm *pcm);
+/* ioctl function for PCM driver */
+int pcm_ioctl(struct pcm *pcm, int request, ...);
+
/* Interrupt driven API */
int pcm_wait(struct pcm *pcm, int timeout);
diff --git a/pcm.c b/pcm.c
index 3c2764d..b941796 100644
--- a/pcm.c
+++ b/pcm.c
@@ -1,5 +1,8 @@
/* pcm.c
**
+** Copyright (c) 2013, The Linux Foundation. All rights reserved.
+** Not a contribution.
+**
** Copyright 2011, The Android Open Source Project
**
** Redistribution and use in source and binary forms, with or without
@@ -1039,3 +1042,15 @@ int pcm_mmap_read(struct pcm *pcm, void *data, unsigned int count)
return pcm_mmap_transfer(pcm, data, count);
}
+
+int pcm_ioctl(struct pcm *pcm, int request, ...)
+{
+ va_list ap;
+ void * arg;
+
+ va_start(ap, request);
+ arg = va_arg(ap, void *);
+ va_end(ap);
+
+ return ioctl(pcm->fd, request, arg);
+}