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/core/all-versions/default/StreamIn.cpp | |
parent | 9bed22a4b561e067a0e54cf07135b108c8fff8f3 (diff) |
Adding Audio HAL V5: Direction API
Bug: 119137468
Test: Testbed App
Change-Id: Ief74abab49b68ac13e0433f5fe29dd25379c7aec
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 ac7c2cbb3b..c66e61d434 100644 --- a/audio/core/all-versions/default/StreamIn.cpp +++ b/audio/core/all-versions/default/StreamIn.cpp @@ -485,6 +485,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 |