diff options
author | Paul McLean <pmclean@google.com> | 2018-12-12 10:08:11 -0800 |
---|---|---|
committer | Paul McLean <pmclean@google.com> | 2019-01-16 21:00:05 -0700 |
commit | d983fe2a861b18e1c9d07b7f116790ca1d6524b6 (patch) | |
tree | 4131ff34ab715b389dd410aefc77b25f40d90d9b /audio/5.0 | |
parent | 9bed22a4b561e067a0e54cf07135b108c8fff8f3 (diff) | |
download | platform_hardware_interfaces-d983fe2a861b18e1c9d07b7f116790ca1d6524b6.tar.gz platform_hardware_interfaces-d983fe2a861b18e1c9d07b7f116790ca1d6524b6.tar.bz2 platform_hardware_interfaces-d983fe2a861b18e1c9d07b7f116790ca1d6524b6.zip |
Adding Audio HAL V5: Direction API
Bug: 119137468
Test: Testbed App
Change-Id: Ief74abab49b68ac13e0433f5fe29dd25379c7aec
Diffstat (limited to 'audio/5.0')
-rw-r--r-- | audio/5.0/IStreamIn.hal | 23 | ||||
-rw-r--r-- | audio/5.0/types.hal | 26 |
2 files changed, 49 insertions, 0 deletions
diff --git a/audio/5.0/IStreamIn.hal b/audio/5.0/IStreamIn.hal index d33cfdc773..b042960b17 100644 --- a/audio/5.0/IStreamIn.hal +++ b/audio/5.0/IStreamIn.hal @@ -165,4 +165,27 @@ interface IStreamIn extends IStream { */ getActiveMicrophones() generates(Result retval, vec<MicrophoneInfo> microphones); + + /** + * Specifies the logical microphone (for processing). + * + * Optional method + * + * @param Direction constant + * @return retval OK if the call is successful, an error code otherwise. + */ + setMicrophoneDirection(MicrophoneDirection direction) + generates(Result retval); + + /** + * Specifies the zoom factor for the selected microphone (for processing). + * + * Optional method + * + * @param the desired field dimension of microphone capture. Range is from -1 (wide angle), + * though 0 (no zoom) to 1 (maximum zoom). + * + * @return retval OK if the call is not successful, an error code otherwise. + */ + setMicrophoneFieldDimension(float zoom) generates(Result retval); }; diff --git a/audio/5.0/types.hal b/audio/5.0/types.hal index 49323672f8..2c153c6ea4 100644 --- a/audio/5.0/types.hal +++ b/audio/5.0/types.hal @@ -221,3 +221,29 @@ struct MicrophoneInfo { */ AudioMicrophoneCoordinate orientation; }; + +/** + * Constants used by the HAL to determine how to select microphones and process those inputs in + * order to optimize for capture in the specified direction. + * + * MicrophoneDirection Constants are defined in MicrophoneDirection.java. + */ +@export(name="audio_microphone_direction_t", value_prefix="MIC_DIRECTION_") +enum MicrophoneDirection : int32_t { + /** + * Don't do any directionality processing of the activated microphone(s). + */ + UNSPECIFIED = 0, + /** + * Optimize capture for audio coming from the screen-side of the device. + */ + FRONT = 1, + /** + * Optimize capture for audio coming from the side of the device opposite the screen. + */ + BACK = 2, + /** + * Optimize capture for audio coming from an off-device microphone. + */ + EXTERNAL = 3, +}; |