Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efb45b26 authored by Shunkai Yao's avatar Shunkai Yao Committed by Gerrit Code Review
Browse files

Merge "AIDL effect vts test cases refinement"

parents 77b9374f 812d5b4c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ cc_defaults {
    name: "aidlaudioeffectservice_defaults",
    defaults: [
        "latest_android_media_audio_common_types_ndk_shared",
        "latest_android_hardware_audio_effect_ndk_shared",
    ],
    vendor: true,
    shared_libs: [
@@ -78,7 +79,6 @@ cc_defaults {
        "libutils",
        "android.hardware.common-V2-ndk",
        "android.hardware.common.fmq-V1-ndk",
        "android.hardware.audio.effect-V1-ndk",
    ],
    header_libs: [
        "libaudioaidl_headers",
@@ -111,10 +111,11 @@ cc_binary {
        "libbassboostsw",
        "libbundleaidl",
        "libdynamicsprocessingsw",
        "libenvreverbsw",
        "libequalizersw",
        "libhapticgeneratorsw",
        "libloudnessenhancersw",
        "libreverbsw",
        "libpresetreverbsw",
        "libtinyxml2",
        "libvirtualizersw",
        "libvisualizersw",
+5 −3
Original line number Diff line number Diff line
@@ -34,7 +34,8 @@
        <library name="equalizersw" path="libequalizersw.so"/>
        <library name="haptic_generatorsw" path="libhapticgeneratorsw.so"/>
        <library name="loudness_enhancersw" path="libloudnessenhancersw.so"/>
        <library name="reverbsw" path="libreverbsw.so"/>
        <library name="env_reverbsw" path="libenvreverbsw.so"/>
        <library name="preset_reverbsw" path="libpresetreverbsw.so"/>
        <library name="virtualizersw" path="libvirtualizersw.so"/>
        <library name="visualizersw" path="libvisualizersw.so"/>
        <library name="volumesw" path="libvolumesw.so"/>
@@ -64,11 +65,12 @@
        <effect name="dynamics_processing" library="dynamics_processingsw" uuid="fa818d78-588b-11ed-9b6a-0242ac120002"/>
        <effect name="haptic_generator" library="haptic_generatorsw" uuid="fa819110-588b-11ed-9b6a-0242ac120002"/>
        <effect name="loudness_enhancer" library="loudness_enhancersw" uuid="fa819610-588b-11ed-9b6a-0242ac120002"/>
        <effect name="reverb" library="reverbsw" uuid="fa8199c6-588b-11ed-9b6a-0242ac120002"/>
        <effect name="env_reverb" library="env_reverbsw" uuid="fa819886-588b-11ed-9b6a-0242ac120002"/>
        <effect name="preset_reverb" library="preset_reverbsw" uuid="fa8199c6-588b-11ed-9b6a-0242ac120002"/>
        <effect name="virtualizer" library="virtualizersw" uuid="fa819d86-588b-11ed-9b6a-0242ac120002"/>
        <effect name="visualizer" library="visualizersw" uuid="fa81a0f6-588b-11ed-9b6a-0242ac120002"/>
        <effect name="volume" library="volumesw" uuid="fa81a718-588b-11ed-9b6a-0242ac120002"/>
        <effectProxy name="equalizer" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
        <effectProxy name="equalizer" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b">
            <libsw library="equalizersw" uuid="0bed4300-847d-11df-bb17-0002a5d5c51b"/>
            <libsw library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/>
        </effectProxy>
+2 −2
Original line number Diff line number Diff line
@@ -26,14 +26,14 @@
#include "BassBoostSw.h"

using aidl::android::hardware::audio::effect::BassBoostSw;
using aidl::android::hardware::audio::effect::BassBoostSwImplUUID;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::kBassBoostSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;

extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
                                           std::shared_ptr<IEffect>* instanceSpp) {
    if (!in_impl_uuid || *in_impl_uuid != BassBoostSwImplUUID) {
    if (!in_impl_uuid || *in_impl_uuid != kBassBoostSwImplUUID) {
        LOG(ERROR) << __func__ << "uuid not supported";
        return EX_ILLEGAL_ARGUMENT;
    }
+5 −4
Original line number Diff line number Diff line
@@ -39,8 +39,8 @@ class BassBoostSw final : public EffectImpl {
  public:
    BassBoostSw() { LOG(DEBUG) << __func__; }
    ~BassBoostSw() {
        cleanUp();
        LOG(DEBUG) << __func__;
        releaseContext();
    }

    ndk::ScopedAStatus getDescriptor(Descriptor* _aidl_return) override;
@@ -57,13 +57,14 @@ class BassBoostSw final : public EffectImpl {
    const BassBoost::Capability kCapability;
    /* Effect descriptor */
    const Descriptor kDescriptor = {
            .common = {.id = {.type = BassBoostTypeUUID,
                              .uuid = BassBoostSwImplUUID,
            .common = {.id = {.type = kBassBoostTypeUUID,
                              .uuid = kBassBoostSwImplUUID,
                              .proxy = std::nullopt},
                       .flags = {.type = Flags::Type::INSERT,
                                 .insert = Flags::Insert::FIRST,
                                 .volume = Flags::Volume::CTRL},
                       .name = "BassBoostSw"},
                       .name = "BassBoostSw",
                       .implementor = "The Android Open Source Project"},
            .capability = Capability::make<Capability::bassBoost>(kCapability)};

    /* parameters */
+2 −2
Original line number Diff line number Diff line
@@ -26,14 +26,14 @@
#include "DynamicsProcessingSw.h"

using aidl::android::hardware::audio::effect::DynamicsProcessingSw;
using aidl::android::hardware::audio::effect::DynamicsProcessingSwImplUUID;
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::hardware::audio::effect::kDynamicsProcessingSwImplUUID;
using aidl::android::hardware::audio::effect::State;
using aidl::android::media::audio::common::AudioUuid;

extern "C" binder_exception_t createEffect(const AudioUuid* in_impl_uuid,
                                           std::shared_ptr<IEffect>* instanceSpp) {
    if (!in_impl_uuid || *in_impl_uuid != DynamicsProcessingSwImplUUID) {
    if (!in_impl_uuid || *in_impl_uuid != kDynamicsProcessingSwImplUUID) {
        LOG(ERROR) << __func__ << "uuid not supported";
        return EX_ILLEGAL_ARGUMENT;
    }
Loading