diff options
author | Mikhail Naganov <mnaganov@google.com> | 2022-01-15 01:15:12 +0000 |
---|---|---|
committer | Mikhail Naganov <mnaganov@google.com> | 2022-02-05 00:44:17 +0000 |
commit | 8140f5660a6cd15d3e947cb52e6b305c36313151 (patch) | |
tree | bad364f3489c097a7bb9d7295ce6a5f23e5b6008 /audio/core/all-versions/default/StreamOut.cpp | |
parent | 51a7e13849988a91938932231c39a41157953038 (diff) |
Audio HAL V7.1: Update the default implementation
Split versions of "common" and "core" types from
the version of the interfaces. "Common" and "core"
versions are set to 7.0.
Implemented new methods of V7.1 interfaces.
Bug: 214426419
Test: m android.hardware.audio@7.1-impl
Test: m android.hardware.audio@7.0-impl
Test: m android.hardware.audio.effect@7.0-impl
Test: m android.hardware.audio@6.0-impl
Change-Id: Ic4c44d4ac9bbfa7b62695866b9aa7473658390b2
(cherry picked from commit 7d01538eeccf81aa57da61b4abba830d34582195)
Merged-In: Ic4c44d4ac9bbfa7b62695866b9aa7473658390b2
Diffstat (limited to 'audio/core/all-versions/default/StreamOut.cpp')
-rw-r--r-- | audio/core/all-versions/default/StreamOut.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/audio/core/all-versions/default/StreamOut.cpp b/audio/core/all-versions/default/StreamOut.cpp index d027231f11..d4a89d7bf9 100644 --- a/audio/core/all-versions/default/StreamOut.cpp +++ b/audio/core/all-versions/default/StreamOut.cpp @@ -39,7 +39,11 @@ namespace audio { namespace CPP_VERSION { namespace implementation { -using ::android::hardware::audio::common::CPP_VERSION::implementation::HidlUtils; +using ::android::hardware::audio::common::COMMON_TYPES_CPP_VERSION::implementation::HidlUtils; +using ::android::hardware::audio::CORE_TYPES_CPP_VERSION::implementation::CoreUtils; +namespace util { +using namespace ::android::hardware::audio::CORE_TYPES_CPP_VERSION::implementation::util; +} namespace { @@ -334,7 +338,7 @@ Return<Result> StreamOut::setVolume(float left, float right) { if (mStream->set_volume == NULL) { return Result::NOT_SUPPORTED; } - if (!isGainNormalized(left)) { + if (!util::isGainNormalized(left)) { ALOGW("Can not set a stream output volume {%f, %f} outside [0,1]", left, right); return Result::INVALID_ARGUMENTS; } |