diff options
author | Paul Mclean <pmclean@google.com> | 2019-01-17 21:34:35 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-01-17 21:34:35 +0000 |
commit | 559f16e1b63bc581e63882db7c14782f46ffe151 (patch) | |
tree | cf30e2057bf64cab29ae51b61d3e90519e42e918 /audio/core/all-versions/default/StreamIn.cpp | |
parent | ddc46d72794b2a2579604726e4abb454beddc5f2 (diff) | |
parent | d983fe2a861b18e1c9d07b7f116790ca1d6524b6 (diff) |
Merge "Adding Audio HAL V5: Direction API"
Diffstat (limited to 'audio/core/all-versions/default/StreamIn.cpp')
-rw-r--r-- | audio/core/all-versions/default/StreamIn.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/audio/core/all-versions/default/StreamIn.cpp b/audio/core/all-versions/default/StreamIn.cpp index 0014022ac2..daba6f7ef2 100644 --- a/audio/core/all-versions/default/StreamIn.cpp +++ b/audio/core/all-versions/default/StreamIn.cpp @@ -496,6 +496,27 @@ Return<void> StreamIn::getActiveMicrophones(getActiveMicrophones_cb _hidl_cb) { } #endif +#if MAJOR_VERSION >= 5 +Return<Result> StreamIn::setMicrophoneDirection(MicrophoneDirection direction) { + if (mStream->set_microphone_direction == nullptr) { + return Result::NOT_SUPPORTED; + } + return Stream::analyzeStatus( + "set_microphone_direction", + mStream->set_microphone_direction( + mStream, static_cast<audio_microphone_direction_t>(direction))); +} + +Return<Result> StreamIn::setMicrophoneFieldDimension(float zoom) { + if (mStream->set_microphone_field_dimension == nullptr) { + return Result::NOT_SUPPORTED; + } + return Stream::analyzeStatus("set_microphone_field_dimension", + mStream->set_microphone_field_dimension(mStream, zoom)); +} + +#endif + } // namespace implementation } // namespace CPP_VERSION } // namespace audio |