diff options
author | jpadmana <jayashree.r.padmanaban@intel.com> | 2013-08-29 14:09:31 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-08-29 14:09:31 -0700 |
commit | 45e6939f7d75afefc0c54f01a7d15502342b76bd (patch) | |
tree | 9bcdcab9051e70287c4ddab5a5a8f45967a97531 /include/hardware/audio_effect.h | |
parent | d5335304d9d864a731512819490387c753186958 (diff) | |
parent | 935799d63f0d654f350a640001077616572a4b63 (diff) | |
download | hardware_libhardware-45e6939f7d75afefc0c54f01a7d15502342b76bd.zip hardware_libhardware-45e6939f7d75afefc0c54f01a7d15502342b76bd.tar.gz hardware_libhardware-45e6939f7d75afefc0c54f01a7d15502342b76bd.tar.bz2 |
am 935799d6: Addition of EFFECT_CMD_OFFLOAD for effects offload
* commit '935799d63f0d654f350a640001077616572a4b63':
Addition of EFFECT_CMD_OFFLOAD for effects offload
Diffstat (limited to 'include/hardware/audio_effect.h')
-rw-r--r-- | include/hardware/audio_effect.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/hardware/audio_effect.h b/include/hardware/audio_effect.h index 8fa3064..ee48e4c 100644 --- a/include/hardware/audio_effect.h +++ b/include/hardware/audio_effect.h @@ -147,6 +147,9 @@ typedef struct effect_descriptor_s { // | | | 1 requires audio source updates // | | | 2..3 reserved // +---------------------------+-----------+----------------------------------- +// | Effect offload supported | 22 | 0 The effect cannot be offloaded to an audio DSP +// | | | 1 The effect can be offloaded to an audio DSP +// +---------------------------+-----------+----------------------------------- // Insert mode #define EFFECT_FLAG_TYPE_SHIFT 0 @@ -229,6 +232,14 @@ typedef struct effect_descriptor_s { #define EFFECT_FLAG_AUDIO_SOURCE_IND (1 << EFFECT_FLAG_AUDIO_SOURCE_SHIFT) #define EFFECT_FLAG_AUDIO_SOURCE_NONE (0 << EFFECT_FLAG_AUDIO_SOURCE_SHIFT) +// Effect offload indication +#define EFFECT_FLAG_OFFLOAD_SHIFT (EFFECT_FLAG_AUDIO_SOURCE_SHIFT + \ + EFFECT_FLAG_AUDIO_SOURCE_SIZE) +#define EFFECT_FLAG_OFFLOAD_SIZE 1 +#define EFFECT_FLAG_OFFLOAD_MASK (((1 << EFFECT_FLAG_OFFLOAD_SIZE) -1) \ + << EFFECT_FLAG_OFFLOAD_SHIFT) +#define EFFECT_FLAG_OFFLOAD_SUPPORTED (1 << EFFECT_FLAG_OFFLOAD_SHIFT) + #define EFFECT_MAKE_API_VERSION(M, m) (((M)<<16) | ((m) & 0xFFFF)) #define EFFECT_API_VERSION_MAJOR(v) ((v)>>16) #define EFFECT_API_VERSION_MINOR(v) ((m) & 0xFFFF) @@ -426,6 +437,8 @@ enum effect_command_e { 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_OFFLOAD, // set if effect thread is an offload one, + // send the ioHandle of the effect thread EFFECT_CMD_FIRST_PROPRIETARY = 0x10000 // first proprietary command code }; @@ -732,6 +745,20 @@ enum effect_command_e { // size: 0 // data: N/A //================================================================================================== +// command: EFFECT_CMD_OFFLOAD +//-------------------------------------------------------------------------------------------------- +// description: +// 1.indicate if the playback thread the effect is attached to is offloaded or not +// 2.update the io handle of the playback thread the effect is attached to +//-------------------------------------------------------------------------------------------------- +// command format: +// size: sizeof(effect_offload_param_t) +// data: effect_offload_param_t +//-------------------------------------------------------------------------------------------------- +// reply format: +// size: sizeof(uint32_t) +// data: uint32_t +//-------------------------------------------------------------------------------------------------- // command: EFFECT_CMD_FIRST_PROPRIETARY //-------------------------------------------------------------------------------------------------- // description: @@ -868,6 +895,11 @@ typedef struct effect_param_s { char data[]; // Start of Parameter + Value data } effect_param_t; +// structure used by EFFECT_CMD_OFFLOAD command +typedef struct effect_offload_param_s { + bool isOffload; // true if the playback thread the effect is attached to is offloaded + int ioHandle; // io handle of the playback thread the effect is attached to +} effect_offload_param_t; ///////////////////////////////////////////////// |