Merge "audio vts: Remove explicit dependency on the new types"
diff --git a/audio/core/all-versions/vts/functional/6.0/AudioPrimaryHidlHalTest.cpp b/audio/core/all-versions/vts/functional/6.0/AudioPrimaryHidlHalTest.cpp
index c56445c..30f8a7a 100644
--- a/audio/core/all-versions/vts/functional/6.0/AudioPrimaryHidlHalTest.cpp
+++ b/audio/core/all-versions/vts/functional/6.0/AudioPrimaryHidlHalTest.cpp
@@ -73,9 +73,12 @@
getCachedPolicyConfig().getModuleFromName(std::get<PARAM_DEVICE_NAME>(device));
for (const auto& ioProfile : module->getOutputProfiles()) {
for (const auto& profile : ioProfile->getAudioProfiles()) {
- auto configs = ConfigHelper::combineAudioConfig(profile->getChannels(),
- profile->getSampleRates(),
- profile->getFormat());
+ const auto& channels = profile->getChannels();
+ const auto& sampleRates = profile->getSampleRates();
+ auto configs = ConfigHelper::combineAudioConfig(
+ vector<audio_channel_mask_t>(channels.begin(), channels.end()),
+ vector<uint32_t>(sampleRates.begin(), sampleRates.end()),
+ profile->getFormat());
auto flags = ioProfile->getFlags();
for (auto& config : configs) {
// Some combinations of flags declared in the config file require special
@@ -125,9 +128,12 @@
getCachedPolicyConfig().getModuleFromName(std::get<PARAM_DEVICE_NAME>(device));
for (const auto& ioProfile : module->getInputProfiles()) {
for (const auto& profile : ioProfile->getAudioProfiles()) {
- auto configs = ConfigHelper::combineAudioConfig(profile->getChannels(),
- profile->getSampleRates(),
- profile->getFormat());
+ const auto& channels = profile->getChannels();
+ const auto& sampleRates = profile->getSampleRates();
+ auto configs = ConfigHelper::combineAudioConfig(
+ vector<audio_channel_mask_t>(channels.begin(), channels.end()),
+ vector<uint32_t>(sampleRates.begin(), sampleRates.end()),
+ profile->getFormat());
for (const auto& config : configs) {
result.emplace_back(device, config, AudioInputFlag(ioProfile->getFlags()));
}
diff --git a/audio/core/all-versions/vts/functional/ConfigHelper.h b/audio/core/all-versions/vts/functional/ConfigHelper.h
index 604c0c5..48aae8c 100644
--- a/audio/core/all-versions/vts/functional/ConfigHelper.h
+++ b/audio/core/all-versions/vts/functional/ConfigHelper.h
@@ -79,8 +79,8 @@
return {};
}
- static vector<AudioConfig> combineAudioConfig(android::ChannelMaskSet channelMasks,
- android::SampleRateSet sampleRates,
+ static vector<AudioConfig> combineAudioConfig(vector<audio_channel_mask_t> channelMasks,
+ vector<uint32_t> sampleRates,
audio_format_t format) {
vector<AudioConfig> configs;
configs.reserve(channelMasks.size() * sampleRates.size());