diff options
author | Scott Lobdell <slobdell@google.com> | 2021-01-26 13:54:20 -0800 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-01-26 13:54:20 -0800 |
commit | f072d1ca00fe4e68a9944d8922e09d700f326c85 (patch) | |
tree | dd8a7d623ca33b5c0040ac4e338c2287a169fb4f /audio/core/all-versions/default/Stream.cpp | |
parent | c1c3917a4fa8b5a2182affe9cb7085e39db656a3 (diff) | |
parent | 36b9cdeceab74933a1dd9b0174edc37edab862dc (diff) |
Merge SP1A.210122.003
Change-Id: I48e52b88645c81351c04f3783085751522b6e99c
Diffstat (limited to 'audio/core/all-versions/default/Stream.cpp')
-rw-r--r-- | audio/core/all-versions/default/Stream.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/audio/core/all-versions/default/Stream.cpp b/audio/core/all-versions/default/Stream.cpp index c74079d9ce..f964cbb804 100644 --- a/audio/core/all-versions/default/Stream.cpp +++ b/audio/core/all-versions/default/Stream.cpp @@ -17,6 +17,7 @@ #define LOG_TAG "StreamHAL" #include "core/default/Stream.h" +#include "common/all-versions/HidlSupport.h" #include "common/all-versions/default/EffectMap.h" #include "core/default/Conversions.h" #include "core/default/Util.h" @@ -37,6 +38,7 @@ namespace CPP_VERSION { namespace implementation { using ::android::hardware::audio::common::CPP_VERSION::implementation::HidlUtils; +using ::android::hardware::audio::common::utils::splitString; Stream::Stream(bool isInput, audio_stream_t* stream) : mIsInput(isInput), mStream(stream) { (void)mIsInput; // prevent 'unused field' warnings in pre-V7 versions. @@ -220,7 +222,7 @@ Return<void> Stream::getSupportedProfiles(getSupportedProfiles_cb _hidl_cb) { // Ensure that the separator is one character, despite that it's defined as a C string. static_assert(sizeof(AUDIO_PARAMETER_VALUE_LIST_SEPARATOR) == 2); std::vector<std::string> halFormats = - util::splitString(halListValue.string(), AUDIO_PARAMETER_VALUE_LIST_SEPARATOR[0]); + splitString(halListValue.string(), AUDIO_PARAMETER_VALUE_LIST_SEPARATOR[0]); hidl_vec<AudioFormat> formats; (void)HidlUtils::audioFormatsFromHal(halFormats, &formats); std::vector<AudioProfile> tempProfiles; @@ -235,7 +237,7 @@ Return<void> Stream::getSupportedProfiles(getSupportedProfiles_cb _hidl_cb) { result = getParam(AudioParameter::keyStreamSupportedSamplingRates, &halListValue, context); if (result != Result::OK) break; std::vector<std::string> halSampleRates = - util::splitString(halListValue.string(), AUDIO_PARAMETER_VALUE_LIST_SEPARATOR[0]); + splitString(halListValue.string(), AUDIO_PARAMETER_VALUE_LIST_SEPARATOR[0]); hidl_vec<uint32_t> sampleRates; sampleRates.resize(halSampleRates.size()); for (size_t i = 0; i < sampleRates.size(); ++i) { @@ -245,7 +247,7 @@ Return<void> Stream::getSupportedProfiles(getSupportedProfiles_cb _hidl_cb) { result = getParam(AudioParameter::keyStreamSupportedChannels, &halListValue, context); if (result != Result::OK) break; std::vector<std::string> halChannelMasks = - util::splitString(halListValue.string(), AUDIO_PARAMETER_VALUE_LIST_SEPARATOR[0]); + splitString(halListValue.string(), AUDIO_PARAMETER_VALUE_LIST_SEPARATOR[0]); hidl_vec<AudioChannelMask> channelMasks; (void)HidlUtils::audioChannelMasksFromHal(halChannelMasks, &channelMasks); // Create a profile. |