Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,082 changes: 789 additions & 293 deletions Android.bp

Large diffs are not rendered by default.

57 changes: 32 additions & 25 deletions dolby.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,26 @@ BOARD_VENDOR_SEPOLICY_DIRS += $(DOLBY_PATH)/sepolicy/vendor

# HIDL
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += $(DOLBY_PATH)/dolby_framework_matrix.xml
DEVICE_MANIFEST_FILE += $(DOLBY_PATH)/vendor.dolby.hardware.dms@2.0-service.xml
DEVICE_MANIFEST_FILE += $(DOLBY_PATH)/vendor.dolby.media.c2.xml


PRODUCT_PACKAGES += \
vendor.dolby.hardware.dms@2.0-service.xml \
vendor.dolby.media.c2.xml

# Configs
PRODUCT_COPY_FILES += \
$(DOLBY_PATH)/configs/dax-default.xml:$(TARGET_COPY_OUT_VENDOR)/etc/dolby/dax-default.xml \
$(DOLBY_PATH)/configs/media_codecs_dolby_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_dolby_audio.xml
$(DOLBY_PATH)/proprietary/vendor/etc/media_codecs_dolby_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_dolby_audio.xml

PRODUCT_COPY_FILES += \
$(DOLBY_PATH)/proprietary/vendor/etc/dolby/dax-default-spatializer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/dax-default-spatializer.xml \
$(DOLBY_PATH)/proprietary/vendor/etc/dolby/dax-default.xml:$(TARGET_COPY_OUT_VENDOR)/etc/dolby/dax-default.xml \
$(DOLBY_PATH)/proprietary/vendor/etc/dolby/dax-moto_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/dolby/dax-moto_1.xml \
$(DOLBY_PATH)/proprietary/vendor/etc/dolby/dax-moto_2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/dolby/dax-moto_2.xml \
$(DOLBY_PATH)/proprietary/vendor/etc/dolby/dax-moto_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/dolby/dax-moto_3.xml

# Dolby VNDK libs
PRODUCT_PACKAGES += \
libstagefright_foundation-v33

PRODUCT_PACKAGES += \
libshim_dolby

# Init
PRODUCT_PACKAGES += \
init.dolby.rc
Expand All @@ -54,7 +59,7 @@ PRODUCT_PACKAGES += \

# Spatial Audio
PRODUCT_COPY_FILES += \
$(DOLBY_PATH)/configs/android.hardware.sensor.dynamic.head_tracker.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.dynamic.head_tracker.xml \
$(DOLBY_PATH)/configs/android.hardware.sensor.dynamic.head_tracker.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.dynamic.head_tracker.xml

# Spatial Audio: optimize spatializer effect
PRODUCT_PROPERTY_OVERRIDES += \
Expand All @@ -65,7 +70,8 @@ PRODUCT_PROPERTY_OVERRIDES += \
ro.audio.spatializer_enabled=true \
ro.audio.headtracking_enabled=true \
ro.audio.spatializer_transaural_enabled_default=false \
persist.vendor.audio.spatializer.speaker_enabled=true \
ro.audio.stereo_spatialization_enabled=true
persist.vendor.audio.spatializer.speaker_enabled=true

# Spatial Audio Proprietary blobs
PRODUCT_PACKAGES += \
Expand Down Expand Up @@ -101,33 +107,34 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
DSPVolumeSynchronizer

# DolbyAtmos
# DolbyManager
PRODUCT_PACKAGES += \
DolbyAtmos
DolbyManager

# Dolby Proprietary blobs
PRODUCT_COPY_FILES += \
$(DOLBY_PATH)/proprietary/vendor/etc/init/vendor.dolby.hardware.dms@2.0-service.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/vendor.dolby.hardware.dms@2.0-service.rc \

# Codec2 (Dolby)
PRODUCT_COPY_FILES += \
$(DOLBY_PATH)/proprietary/vendor/etc/init/vendor.dolby.media.c2@1.0-service.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/vendor.dolby.media.c2@1.0-service.rc \
$(DOLBY_PATH)/proprietary/vendor/etc/init/vendor.dolby.media.c2@1.0-service.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/vendor.dolby.media.c2@1.0-service.rc

PRODUCT_PACKAGES += \
libdapparamstorage-dolby \
libdapparamstorage \
libdlbpreg \
libstagefright_foundation-dolby \
libdlbvol \
libswdap \
libswgamedap \
libswvqe \
vendor.dolby.hardware.dms@2.0-dolby \
vendor.dolby.hardware.dms@2.0 \
libdlbdsservice \
liboem_specific \
vendor.dolby.hardware.dms@2.0-impl \
vendor.dolby.hardware.dms@2.0-service \
libcodec2_soft_ac4dec \
libcodec2_soft_ddpdec \
libcodec2_soft_dolby \
libcodec2_store_dolby \
libdeccfg \
vendor.dolby.media.c2@1.0-service \
libdlbvol \
libswdap \
libswgamedap \
libswvqe \
libdlbdsservice \
liboem_specific \
vendor.dolby.hardware.dms@2.0-impl \
vendor.dolby.hardware.dms@2.0-service \
vendor.dolby.media.c2@1.0-service

29 changes: 23 additions & 6 deletions dolby/Android.bp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
//
// Copyright (C) 2017-2021 The LineageOS Project
// (C) 2023-24 Paranoid Android
// (C) 2024-2025 Lunaris AOSP
//
// SPDX-License-Identifier: Apache-2.0
//

android_app {
name: "DolbyAtmos",
name: "DolbyManager",

srcs: ["src/**/*.kt"],
resource_dirs: ["res"],
Expand All @@ -15,14 +16,30 @@ android_app {
system_ext_specific: true,
privileged: true,

overrides: ["MusicFX"],
overrides: ["MusicFX", "AudioFX"],
static_libs: [
"SettingsLib",
"SpaLib",
"androidx.activity_activity-compose",
"androidx.compose.animation_animation",
"androidx.compose.foundation_foundation",
"androidx.compose.material3_material3",
"androidx.compose.material_material-icons-extended",
"androidx.compose.runtime_runtime",
"androidx.preference_preference",
"org.lineageos.settings.resources",
"androidx.compose.ui_ui",
"androidx.compose.ui_ui-tooling-preview",
"androidx.lifecycle_lifecycle-runtime-compose",
"androidx.lifecycle_lifecycle-viewmodel-compose",
"androidx.navigation_navigation-compose",
"com.google.android.material_material",
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
],

required: ["preinstalled-packages-platform-dolby.xml"],
}

prebuilt_etc {
name: "preinstalled-packages-platform-dolby.xml",
src: "preinstalled-packages-platform-dolby.xml",
sub_dir: "sysconfig",
system_ext_specific: true,
}
32 changes: 13 additions & 19 deletions dolby/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-24 Paranoid Android
Copyright (C) 2024-2025 Lunaris AOSP
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.aospa.dolby"
package="org.lunaris.dolby"
android:sharedUserId="android.uid.system">

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Expand All @@ -13,19 +14,23 @@
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:label="@string/dolby_title"
android:enableOnBackInvokedCallback="true"
android:persistent="true"
android:theme="@style/Theme.SubSettingsBase.Expressive">
android:directBootAware="true"
android:defaultToDeviceProtectedStorage="true"
android:theme="@style/Theme.Dolby">

<receiver
android:name=".BootCompletedReceiver"
android:exported="true">
<intent-filter android:priority="1000">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
</intent-filter>
</receiver>

<activity
android:name=".DolbyActivity"
android:name=".ui.DolbyActivity"
android:label="@string/dolby_title"
android:exported="true">
<intent-filter>
Expand All @@ -44,21 +49,11 @@
<meta-data android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.sound" />
<meta-data android:name="com.android.settings.summary_uri"
android:value="content://co.aospa.dolby.summary/dolby" />
</activity>

<activity
android:name=".geq.EqualizerActivity"
android:label="@string/dolby_preset"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
android:value="content://org.lunaris.dolby.summary/dolby" />
</activity>

<service
android:name=".DolbyTileService"
android:name=".tile.DolbyTileService"
android:icon="@drawable/ic_dolby_qs"
android:label="@string/dolby_title"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
Expand All @@ -69,10 +64,9 @@
</service>

<provider
android:name=".SummaryProvider"
android:authorities="co.aospa.dolby.summary">
android:name=".provider.SummaryProvider"
android:authorities="org.lunaris.dolby.summary">
</provider>

</application>
</manifest>

</manifest>
24 changes: 24 additions & 0 deletions dolby/preinstalled-packages-platform-dolby.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2024 crDroid Android 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.
-->
<config>
<install-in-user-type package="org.lunaris.dolby">
<install-in user-type="FULL" />
<install-in user-type="PROFILE" />
<do-not-install-in user-type="android.os.usertype.profile.CLONE" />
<do-not-install-in user-type="android.os.usertype.profile.PRIVATE" />
</install-in-user-type>
</config>
8 changes: 0 additions & 8 deletions dolby/res/drawable/ic_dolby.xml

This file was deleted.

16 changes: 8 additions & 8 deletions dolby/res/drawable/ic_dolby_qs.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:fillColor="#191c1e" android:pathData="M1,4.0214C2.2767,4.0743 3.5798,3.9866 4.8252,4.2063C8.8352,4.9133 11.4129,8.3489 11.0507,12.3402C10.7124,16.0695 7.3661,18.9511 3.3484,18.9651C2.5657,18.9678 1.7827,18.9441 1,18.9324L1,4.0214Z" android:strokeColor="#00000000" android:strokeWidth="1" android:fillType="evenOdd"/>
<group>
<clip-path android:pathData="M12.9332,4l10.0668,0l0,15l-10.0668,0z"/>
<path android:fillColor="#191c1e" android:pathData="M23,4.0924L23,18.8825C19.4973,19.298 16.399,18.6968 14.3366,15.6947C12.5148,13.043 12.4594,10.2265 14.2129,7.5241C16.244,4.394 19.3953,3.7204 23,4.0924" android:strokeColor="#00000000" android:strokeWidth="1" android:fillType="evenOdd"/>
</group>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:fillColor="#191c1e" android:pathData="M1,4.0214C2.2767,4.0743 3.5798,3.9866 4.8252,4.2063C8.8352,4.9133 11.4129,8.3489 11.0507,12.3402C10.7124,16.0695 7.3661,18.9511 3.3484,18.9651C2.5657,18.9678 1.7827,18.9441 1,18.9324L1,4.0214Z" android:strokeColor="#00000000" android:strokeWidth="1" android:fillType="evenOdd"/>
<group>
<clip-path android:pathData="M12.9332,4l10.0668,0l0,15l-10.0668,0z"/>
<path android:fillColor="#191c1e" android:pathData="M23,4.0924L23,18.8825C19.4973,19.298 16.399,18.6968 14.3366,15.6947C12.5148,13.043 12.4594,10.2265 14.2129,7.5241C16.244,4.394 19.3953,3.7204 23,4.0924" android:strokeColor="#00000000" android:strokeWidth="1" android:fillType="evenOdd"/>
</group>
</vector>
24 changes: 0 additions & 24 deletions dolby/res/drawable/ic_ieq_balanced.xml

This file was deleted.

24 changes: 0 additions & 24 deletions dolby/res/drawable/ic_ieq_detailed.xml

This file was deleted.

13 changes: 0 additions & 13 deletions dolby/res/drawable/ic_ieq_off.xml

This file was deleted.

28 changes: 0 additions & 28 deletions dolby/res/drawable/ic_ieq_warm.xml

This file was deleted.

Loading