mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Spatializer: return supportedChannelLayout as part of parameter
Bug: 307368176 Test: atest EffectsFactoryHalInterfaceTest Change-Id: I1a2a445b5c94cbd02acb4160c7f54d6733bff6aa
This commit is contained in:
@@ -65,8 +65,6 @@ namespace aidl::android::hardware::audio::effect {
|
||||
const std::string SpatializerSw::kEffectName = "SpatializerSw";
|
||||
|
||||
const std::vector<Range::SpatializerRange> SpatializerSw::kRanges = {
|
||||
MAKE_RANGE(Spatializer, supportedChannelLayout, std::vector<AudioChannelLayout>{},
|
||||
std::vector<AudioChannelLayout>{}),
|
||||
MAKE_RANGE(Spatializer, spatializationLevel, Spatialization::Level::NONE,
|
||||
Spatialization::Level::BED_PLUS_OBJECTS),
|
||||
MAKE_RANGE(Spatializer, spatializationMode, Spatialization::Mode::BINAURAL,
|
||||
@@ -175,11 +173,19 @@ std::optional<Spatializer> SpatializerSwContext::getParam(TAG tag) {
|
||||
if (mParamsMap.find(tag) != mParamsMap.end()) {
|
||||
return mParamsMap.at(tag);
|
||||
}
|
||||
if (tag == Spatializer::supportedChannelLayout) {
|
||||
return Spatializer::make<Spatializer::supportedChannelLayout>(
|
||||
{AudioChannelLayout::make<AudioChannelLayout::layoutMask>(
|
||||
AudioChannelLayout::LAYOUT_5POINT1)});
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
template <typename TAG>
|
||||
ndk::ScopedAStatus SpatializerSwContext::setParam(TAG tag, Spatializer spatializer) {
|
||||
RETURN_IF(tag == Spatializer::supportedChannelLayout, EX_ILLEGAL_ARGUMENT,
|
||||
"supportedChannelLayoutGetOnly");
|
||||
|
||||
mParamsMap[tag] = spatializer;
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user