diff options
author | Mikhail Naganov <mnaganov@google.com> | 2022-01-26 18:57:31 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2022-01-26 18:57:31 +0000 |
commit | 9b5dcd32aa701057e28c405e87f8c13bc77145dd (patch) | |
tree | 61be897f9dbe3a3aa904b21ab0a52d638e406e25 /audio/core/all-versions/default/PrimaryDevice.cpp | |
parent | 425df50402834f8b634ce33feee783dfb3df3907 (diff) | |
parent | 40fde0bc07be50644705a708a522c941840f35c7 (diff) |
Merge changes from topic "b-214426419-hal-v7_1"
* changes:
Audio HAL V7.1: Update VTS
Audio HAL V7.1: Update the default implementation
Audio HAL V7.1: Interfaces & types
Diffstat (limited to 'audio/core/all-versions/default/PrimaryDevice.cpp')
-rw-r--r-- | audio/core/all-versions/default/PrimaryDevice.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/audio/core/all-versions/default/PrimaryDevice.cpp b/audio/core/all-versions/default/PrimaryDevice.cpp index fe56177975..cf162f1463 100644 --- a/audio/core/all-versions/default/PrimaryDevice.cpp +++ b/audio/core/all-versions/default/PrimaryDevice.cpp @@ -29,6 +29,10 @@ namespace audio { namespace CPP_VERSION { namespace implementation { +namespace util { +using namespace ::android::hardware::audio::CORE_TYPES_CPP_VERSION::implementation::util; +} + PrimaryDevice::PrimaryDevice(audio_hw_device_t* device) : mDevice(new Device(device)) {} PrimaryDevice::~PrimaryDevice() { @@ -195,7 +199,7 @@ Return<void> PrimaryDevice::updateAudioPatch(int32_t previousPatch, // Methods from ::android::hardware::audio::CPP_VERSION::IPrimaryDevice follow. Return<Result> PrimaryDevice::setVoiceVolume(float volume) { - if (!isGainNormalized(volume)) { + if (!util::isGainNormalized(volume)) { ALOGW("Can not set a voice volume (%f) outside [0,1]", volume); return Result::INVALID_ARGUMENTS; } @@ -326,7 +330,7 @@ Return<Result> PrimaryDevice::setBtHfpSampleRate(uint32_t sampleRateHz) { return mDevice->setParam(AUDIO_PARAMETER_KEY_HFP_SET_SAMPLING_RATE, int(sampleRateHz)); } Return<Result> PrimaryDevice::setBtHfpVolume(float volume) { - if (!isGainNormalized(volume)) { + if (!util::isGainNormalized(volume)) { ALOGW("Can not set BT HFP volume (%f) outside [0,1]", volume); return Result::INVALID_ARGUMENTS; } |