Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2023 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include <utility> |
| 18 | |
| 19 | #define LOG_TAG "AidlConversionEffect" |
| 20 | //#define LOG_NDEBUG 0 |
| 21 | #include <utils/Log.h> |
| 22 | |
| 23 | #include <media/AidlConversionCppNdk.h> |
| 24 | #include <media/AidlConversionEffect.h> |
| 25 | |
| 26 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 27 | // AIDL NDK backend to legacy audio data structure conversion utilities. |
| 28 | |
| 29 | namespace aidl { |
| 30 | namespace android { |
| 31 | |
| 32 | using ::aidl::android::hardware::audio::effect::AcousticEchoCanceler; |
| 33 | using ::aidl::android::hardware::audio::effect::AutomaticGainControl; |
| 34 | using ::aidl::android::hardware::audio::effect::BassBoost; |
| 35 | using ::aidl::android::hardware::audio::effect::Descriptor; |
| 36 | using ::aidl::android::hardware::audio::effect::Downmix; |
Shunkai Yao | dba8ba3 | 2023-01-27 17:02:21 +0000 | [diff] [blame^] | 37 | using ::aidl::android::hardware::audio::effect::DynamicsProcessing; |
Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 38 | using ::aidl::android::hardware::audio::effect::Flags; |
| 39 | using ::aidl::android::hardware::audio::effect::Parameter; |
| 40 | using ::aidl::android::media::audio::common::AudioDeviceDescription; |
| 41 | |
| 42 | using ::android::BAD_VALUE; |
| 43 | using ::android::base::unexpected; |
| 44 | |
| 45 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 46 | // Converters |
| 47 | |
| 48 | ConversionResult<uint32_t> aidl2legacy_Flags_Type_uint32(Flags::Type type) { |
| 49 | switch (type) { |
| 50 | case Flags::Type::INSERT: |
| 51 | return EFFECT_FLAG_TYPE_INSERT; |
| 52 | case Flags::Type::AUXILIARY: |
| 53 | return EFFECT_FLAG_TYPE_AUXILIARY; |
| 54 | case Flags::Type::REPLACE: |
| 55 | return EFFECT_FLAG_TYPE_REPLACE; |
| 56 | case Flags::Type::PRE_PROC: |
| 57 | return EFFECT_FLAG_TYPE_PRE_PROC; |
| 58 | case Flags::Type::POST_PROC: |
| 59 | return EFFECT_FLAG_TYPE_POST_PROC; |
| 60 | } |
| 61 | return unexpected(BAD_VALUE); |
| 62 | } |
| 63 | |
| 64 | ConversionResult<Flags::Type> legacy2aidl_uint32_Flags_Type(uint32_t legacy) { |
| 65 | switch (legacy & EFFECT_FLAG_TYPE_MASK) { |
| 66 | case EFFECT_FLAG_TYPE_INSERT: |
| 67 | return Flags::Type::INSERT; |
| 68 | case EFFECT_FLAG_TYPE_AUXILIARY: |
| 69 | return Flags::Type::AUXILIARY; |
| 70 | case EFFECT_FLAG_TYPE_REPLACE: |
| 71 | return Flags::Type::REPLACE; |
| 72 | case EFFECT_FLAG_TYPE_PRE_PROC: |
| 73 | return Flags::Type::PRE_PROC; |
| 74 | case EFFECT_FLAG_TYPE_POST_PROC: |
| 75 | return Flags::Type::POST_PROC; |
| 76 | } |
| 77 | return unexpected(BAD_VALUE); |
| 78 | } |
| 79 | |
| 80 | ConversionResult<uint32_t> aidl2legacy_Flags_Insert_uint32(Flags::Insert insert) { |
| 81 | switch (insert) { |
| 82 | case Flags::Insert::ANY: |
| 83 | return EFFECT_FLAG_INSERT_ANY; |
| 84 | case Flags::Insert::FIRST: |
| 85 | return EFFECT_FLAG_INSERT_FIRST; |
| 86 | case Flags::Insert::LAST: |
| 87 | return EFFECT_FLAG_INSERT_LAST; |
| 88 | case Flags::Insert::EXCLUSIVE: |
| 89 | return EFFECT_FLAG_INSERT_EXCLUSIVE; |
| 90 | } |
| 91 | return unexpected(BAD_VALUE); |
| 92 | } |
| 93 | |
| 94 | ConversionResult<Flags::Insert> legacy2aidl_uint32_Flags_Insert(uint32_t legacy) { |
| 95 | switch (legacy & EFFECT_FLAG_INSERT_MASK) { |
| 96 | case EFFECT_FLAG_INSERT_ANY: |
| 97 | return Flags::Insert::ANY; |
| 98 | case EFFECT_FLAG_INSERT_FIRST: |
| 99 | return Flags::Insert::FIRST; |
| 100 | case EFFECT_FLAG_INSERT_LAST: |
| 101 | return Flags::Insert::LAST; |
| 102 | case EFFECT_FLAG_INSERT_EXCLUSIVE: |
| 103 | return Flags::Insert::EXCLUSIVE; |
| 104 | } |
| 105 | return unexpected(BAD_VALUE); |
| 106 | } |
| 107 | |
| 108 | ConversionResult<uint32_t> aidl2legacy_Flags_Volume_uint32(Flags::Volume volume) { |
| 109 | switch (volume) { |
| 110 | case Flags::Volume::NONE: |
| 111 | return 0; |
| 112 | case Flags::Volume::CTRL: |
| 113 | return EFFECT_FLAG_VOLUME_CTRL; |
| 114 | case Flags::Volume::IND: |
| 115 | return EFFECT_FLAG_VOLUME_IND; |
| 116 | case Flags::Volume::MONITOR: |
| 117 | return EFFECT_FLAG_VOLUME_MONITOR; |
| 118 | } |
| 119 | return unexpected(BAD_VALUE); |
| 120 | } |
| 121 | |
| 122 | ConversionResult<Flags::Volume> legacy2aidl_uint32_Flags_Volume(uint32_t legacy) { |
| 123 | switch (legacy & EFFECT_FLAG_VOLUME_MASK) { |
| 124 | case EFFECT_FLAG_VOLUME_CTRL: |
| 125 | return Flags::Volume::CTRL; |
| 126 | case EFFECT_FLAG_VOLUME_IND: |
| 127 | return Flags::Volume::IND; |
| 128 | case EFFECT_FLAG_VOLUME_MONITOR: |
| 129 | return Flags::Volume::MONITOR; |
| 130 | case EFFECT_FLAG_VOLUME_NONE: |
| 131 | return Flags::Volume::NONE; |
| 132 | } |
| 133 | return unexpected(BAD_VALUE); |
| 134 | } |
| 135 | |
| 136 | ConversionResult<uint32_t> aidl2legacy_Flags_uint32(Flags aidl) { |
| 137 | uint32_t legacy = 0; |
| 138 | legacy |= VALUE_OR_RETURN(aidl2legacy_Flags_Type_uint32(aidl.type)); |
| 139 | legacy |= VALUE_OR_RETURN(aidl2legacy_Flags_Insert_uint32(aidl.insert)); |
| 140 | legacy |= VALUE_OR_RETURN(aidl2legacy_Flags_Volume_uint32(aidl.volume)); |
| 141 | legacy |= VALUE_OR_RETURN(aidl2legacy_Flags_HardwareAccelerator_uint32(aidl.hwAcceleratorMode)); |
| 142 | |
| 143 | if (aidl.offloadIndication) { |
| 144 | legacy |= EFFECT_FLAG_OFFLOAD_SUPPORTED; |
| 145 | } |
| 146 | if (aidl.deviceIndication) { |
| 147 | legacy |= EFFECT_FLAG_DEVICE_IND; |
| 148 | } |
| 149 | if (aidl.audioModeIndication) { |
| 150 | legacy |= EFFECT_FLAG_AUDIO_MODE_IND; |
| 151 | } |
| 152 | if (aidl.audioSourceIndication) { |
| 153 | legacy |= EFFECT_FLAG_AUDIO_SOURCE_IND; |
| 154 | } |
| 155 | if (aidl.noProcessing) { |
| 156 | legacy |= EFFECT_FLAG_NO_PROCESS; |
| 157 | } |
| 158 | return legacy; |
| 159 | } |
| 160 | |
| 161 | ConversionResult<Flags> legacy2aidl_uint32_Flags(uint32_t legacy) { |
| 162 | Flags aidl; |
| 163 | |
| 164 | aidl.type = VALUE_OR_RETURN(legacy2aidl_uint32_Flags_Type(legacy)); |
| 165 | aidl.insert = VALUE_OR_RETURN(legacy2aidl_uint32_Flags_Insert(legacy)); |
| 166 | aidl.volume = VALUE_OR_RETURN(legacy2aidl_uint32_Flags_Volume(legacy)); |
| 167 | aidl.hwAcceleratorMode = VALUE_OR_RETURN(legacy2aidl_uint32_Flags_HardwareAccelerator(legacy)); |
| 168 | aidl.offloadIndication = (legacy & EFFECT_FLAG_OFFLOAD_SUPPORTED); |
| 169 | aidl.deviceIndication = (legacy & EFFECT_FLAG_DEVICE_IND); |
| 170 | aidl.audioModeIndication = (legacy & EFFECT_FLAG_AUDIO_MODE_IND); |
| 171 | aidl.audioSourceIndication = (legacy & EFFECT_FLAG_AUDIO_SOURCE_IND); |
| 172 | aidl.noProcessing = (legacy & EFFECT_FLAG_NO_PROCESS); |
| 173 | return aidl; |
| 174 | } |
| 175 | |
| 176 | ConversionResult<uint32_t> aidl2legacy_Flags_HardwareAccelerator_uint32( |
| 177 | Flags::HardwareAccelerator hwAcceleratorMode) { |
| 178 | switch (hwAcceleratorMode) { |
| 179 | case Flags::HardwareAccelerator::NONE: |
| 180 | return 0; |
| 181 | case Flags::HardwareAccelerator::SIMPLE: |
| 182 | return EFFECT_FLAG_HW_ACC_SIMPLE; |
| 183 | case Flags::HardwareAccelerator::TUNNEL: |
| 184 | return EFFECT_FLAG_HW_ACC_TUNNEL; |
| 185 | } |
| 186 | return unexpected(BAD_VALUE); |
| 187 | } |
| 188 | |
| 189 | ConversionResult<Flags::HardwareAccelerator> legacy2aidl_uint32_Flags_HardwareAccelerator( |
| 190 | uint32_t legacy) { |
| 191 | switch (legacy & EFFECT_FLAG_HW_ACC_MASK) { |
| 192 | case EFFECT_FLAG_HW_ACC_SIMPLE: |
| 193 | return Flags::HardwareAccelerator::SIMPLE; |
| 194 | case EFFECT_FLAG_HW_ACC_TUNNEL: |
| 195 | return Flags::HardwareAccelerator::TUNNEL; |
| 196 | case 0: |
| 197 | return Flags::HardwareAccelerator::NONE; |
| 198 | } |
| 199 | return unexpected(BAD_VALUE); |
| 200 | } |
| 201 | |
| 202 | ConversionResult<effect_descriptor_t> |
| 203 | aidl2legacy_Descriptor_effect_descriptor(const Descriptor& aidl) { |
| 204 | effect_descriptor_t legacy; |
| 205 | legacy.type = VALUE_OR_RETURN(aidl2legacy_AudioUuid_audio_uuid_t(aidl.common.id.type)); |
| 206 | legacy.uuid = VALUE_OR_RETURN(aidl2legacy_AudioUuid_audio_uuid_t(aidl.common.id.uuid)); |
| 207 | // legacy descriptor doesn't have proxy information |
| 208 | // proxy = VALUE_OR_RETURN(aidl2legacy_AudioUuid_audio_uuid_t(aidl.proxy)); |
| 209 | legacy.apiVersion = EFFECT_CONTROL_API_VERSION; |
| 210 | legacy.flags = VALUE_OR_RETURN(aidl2legacy_Flags_uint32(aidl.common.flags)); |
| 211 | legacy.cpuLoad = VALUE_OR_RETURN(convertIntegral<uint16_t>(aidl.common.cpuLoad)); |
| 212 | legacy.memoryUsage = VALUE_OR_RETURN(convertIntegral<uint16_t>(aidl.common.memoryUsage)); |
| 213 | RETURN_IF_ERROR(aidl2legacy_string(aidl.common.name, legacy.name, sizeof(legacy.name))); |
| 214 | RETURN_IF_ERROR(aidl2legacy_string(aidl.common.implementor, legacy.implementor, |
| 215 | sizeof(legacy.implementor))); |
| 216 | return legacy; |
| 217 | } |
| 218 | |
| 219 | ConversionResult<Descriptor> |
| 220 | legacy2aidl_effect_descriptor_Descriptor(const effect_descriptor_t& legacy) { |
| 221 | Descriptor aidl; |
| 222 | aidl.common.id.type = VALUE_OR_RETURN(legacy2aidl_audio_uuid_t_AudioUuid(legacy.type)); |
| 223 | aidl.common.id.uuid = VALUE_OR_RETURN(legacy2aidl_audio_uuid_t_AudioUuid(legacy.uuid)); |
| 224 | // legacy descriptor doesn't have proxy information |
| 225 | // aidl.common.id.proxy |
| 226 | aidl.common.flags = VALUE_OR_RETURN(legacy2aidl_uint32_Flags(legacy.flags)); |
| 227 | aidl.common.cpuLoad = VALUE_OR_RETURN(convertIntegral<int32_t>(legacy.cpuLoad)); |
| 228 | aidl.common.memoryUsage = VALUE_OR_RETURN(convertIntegral<int32_t>(legacy.memoryUsage)); |
| 229 | aidl.common.name = VALUE_OR_RETURN(legacy2aidl_string(legacy.name, sizeof(legacy.name))); |
| 230 | aidl.common.implementor = |
| 231 | VALUE_OR_RETURN(legacy2aidl_string(legacy.implementor, sizeof(legacy.implementor))); |
| 232 | return aidl; |
| 233 | } |
| 234 | |
| 235 | ConversionResult<uint32_t> aidl2legacy_Parameter_aec_uint32_echoDelay(const Parameter& aidl) { |
Shunkai Yao | dba8ba3 | 2023-01-27 17:02:21 +0000 | [diff] [blame^] | 236 | int echoDelay = VALUE_OR_RETURN( |
| 237 | GET_PARAMETER_SPECIFIC_FIELD(aidl, AcousticEchoCanceler, acousticEchoCanceler, |
| 238 | AcousticEchoCanceler::echoDelayUs, int)); |
Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 239 | return VALUE_OR_RETURN(convertReinterpret<uint32_t>(echoDelay)); |
| 240 | } |
| 241 | |
| 242 | ConversionResult<Parameter> legacy2aidl_uint32_echoDelay_Parameter_aec(uint32_t legacy) { |
| 243 | int delay = VALUE_OR_RETURN(convertReinterpret<int32_t>(legacy)); |
| 244 | return MAKE_SPECIFIC_PARAMETER(AcousticEchoCanceler, acousticEchoCanceler, echoDelayUs, delay); |
| 245 | } |
| 246 | |
| 247 | ConversionResult<uint32_t> aidl2legacy_Parameter_aec_uint32_mobileMode(const Parameter& aidl) { |
Shunkai Yao | dba8ba3 | 2023-01-27 17:02:21 +0000 | [diff] [blame^] | 248 | bool mobileMode = VALUE_OR_RETURN( |
| 249 | GET_PARAMETER_SPECIFIC_FIELD(aidl, AcousticEchoCanceler, acousticEchoCanceler, |
| 250 | AcousticEchoCanceler::mobileMode, bool)); |
Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 251 | return VALUE_OR_RETURN(convertIntegral<uint32_t>(mobileMode)); |
| 252 | } |
| 253 | |
| 254 | ConversionResult<Parameter> legacy2aidl_uint32_mobileMode_Parameter_aec(uint32_t legacy) { |
| 255 | bool mode = VALUE_OR_RETURN(convertIntegral<bool>(legacy)); |
| 256 | return MAKE_SPECIFIC_PARAMETER(AcousticEchoCanceler, acousticEchoCanceler, mobileMode, mode); |
| 257 | } |
| 258 | |
| 259 | ConversionResult<uint32_t> aidl2legacy_Parameter_agc_uint32_fixedDigitalGain( |
| 260 | const Parameter& aidl) { |
Shunkai Yao | dba8ba3 | 2023-01-27 17:02:21 +0000 | [diff] [blame^] | 261 | int gain = VALUE_OR_RETURN( |
| 262 | GET_PARAMETER_SPECIFIC_FIELD(aidl, AutomaticGainControl, automaticGainControl, |
| 263 | AutomaticGainControl::fixedDigitalGainMb, int)); |
Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 264 | return VALUE_OR_RETURN(convertReinterpret<uint32_t>(gain)); |
| 265 | } |
| 266 | |
| 267 | ConversionResult<Parameter> legacy2aidl_uint32_fixedDigitalGain_Parameter_agc(uint32_t legacy) { |
| 268 | int gain = VALUE_OR_RETURN(convertReinterpret<int>(legacy)); |
| 269 | return MAKE_SPECIFIC_PARAMETER(AutomaticGainControl, automaticGainControl, fixedDigitalGainMb, |
| 270 | gain); |
| 271 | } |
| 272 | |
| 273 | ConversionResult<uint32_t> aidl2legacy_Parameter_agc_uint32_levelEstimator( |
| 274 | const Parameter& aidl) { |
Shunkai Yao | dba8ba3 | 2023-01-27 17:02:21 +0000 | [diff] [blame^] | 275 | const auto& le = VALUE_OR_RETURN(GET_PARAMETER_SPECIFIC_FIELD( |
| 276 | aidl, AutomaticGainControl, automaticGainControl, AutomaticGainControl::levelEstimator, |
| 277 | AutomaticGainControl::LevelEstimator)); |
Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 278 | return static_cast<uint32_t>(le); |
| 279 | } |
| 280 | |
| 281 | ConversionResult<Parameter> legacy2aidl_uint32_levelEstimator_Parameter_agc(uint32_t legacy) { |
| 282 | if (legacy > (uint32_t) AutomaticGainControl::LevelEstimator::PEAK) { |
| 283 | return unexpected(BAD_VALUE); |
| 284 | } |
| 285 | AutomaticGainControl::LevelEstimator le = |
| 286 | static_cast<AutomaticGainControl::LevelEstimator>(legacy); |
| 287 | return MAKE_SPECIFIC_PARAMETER(AutomaticGainControl, automaticGainControl, levelEstimator, le); |
| 288 | } |
| 289 | |
| 290 | ConversionResult<uint32_t> aidl2legacy_Parameter_agc_uint32_saturationMargin( |
| 291 | const Parameter& aidl) { |
Shunkai Yao | dba8ba3 | 2023-01-27 17:02:21 +0000 | [diff] [blame^] | 292 | int saturationMargin = VALUE_OR_RETURN( |
| 293 | GET_PARAMETER_SPECIFIC_FIELD(aidl, AutomaticGainControl, automaticGainControl, |
| 294 | AutomaticGainControl::saturationMarginMb, int)); |
Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 295 | return VALUE_OR_RETURN(convertIntegral<uint32_t>(saturationMargin)); |
| 296 | } |
| 297 | |
| 298 | ConversionResult<Parameter> legacy2aidl_uint32_saturationMargin_Parameter_agc(uint32_t legacy) { |
| 299 | int saturationMargin = VALUE_OR_RETURN(convertIntegral<int>(legacy)); |
| 300 | return MAKE_SPECIFIC_PARAMETER(AutomaticGainControl, automaticGainControl, saturationMarginMb, |
| 301 | saturationMargin); |
| 302 | } |
| 303 | |
| 304 | ConversionResult<uint16_t> aidl2legacy_Parameter_BassBoost_uint16_strengthPm( |
| 305 | const Parameter& aidl) { |
| 306 | int strength = VALUE_OR_RETURN( |
Shunkai Yao | dba8ba3 | 2023-01-27 17:02:21 +0000 | [diff] [blame^] | 307 | GET_PARAMETER_SPECIFIC_FIELD(aidl, BassBoost, bassBoost, BassBoost::strengthPm, int)); |
Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 308 | return VALUE_OR_RETURN(convertIntegral<uint16_t>(strength)); |
| 309 | } |
| 310 | |
| 311 | ConversionResult<Parameter> legacy2aidl_uint16_strengthPm_Parameter_BassBoost(uint16_t legacy) { |
| 312 | int strength = VALUE_OR_RETURN(convertIntegral<int>(legacy)); |
| 313 | return MAKE_SPECIFIC_PARAMETER(BassBoost, bassBoost, strengthPm, strength); |
| 314 | } |
| 315 | |
| 316 | ConversionResult<int16_t> aidl2legacy_Parameter_Downmix_int16_type(const Parameter& aidl) { |
| 317 | Downmix::Type aidlType = VALUE_OR_RETURN( |
Shunkai Yao | dba8ba3 | 2023-01-27 17:02:21 +0000 | [diff] [blame^] | 318 | GET_PARAMETER_SPECIFIC_FIELD(aidl, Downmix, downmix, Downmix::type, Downmix::Type)); |
Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 319 | return VALUE_OR_RETURN(convertIntegral<int16_t>(static_cast<uint32_t>(aidlType))); |
| 320 | } |
| 321 | |
| 322 | ConversionResult<Parameter> legacy2aidl_int16_type_Parameter_Downmix(int16_t legacy) { |
| 323 | if (legacy > (uint32_t) Downmix::Type::FOLD) { |
| 324 | return unexpected(BAD_VALUE); |
| 325 | } |
| 326 | Downmix::Type aidlType = static_cast<Downmix::Type>(legacy); |
| 327 | return MAKE_SPECIFIC_PARAMETER(Downmix, downmix, type, aidlType); |
| 328 | } |
| 329 | |
Shunkai Yao | dba8ba3 | 2023-01-27 17:02:21 +0000 | [diff] [blame^] | 330 | ConversionResult<int16_t> aidl2legacy_DynamicsProcessing_ResolutionPreference_uint32_( |
| 331 | const Parameter& aidl) { |
| 332 | Downmix::Type aidlType = VALUE_OR_RETURN( |
| 333 | GET_PARAMETER_SPECIFIC_FIELD(aidl, Downmix, downmix, Downmix::type, Downmix::Type)); |
| 334 | return VALUE_OR_RETURN(convertIntegral<int16_t>(static_cast<uint32_t>(aidlType))); |
| 335 | } |
| 336 | |
| 337 | ConversionResult<DynamicsProcessing::ResolutionPreference> |
| 338 | legacy2aidl_int32_DynamicsProcessing_ResolutionPreference(int32_t legacy) { |
| 339 | if (legacy > (int32_t)DynamicsProcessing::ResolutionPreference::FAVOR_TIME_RESOLUTION) { |
| 340 | return unexpected(BAD_VALUE); |
| 341 | } |
| 342 | return static_cast<DynamicsProcessing::ResolutionPreference>(legacy); |
| 343 | } |
| 344 | |
| 345 | ConversionResult<int32_t> aidl2legacy_DynamicsProcessing_ResolutionPreference_int32( |
| 346 | DynamicsProcessing::ResolutionPreference aidl) { |
| 347 | return static_cast<int32_t>(aidl); |
| 348 | } |
| 349 | |
| 350 | |
Shunkai Yao | a03533e | 2023-01-25 06:38:10 +0000 | [diff] [blame] | 351 | } // namespace android |
| 352 | } // aidl |