summaryrefslogtreecommitdiffstats
path: root/include
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
commit6e6e8a6cc9ab99ab299929fa0246e6ced64f8ce3 (patch)
tree86c78dd408d72d6debb226c614b320ff0a65bf05 /include
parenta4635b0cde4a4b7bf0f9aed6aaade60d88eb2fe6 (diff)
parent57dae99c9fcd6becd2b5ed0c53f277ba4d7dbcfc (diff)
downloadframeworks_av-6e6e8a6cc9ab99ab299929fa0246e6ced64f8ce3.zip
frameworks_av-6e6e8a6cc9ab99ab299929fa0246e6ced64f8ce3.tar.gz
frameworks_av-6e6e8a6cc9ab99ab299929fa0246e6ced64f8ce3.tar.bz2
Merge "Added APIs for audio preprocessing"
Diffstat (limited to 'include')
-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;
};