summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-07-25 14:43:05 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-25 14:43:05 -0700
commit234cef81299688db75edb6572e37374a67f79bbc (patch)
tree3fa3964aa740ef9c81204f995fd780dcfe6244e6 /include/media
parentfb526513056eb275a8ad7ff7998e2e56be8fd467 (diff)
parent0f7f4ece1b6b73caf608d533d833a8cdc11c8131 (diff)
downloadframeworks_base-234cef81299688db75edb6572e37374a67f79bbc.zip
frameworks_base-234cef81299688db75edb6572e37374a67f79bbc.tar.gz
frameworks_base-234cef81299688db75edb6572e37374a67f79bbc.tar.bz2
Merge "Added APIs for audio preprocessing"
Diffstat (limited to 'include/media')
-rw-r--r--include/media/AudioEffect.h31
-rw-r--r--include/media/IAudioPolicyService.h3
2 files changed, 34 insertions, 0 deletions
diff --git a/include/media/AudioEffect.h b/include/media/AudioEffect.h
index 496b23e..1417416 100644
--- a/include/media/AudioEffect.h
+++ b/include/media/AudioEffect.h
@@ -21,6 +21,7 @@
#include <sys/types.h>
#include <media/IAudioFlinger.h>
+#include <media/IAudioPolicyService.h>
#include <media/IEffect.h>
#include <media/IEffectClient.h>
#include <hardware/audio_effect.h>
@@ -111,6 +112,36 @@ public:
/*
+ * Returns a list of descriptors corresponding to the pre processings enabled by default
+ * on an AudioRecord with the supplied audio session ID.
+ *
+ * Parameters:
+ * audioSession: audio session ID.
+ * descriptors: address where the effect descriptors should be returned.
+ * count: as input, the maximum number of descriptor than should be returned
+ * as output, the number of descriptor returned if status is NO_ERROR or the actual
+ * number of enabled pre processings if status is NO_MEMORY
+ *
+ * Returned status (from utils/Errors.h) can be:
+ * NO_ERROR successful operation.
+ * NO_MEMORY the number of descriptor to return is more than the maximum number
+ * indicated by count.
+ * PERMISSION_DENIED could not get AudioFlinger interface
+ * NO_INIT effect library failed to initialize
+ * BAD_VALUE invalid audio session or descriptor pointers
+ *
+ * Returned value
+ * *descriptor updated with descriptors of pre processings enabled by default
+ * *count number of descriptors returned if returned status is N_ERROR.
+ * total number of pre processing enabled by default if returned status is
+ * NO_MEMORY. This happens if the count passed as input is less than the number
+ * of descriptors to return
+ */
+ static status_t queryDefaultPreProcessing(int audioSession,
+ effect_descriptor_t *descriptors,
+ uint32_t *count);
+
+ /*
* Events used by callback function (effect_callback_t).
*/
enum event_type {
diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h
index 86b9f85..ed265e1 100644
--- a/include/media/IAudioPolicyService.h
+++ b/include/media/IAudioPolicyService.h
@@ -85,6 +85,9 @@ public:
int id) = 0;
virtual status_t unregisterEffect(int id) = 0;
virtual bool isStreamActive(int stream, uint32_t inPastMs = 0) const = 0;
+ virtual status_t queryDefaultPreProcessing(int audioSession,
+ effect_descriptor_t *descriptors,
+ uint32_t *count) = 0;
};