Add custom audio amplifier for TFA amp feedback
* Based on observing reverse engineering from davinci stock audio HAL. * Fixes speaker distortion on high volume. * Same logic with Smosia, rewritten by me. Co-authored-by: Smosia <stasenko_nv@nrcki.ru> Change-Id: I369555a9fcb06065177636b436d2e006c7a0b07d
This commit is contained in:
58
audio_amplifier/Android.mk
Normal file
58
audio_amplifier/Android.mk
Normal file
@@ -0,0 +1,58 @@
|
||||
#
|
||||
# Copyright 2020 The LineageOS 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER)),true)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libbase \
|
||||
liblog \
|
||||
libcutils \
|
||||
libtinyalsa \
|
||||
libtinycompress \
|
||||
libaudioroute \
|
||||
libdl \
|
||||
libaudioutils \
|
||||
libhwbinder \
|
||||
libhidlbase \
|
||||
libprocessgroup \
|
||||
libutils \
|
||||
audio.primary.$(TARGET_BOARD_PLATFORM)
|
||||
|
||||
LOCAL_C_INCLUDES += \
|
||||
external/tinyalsa/include \
|
||||
external/tinycompress/include \
|
||||
hardware/libhardware/include \
|
||||
system/media/audio_utils/include \
|
||||
$(call include-path-for, audio-effects) \
|
||||
$(call include-path-for, audio-route) \
|
||||
$(call project-path-for,qcom-audio)/hal \
|
||||
$(call project-path-for,qcom-audio)/hal/msm8974 \
|
||||
$(call project-path-for,qcom-audio)/hal/audio_extn \
|
||||
$(call project-path-for,qcom-audio)/hal/voice_extn
|
||||
|
||||
LOCAL_HEADER_LIBRARIES := generated_kernel_headers
|
||||
LOCAL_SRC_FILES := audio_amplifier.c
|
||||
LOCAL_MODULE := audio_amplifier.$(TARGET_BOARD_PLATFORM)
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_VENDOR_MODULE := true
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
endif
|
||||
Reference in New Issue
Block a user