summaryrefslogtreecommitdiffstats
path: root/include/hardware/audio_effect.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-08-31 18:42:35 -0700
committerEric Laurent <elaurent@google.com>2012-08-31 18:42:35 -0700
commita07ef69482e28199bb34ac94e1e621f7afaf842e (patch)
treecefdd85043d270a64f5c77bda640b77ab1f501b0 /include/hardware/audio_effect.h
parent673a810469947edb32fde9326c44eb326b5d2b1a (diff)
downloadhardware_libhardware-a07ef69482e28199bb34ac94e1e621f7afaf842e.zip
hardware_libhardware-a07ef69482e28199bb34ac94e1e621f7afaf842e.tar.gz
hardware_libhardware-a07ef69482e28199bb34ac94e1e621f7afaf842e.tar.bz2
audio effects: add audio source indication
Added a command to audio effect API to indicate the audio source to audio pre processings. Change-Id: Ia9d68bc095b8bc5d3cf847a406ec0a719a1c14ac
Diffstat (limited to 'include/hardware/audio_effect.h')
-rw-r--r--include/hardware/audio_effect.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/hardware/audio_effect.h b/include/hardware/audio_effect.h
index 4037bbb..46e323d 100644
--- a/include/hardware/audio_effect.h
+++ b/include/hardware/audio_effect.h
@@ -142,6 +142,10 @@ typedef struct effect_descriptor_s {
// | | | 1 requires audio mode updates
// | | | 2..3 reserved
// +---------------------------+-----------+-----------------------------------
+// | Audio source indication | 20..21 | 0 none
+// | | | 1 requires audio source updates
+// | | | 2..3 reserved
+// +---------------------------+-----------+-----------------------------------
// Insert mode
#define EFFECT_FLAG_TYPE_SHIFT 0
@@ -216,6 +220,13 @@ typedef struct effect_descriptor_s {
#define EFFECT_FLAG_AUDIO_MODE_IND (1 << EFFECT_FLAG_AUDIO_MODE_SHIFT)
#define EFFECT_FLAG_AUDIO_MODE_NONE (0 << EFFECT_FLAG_AUDIO_MODE_SHIFT)
+// Audio source indication
+#define EFFECT_FLAG_AUDIO_SOURCE_SHIFT (EFFECT_FLAG_AUDIO_MODE_SHIFT + EFFECT_FLAG_AUDIO_MODE_SIZE)
+#define EFFECT_FLAG_AUDIO_SOURCE_SIZE 2
+#define EFFECT_FLAG_AUDIO_SOURCE_MASK (((1 << EFFECT_FLAG_AUDIO_SOURCE_SIZE) -1) \
+ << EFFECT_FLAG_AUDIO_SOURCE_SHIFT)
+#define EFFECT_FLAG_AUDIO_SOURCE_IND (1 << EFFECT_FLAG_AUDIO_SOURCE_SHIFT)
+#define EFFECT_FLAG_AUDIO_SOURCE_NONE (0 << EFFECT_FLAG_AUDIO_SOURCE_SHIFT)
#define EFFECT_MAKE_API_VERSION(M, m) (((M)<<16) | ((m) & 0xFFFF))
#define EFFECT_API_VERSION_MAJOR(v) ((v)>>16)
@@ -413,6 +424,7 @@ enum effect_command_e {
EFFECT_CMD_GET_FEATURE_SUPPORTED_CONFIGS,// get all supported configurations for a feature.
EFFECT_CMD_GET_FEATURE_CONFIG, // get current feature configuration
EFFECT_CMD_SET_FEATURE_CONFIG, // set current feature configuration
+ EFFECT_CMD_SET_AUDIO_SOURCE, // set the audio source (see audio.h, audio_source_t)
EFFECT_CMD_FIRST_PROPRIETARY = 0x10000 // first proprietary command code
};
@@ -705,6 +717,20 @@ enum effect_command_e {
// size: sizeof(uint32_t)
// data: status
//==================================================================================================
+// command: EFFECT_CMD_SET_AUDIO_SOURCE
+//--------------------------------------------------------------------------------------------------
+// description:
+// Set the audio source the capture path is configured for (Camcorder, voice recognition...).
+// See audio.h, audio_source_t for values.
+//--------------------------------------------------------------------------------------------------
+// command format:
+// size: sizeof(uint32_t)
+// data: uint32_t
+//--------------------------------------------------------------------------------------------------
+// reply format:
+// size: 0
+// data: N/A
+//==================================================================================================
// command: EFFECT_CMD_FIRST_PROPRIETARY
//--------------------------------------------------------------------------------------------------
// description: