From f6ca203252a51724420b314383e0d1c1702762fd Mon Sep 17 00:00:00 2001 From: SamarV-121 Date: Sat, 24 Sep 2022 16:04:25 +0100 Subject: [PATCH] LG8n: Build and rename audio service HAL [Woomymy]: Make it 64 bits for yunluo Change-Id: Ia55929f56d2aef62dcea28487584c3c0afb7dab1 Signed-off-by: SamarV-121 Signed-off-by: Shirayuki39 --- audio/Android.mk | 36 +++++++++++++++++++ ...android.hardware.audio.service.mediatek.rc | 13 +++++++ device.mk | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 audio/Android.mk create mode 100644 audio/android.hardware.audio.service.mediatek.rc diff --git a/audio/Android.mk b/audio/Android.mk new file mode 100644 index 0000000..84c9b65 --- /dev/null +++ b/audio/Android.mk @@ -0,0 +1,36 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE := android.hardware.audio.service.mediatek.rc +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := ETC +LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init +LOCAL_SRC_FILES := $(LOCAL_MODULE) +include $(BUILD_PREBUILT) + +LOCAL_PATH := hardware/interfaces/audio/common/all-versions/default/service + +include $(CLEAR_VARS) +LOCAL_MODULE := android.hardware.audio.service.mediatek +LOCAL_REQUIRED_MODULES := android.hardware.audio.service.mediatek.rc +LOCAL_MODULE_RELATIVE_PATH := hw +LOCAL_VENDOR_MODULE := true +LOCAL_MULTILIB := 64 + +LOCAL_SRC_FILES := \ + service.cpp + +LOCAL_CFLAGS := \ + -Wall \ + -Wextra \ + -Werror + +LOCAL_SHARED_LIBRARIES := \ + libcutils \ + libbinder \ + libhidlbase \ + liblog \ + libutils \ + libhardware + +include $(BUILD_EXECUTABLE) diff --git a/audio/android.hardware.audio.service.mediatek.rc b/audio/android.hardware.audio.service.mediatek.rc new file mode 100644 index 0000000..9054b40 --- /dev/null +++ b/audio/android.hardware.audio.service.mediatek.rc @@ -0,0 +1,13 @@ +on post-fs-data + mkdir /data/vendor/audiohal 0771 system audio + mkdir /data/vendor/audiohal/audio_param 0771 system audio + +service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service.mediatek + class hal + user audioserver + # media gid needed for /dev/fm (radio) and for /data/misc/media (tee) + group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock context_hub system sdcard_rw + capabilities BLOCK_SUSPEND SYS_NICE + ioprio rt 4 + task_profiles ProcessCapacityHigh HighPerformance + onrestart restart audioserver diff --git a/device.mk b/device.mk index 0581f1a..18a4857 100644 --- a/device.mk +++ b/device.mk @@ -49,7 +49,7 @@ PRODUCT_AAPT_PREF_CONFIG := xxhdpi # Audio PRODUCT_PACKAGES += \ - android.hardware.audio.service \ + android.hardware.audio.service.mediatek \ android.hardware.audio.effect@7.0-impl \ android.hardware.audio@7.0-impl \ android.hardware.soundtrigger@2.3-impl