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

Commit 01cd1aed authored by Kevin Rocard's avatar Kevin Rocard Committed by android-build-merger
Browse files

Audio V4: Implement the shim effect 4.0 -> legacy

am: af7f78da

Change-Id: I7204bd68f56aac6eb1f99cb0584775a11698d399
parents ca74c143 af7f78da
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H
#define ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H

#include <android/hardware/audio/common/2.0/types.h>

namespace android {
namespace hardware {
namespace audio {
namespace common {
namespace V2_0 {
namespace implementation {

typedef common::V2_0::AudioDevice AudioDeviceBitfield;
typedef common::V2_0::AudioChannelMask AudioChannelBitfield;

}  // namespace implementation
}  // namespace V2_0
}  // namespace common
}  // namespace audio
}  // namespace hardware
}  // namespace android

#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H
+39 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H
#define ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H

#include <android/hardware/audio/4.0/types.h>

namespace android {
namespace hardware {
namespace audio {
namespace common {
namespace V4_0 {
namespace implementation {

typedef hidl_bitfield<common::V4_0::AudioDevice> AudioDeviceBitfield;
typedef hidl_bitfield<common::V4_0::AudioChannelMask> AudioChannelBitfield;

}  // namespace implementation
}  // namespace V4_0
}  // namespace common
}  // namespace audio
}  // namespace hardware
}  // namespace android

#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_VERSION_UTILS_H
+23 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#define LOG_TAG "AEC_Effect_HAL"

#include "AcousticEchoCancelerEffect.h"

#define AUDIO_HAL_VERSION V4_0
#include <effect/all-versions/default/AcousticEchoCancelerEffect.impl.h>
#undef AUDIO_HAL_VERSION
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V4_0_ACOUSTICECHOCANCELEREFFECT_H
#define ANDROID_HARDWARE_AUDIO_EFFECT_V4_0_ACOUSTICECHOCANCELEREFFECT_H

#include <android/hardware/audio/effect/4.0/IAcousticEchoCancelerEffect.h>

#include "Effect.h"

#define AUDIO_HAL_VERSION V4_0
#include <effect/all-versions/default/AcousticEchoCancelerEffect.h>
#undef AUDIO_HAL_VERSION

#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V4_0_ACOUSTICECHOCANCELEREFFECT_H
+50 −0
Original line number Diff line number Diff line
cc_library_shared {
    name: "android.hardware.audio.effect@4.0-impl",
    defaults: ["hidl_defaults"],
    vendor: true,
    relative_install_path: "hw",
    srcs: [
        "AcousticEchoCancelerEffect.cpp",
        "AudioBufferManager.cpp",
        "AutomaticGainControlEffect.cpp",
        "BassBoostEffect.cpp",
        "Conversions.cpp",
        "DownmixEffect.cpp",
        "Effect.cpp",
        "EffectsFactory.cpp",
        "EnvironmentalReverbEffect.cpp",
        "EqualizerEffect.cpp",
        "LoudnessEnhancerEffect.cpp",
        "NoiseSuppressionEffect.cpp",
        "PresetReverbEffect.cpp",
        "VirtualizerEffect.cpp",
        "VisualizerEffect.cpp",
    ],

    shared_libs: [
        "libbase",
        "libcutils",
        "libeffects",
        "libfmq",
        "libhidlbase",
        "libhidlmemory",
        "libhidltransport",
        "liblog",
        "libutils",
        "android.hardware.audio.common-util",
        "android.hardware.audio.common@4.0",
        "android.hardware.audio.common@4.0-util",
        "android.hardware.audio.effect@4.0",
        "android.hidl.memory@1.0",
    ],

    header_libs: [
        "android.hardware.audio.common.util@all-versions",
        "android.hardware.audio.effect@all-versions-impl",
        "libaudio_system_headers",
        "libaudioclient_headers",
        "libeffects_headers",
        "libhardware_headers",
        "libmedia_headers",
    ],
}
Loading