Loading audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/EnvironmentalReverb.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ union EnvironmentalReverb { int roomHfLevelMb; int decayTimeMs; int decayHfRatioPm; int reflectionsLevelMb; int reflectionsDelayMs; int levelMb; int delayMs; int diffusionPm; Loading audio/aidl/android/hardware/audio/effect/EnvironmentalReverb.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,14 @@ union EnvironmentalReverb { * HF decay ratio in permilles. */ int decayHfRatioPm; /** * Reverb reflections level in millibels. */ int reflectionsLevelMb; /** * Reverb reflections delay in milliseconds. */ int reflectionsDelayMs; /** * Reverb level in millibels. */ Loading audio/aidl/default/envReverb/EnvReverbSw.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,8 @@ const std::vector<Range::EnvironmentalReverbRange> EnvReverbSw::kRanges = { MAKE_RANGE(EnvironmentalReverb, roomHfLevelMb, -4000, 0), MAKE_RANGE(EnvironmentalReverb, decayTimeMs, 0, 7000), MAKE_RANGE(EnvironmentalReverb, decayHfRatioPm, 100, 2000), MAKE_RANGE(EnvironmentalReverb, reflectionsLevelMb, -6000, 0), MAKE_RANGE(EnvironmentalReverb, reflectionsDelayMs, 0, 65), MAKE_RANGE(EnvironmentalReverb, levelMb, -6000, 0), MAKE_RANGE(EnvironmentalReverb, delayMs, 0, 65), MAKE_RANGE(EnvironmentalReverb, diffusionPm, 0, 1000), Loading Loading @@ -125,6 +127,20 @@ ndk::ScopedAStatus EnvReverbSw::setParameterSpecific(const Parameter::Specific& EX_ILLEGAL_ARGUMENT, "setDecayHfRatioFailed"); return ndk::ScopedAStatus::ok(); } case EnvironmentalReverb::reflectionsLevelMb: { RETURN_IF(mContext->setErReflectionsLevel( erParam.get<EnvironmentalReverb::reflectionsLevelMb>()) != RetCode::SUCCESS, EX_ILLEGAL_ARGUMENT, "setReflectionsLevelFailed"); return ndk::ScopedAStatus::ok(); } case EnvironmentalReverb::reflectionsDelayMs: { RETURN_IF(mContext->setErReflectionsDelay( erParam.get<EnvironmentalReverb::reflectionsDelayMs>()) != RetCode::SUCCESS, EX_ILLEGAL_ARGUMENT, "setReflectionsDelayFailed"); return ndk::ScopedAStatus::ok(); } case EnvironmentalReverb::levelMb: { RETURN_IF(mContext->setErLevel(erParam.get<EnvironmentalReverb::levelMb>()) != RetCode::SUCCESS, Loading Loading @@ -201,6 +217,14 @@ ndk::ScopedAStatus EnvReverbSw::getParameterEnvironmentalReverb(const Environmen erParam.set<EnvironmentalReverb::decayHfRatioPm>(mContext->getErDecayHfRatio()); break; } case EnvironmentalReverb::reflectionsLevelMb: { erParam.set<EnvironmentalReverb::reflectionsLevelMb>(mContext->getErReflectionsLevel()); break; } case EnvironmentalReverb::reflectionsDelayMs: { erParam.set<EnvironmentalReverb::reflectionsDelayMs>(mContext->getErReflectionsDelay()); break; } case EnvironmentalReverb::levelMb: { erParam.set<EnvironmentalReverb::levelMb>(mContext->getErLevel()); break; Loading audio/aidl/default/envReverb/EnvReverbSw.h +14 −1 Original line number Diff line number Diff line Loading @@ -58,12 +58,23 @@ class EnvReverbSwContext final : public EffectContext { int getErDensity() const { return mDensity; } RetCode setErBypass(bool bypass) { // TODO : Add implementation to apply new bypass mBypass = bypass; return RetCode::SUCCESS; } bool getErBypass() const { return mBypass; } RetCode setErReflectionsDelay(int delay) { mReflectionsDelayMs = delay; return RetCode::SUCCESS; } bool getErReflectionsDelay() const { return mReflectionsDelayMs; } RetCode setErReflectionsLevel(int level) { mReflectionsLevelMb = level; return RetCode::SUCCESS; } bool getErReflectionsLevel() const { return mReflectionsLevelMb; } private: int mRoomLevel = -6000; // Default room level int mRoomHfLevel = 0; // Default room hf level Loading @@ -71,6 +82,8 @@ class EnvReverbSwContext final : public EffectContext { int mDecayHfRatio = 500; // Default decay hf ratio int mLevel = -6000; // Default level int mDelay = 40; // Default delay int mReflectionsLevelMb = 0; int mReflectionsDelayMs = 0; int mDiffusion = 1000; // Default diffusion int mDensity = 1000; // Default density bool mBypass = false; // Default bypass Loading audio/aidl/default/include/effect-impl/EffectUUID.h +6 −6 Original line number Diff line number Diff line Loading @@ -273,12 +273,12 @@ static const AudioUuid kVirtualizerProxyUUID = {static_cast<int32_t>(0xd3467faa) 0x4d34, 0xacaf, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}}; // fa819f3e-588b-11ed-9b6a-0242ac120002 static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xfa819f3e), 0x588b, 0x11ed, 0x9b6a, {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}}; // e46b26a0-dddd-11db-8afd-0002a5d5c51b static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xe46b26a0), 0xdddd, 0x11db, 0x8afd, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}}; // fa81a0f6-588b-11ed-9b6a-0242ac120002 static const AudioUuid kVisualizerSwImplUUID = {static_cast<int32_t>(0xfa81a0f6), 0x588b, Loading Loading
audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/EnvironmentalReverb.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ union EnvironmentalReverb { int roomHfLevelMb; int decayTimeMs; int decayHfRatioPm; int reflectionsLevelMb; int reflectionsDelayMs; int levelMb; int delayMs; int diffusionPm; Loading
audio/aidl/android/hardware/audio/effect/EnvironmentalReverb.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,14 @@ union EnvironmentalReverb { * HF decay ratio in permilles. */ int decayHfRatioPm; /** * Reverb reflections level in millibels. */ int reflectionsLevelMb; /** * Reverb reflections delay in milliseconds. */ int reflectionsDelayMs; /** * Reverb level in millibels. */ Loading
audio/aidl/default/envReverb/EnvReverbSw.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,8 @@ const std::vector<Range::EnvironmentalReverbRange> EnvReverbSw::kRanges = { MAKE_RANGE(EnvironmentalReverb, roomHfLevelMb, -4000, 0), MAKE_RANGE(EnvironmentalReverb, decayTimeMs, 0, 7000), MAKE_RANGE(EnvironmentalReverb, decayHfRatioPm, 100, 2000), MAKE_RANGE(EnvironmentalReverb, reflectionsLevelMb, -6000, 0), MAKE_RANGE(EnvironmentalReverb, reflectionsDelayMs, 0, 65), MAKE_RANGE(EnvironmentalReverb, levelMb, -6000, 0), MAKE_RANGE(EnvironmentalReverb, delayMs, 0, 65), MAKE_RANGE(EnvironmentalReverb, diffusionPm, 0, 1000), Loading Loading @@ -125,6 +127,20 @@ ndk::ScopedAStatus EnvReverbSw::setParameterSpecific(const Parameter::Specific& EX_ILLEGAL_ARGUMENT, "setDecayHfRatioFailed"); return ndk::ScopedAStatus::ok(); } case EnvironmentalReverb::reflectionsLevelMb: { RETURN_IF(mContext->setErReflectionsLevel( erParam.get<EnvironmentalReverb::reflectionsLevelMb>()) != RetCode::SUCCESS, EX_ILLEGAL_ARGUMENT, "setReflectionsLevelFailed"); return ndk::ScopedAStatus::ok(); } case EnvironmentalReverb::reflectionsDelayMs: { RETURN_IF(mContext->setErReflectionsDelay( erParam.get<EnvironmentalReverb::reflectionsDelayMs>()) != RetCode::SUCCESS, EX_ILLEGAL_ARGUMENT, "setReflectionsDelayFailed"); return ndk::ScopedAStatus::ok(); } case EnvironmentalReverb::levelMb: { RETURN_IF(mContext->setErLevel(erParam.get<EnvironmentalReverb::levelMb>()) != RetCode::SUCCESS, Loading Loading @@ -201,6 +217,14 @@ ndk::ScopedAStatus EnvReverbSw::getParameterEnvironmentalReverb(const Environmen erParam.set<EnvironmentalReverb::decayHfRatioPm>(mContext->getErDecayHfRatio()); break; } case EnvironmentalReverb::reflectionsLevelMb: { erParam.set<EnvironmentalReverb::reflectionsLevelMb>(mContext->getErReflectionsLevel()); break; } case EnvironmentalReverb::reflectionsDelayMs: { erParam.set<EnvironmentalReverb::reflectionsDelayMs>(mContext->getErReflectionsDelay()); break; } case EnvironmentalReverb::levelMb: { erParam.set<EnvironmentalReverb::levelMb>(mContext->getErLevel()); break; Loading
audio/aidl/default/envReverb/EnvReverbSw.h +14 −1 Original line number Diff line number Diff line Loading @@ -58,12 +58,23 @@ class EnvReverbSwContext final : public EffectContext { int getErDensity() const { return mDensity; } RetCode setErBypass(bool bypass) { // TODO : Add implementation to apply new bypass mBypass = bypass; return RetCode::SUCCESS; } bool getErBypass() const { return mBypass; } RetCode setErReflectionsDelay(int delay) { mReflectionsDelayMs = delay; return RetCode::SUCCESS; } bool getErReflectionsDelay() const { return mReflectionsDelayMs; } RetCode setErReflectionsLevel(int level) { mReflectionsLevelMb = level; return RetCode::SUCCESS; } bool getErReflectionsLevel() const { return mReflectionsLevelMb; } private: int mRoomLevel = -6000; // Default room level int mRoomHfLevel = 0; // Default room hf level Loading @@ -71,6 +82,8 @@ class EnvReverbSwContext final : public EffectContext { int mDecayHfRatio = 500; // Default decay hf ratio int mLevel = -6000; // Default level int mDelay = 40; // Default delay int mReflectionsLevelMb = 0; int mReflectionsDelayMs = 0; int mDiffusion = 1000; // Default diffusion int mDensity = 1000; // Default density bool mBypass = false; // Default bypass Loading
audio/aidl/default/include/effect-impl/EffectUUID.h +6 −6 Original line number Diff line number Diff line Loading @@ -273,12 +273,12 @@ static const AudioUuid kVirtualizerProxyUUID = {static_cast<int32_t>(0xd3467faa) 0x4d34, 0xacaf, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}}; // fa819f3e-588b-11ed-9b6a-0242ac120002 static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xfa819f3e), 0x588b, 0x11ed, 0x9b6a, {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}}; // e46b26a0-dddd-11db-8afd-0002a5d5c51b static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xe46b26a0), 0xdddd, 0x11db, 0x8afd, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}}; // fa81a0f6-588b-11ed-9b6a-0242ac120002 static const AudioUuid kVisualizerSwImplUUID = {static_cast<int32_t>(0xfa81a0f6), 0x588b, Loading