Skip to content

Commit

Permalink
Add audioloader
Browse files Browse the repository at this point in the history
Setting the l_effect_tdm_framework_enable=true parameter enables the quad speakers. However, the sound quality is unusable, probably because on stock it's configured by lib_SoundBooster_TDM_ver100.so which is missing here as I can't find a way to make it load on LineageOS.
  • Loading branch information
UDPSendToFailed committed Sep 1, 2022
1 parent f5c3bf4 commit 96560d1
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
19 changes: 19 additions & 0 deletions audioloader/Android.mk
@@ -0,0 +1,19 @@
# Copyright (C) 2018 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES:= audioloader.cpp

LOCAL_SHARED_LIBRARIES := \
libutils \
libaudioclient

LOCAL_MODULE:= audioloader
LOCAL_MODULE_TAGS:= optional

LOCAL_INIT_RC := audioloader.rc

include $(BUILD_EXECUTABLE)
12 changes: 12 additions & 0 deletions audioloader/audioloader.cpp
@@ -0,0 +1,12 @@
/*
* Copyright (C) 2018 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/

#include <media/AudioSystem.h>

int main(int, char**)
{
android::AudioSystem::setParameters(0, android::String8("l_effect_tdm_framework_enable=true"));
return 0;
}
8 changes: 8 additions & 0 deletions audioloader/audioloader.rc
@@ -0,0 +1,8 @@
service audioloader /system/bin/audioloader
user system
group audio
disabled
oneshot

on property:init.svc.audioserver=running
# start audioloader
3 changes: 2 additions & 1 deletion device.mk
Expand Up @@ -97,7 +97,8 @@ PRODUCT_PACKAGES += \
libqcomvisualizer \
libqcomvoiceprocessing \
libqcompostprocbundle \
tinymix
tinymix \
audioloader

# Audio features
PRODUCT_PACKAGES += \
Expand Down

0 comments on commit 96560d1

Please sign in to comment.