dolby: Switch to Sony Dolby Atmos
* Based on c2 audio decoders Co-Authored-By: Saku <saku-bruh@proton.me> Co-Authored-By: ahnet-69 <syedmusicrealise@gmail.com> Co-Authored-By: HELLBOY017 <abhaygill017@gmail.com> Signed-off-by: swiitchOFF <120115258+swiitchOFF@users.noreply.github.com>
This commit is contained in:
committed by
swiitchOFF
parent
00d74c76bc
commit
a6202e7f90
File diff suppressed because it is too large
Load Diff
@@ -30,20 +30,25 @@
|
||||
<Included>
|
||||
<Decoders>
|
||||
<!-- DOLBY_UDC -->
|
||||
<MediaCodec name="OMX.dolby.ac3.decoder" type="audio/ac3">
|
||||
<Limit name="channel-count" max="6" />
|
||||
<Limit name="sample-rate" ranges="32000,44100,48000" />
|
||||
<Limit name="bitrate" range="32000-640000" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.dolby.eac3.decoder" type="audio/eac3">
|
||||
<Limit name="channel-count" max="8" />
|
||||
<Limit name="sample-rate" ranges="32000,44100,48000" />
|
||||
<Limit name="bitrate" range="32000-6144000" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.dolby.eac3-joc.decoder" type="audio/eac3-joc">
|
||||
<Limit name="channel-count" max="8" />
|
||||
<Limit name="sample-rate" ranges="48000" />
|
||||
<Limit name="bitrate" range="32000-6144000" />
|
||||
<MediaCodec name="c2.dolby.eac3.decoder" >
|
||||
<Type name="audio/ac3">
|
||||
<Alias name="OMX.dolby.ac3.decoder" />
|
||||
<Limit name="channel-count" max="6" />
|
||||
<Limit name="sample-rate" ranges="32000,44100,48000" />
|
||||
<Limit name="bitrate" range="32000-640000" />
|
||||
</Type>
|
||||
<Type name="audio/eac3">
|
||||
<Alias name="OMX.dolby.eac3.decoder" />
|
||||
<Limit name="channel-count" max="8" />
|
||||
<Limit name="sample-rate" ranges="32000,44100,48000" />
|
||||
<Limit name="bitrate" range="32000-6144000" />
|
||||
</Type>
|
||||
<Type name="audio/eac3-joc">
|
||||
<Alias name="OMX.dolby.eac3-joc.decoder" />
|
||||
<Limit name="channel-count" max="16" />
|
||||
<Limit name="sample-rate" ranges="48000" />
|
||||
<Limit name="bitrate" range="32000-6144000" />
|
||||
</Type>
|
||||
</MediaCodec>
|
||||
<!-- DOLBY_UDC END -->
|
||||
</Decoders>
|
||||
|
||||
55
dolby.mk
55
dolby.mk
@@ -30,6 +30,7 @@ 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
|
||||
|
||||
# Configs
|
||||
PRODUCT_COPY_FILES += \
|
||||
@@ -65,21 +66,27 @@ PRODUCT_COPY_FILES += \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/soundfx/libspatialaudio.so:$(TARGET_COPY_OUT_VENDOR)/lib/soundfx/libspatialaudio.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/soundfx/libspatialaudio.so:$(TARGET_COPY_OUT_VENDOR)/lib64/soundfx/libspatialaudio.so \
|
||||
|
||||
# Media C2 Vendor
|
||||
# Media (C2)
|
||||
PRODUCT_PACKAGES += \
|
||||
libcodec2_hidl@1.0.vendor \
|
||||
libcodec2_soft_common.vendor \
|
||||
libstagefright_softomx.vendor \
|
||||
libstagefright_softomx_plugin.vendor \
|
||||
android.hardware.media.c2@1.0.vendor \
|
||||
android.hardware.media.c2@1.1.vendor \
|
||||
android.hardware.media.c2@1.2.vendor \
|
||||
libcodec2_hidl@1.2.vendor \
|
||||
libsfplugin_ccodec_utils.vendor \
|
||||
libcodec2_soft_common.vendor
|
||||
|
||||
# Codec2 Props
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
vendor.audio.c2.preferred=true \
|
||||
debug.c2.use_dmabufheaps=1 \
|
||||
vendor.qc2audio.suspend.enabled=true \
|
||||
vendor.qc2audio.per_frame.flac.dec.enabled=true
|
||||
|
||||
# Dolby Props
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
ro.vendor.dolby.dax.version=DAX3_3.6.0.12_r1 \
|
||||
vendor.audio.dolby.ds2.enabled=false \
|
||||
ro.vendor.dolby.dax.version=DAX3_3.7.0.8_r1 \
|
||||
vendor.audio.dolby.ds2.hardbypass=false \
|
||||
ro.vendor.audio.dolby.dax.support=true \
|
||||
ro.vendor.audio.dolby.surround.enable=true \
|
||||
persist.vendor.audio_fx.current=dolby
|
||||
vendor.audio.dolby.ds2.enabled=false
|
||||
|
||||
# Remove Packages for Dolby Support
|
||||
PRODUCT_PACKAGES += \
|
||||
@@ -95,33 +102,39 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# Dolby Proprietary blobs
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(DOLBY_PATH)/proprietary/system/lib/vendor.dolby.hardware.dms@2.0.so:$(TARGET_COPY_OUT_SYSTEM)/lib/vendor.dolby.hardware.dms@2.0.so \
|
||||
$(DOLBY_PATH)/proprietary/system/lib64/vendor.dolby.hardware.dms@2.0.so:$(TARGET_COPY_OUT_SYSTEM)/lib64/vendor.dolby.hardware.dms@2.0.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/bin/hw/vendor.dolby.hardware.dms@2.0-service:$(TARGET_COPY_OUT_VENDOR)/bin/hw/vendor.dolby.hardware.dms@2.0-service \
|
||||
$(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 \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/libdapparamstorage.so:$(TARGET_COPY_OUT_VENDOR)/lib/libdapparamstorage.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/libdeccfg.so:$(TARGET_COPY_OUT_VENDOR)/lib/libdeccfg.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/soundfx/libhwdap.so:$(TARGET_COPY_OUT_VENDOR)/lib/soundfx/libhwdap.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/soundfx/libswgamedap.so:$(TARGET_COPY_OUT_VENDOR)/lib/soundfx/libswgamedap.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/soundfx/libswvqe.so:$(TARGET_COPY_OUT_VENDOR)/lib/soundfx/libswvqe.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/vendor.dolby.hardware.dms@2.0.so:$(TARGET_COPY_OUT_VENDOR)/lib/vendor.dolby.hardware.dms@2.0.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libdapparamstorage.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libdapparamstorage.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libdeccfg.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libdeccfg.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/soundfx/libhwdap.so:$(TARGET_COPY_OUT_VENDOR)/lib64/soundfx/libhwdap.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/soundfx/libswgamedap.so:$(TARGET_COPY_OUT_VENDOR)/lib64/soundfx/libswgamedap.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/soundfx/libswvqe.so:$(TARGET_COPY_OUT_VENDOR)/lib64/soundfx/libswvqe.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/vendor.dolby.hardware.dms@2.0-impl.so:$(TARGET_COPY_OUT_VENDOR)/lib64/vendor.dolby.hardware.dms@2.0-impl.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/vendor.dolby.hardware.dms@2.0.so:$(TARGET_COPY_OUT_VENDOR)/lib64/vendor.dolby.hardware.dms@2.0.so \
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/libdlbpreg.so:$(TARGET_COPY_OUT_VENDOR)/lib/libdlbpreg.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/soundfx/libswdap.so:$(TARGET_COPY_OUT_VENDOR)/lib/soundfx/libswdap.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libdlbpreg.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libdlbpreg.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/liboem_specific.so:$(TARGET_COPY_OUT_VENDOR)/lib64/liboem_specific.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/soundfx/libswdap.so:$(TARGET_COPY_OUT_VENDOR)/lib64/soundfx/libswdap.so \
|
||||
|
||||
# Codec2 (Dolby)
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(DOLBY_PATH)/proprietary/vendor/bin/hw/vendor.dolby.media.c2@1.0-service:$(TARGET_COPY_OUT_VENDOR)/bin/hw/vendor.dolby.media.c2@1.0-service \
|
||||
$(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/lib64/libcodec2_soft_ac4dec.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libcodec2_soft_ac4dec.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libcodec2_soft_ddpdec.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libcodec2_soft_ddpdec.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libcodec2_soft_dolby.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libcodec2_soft_dolby.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libcodec2_store_dolby.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libcodec2_store_dolby.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libdeccfg.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libdeccfg.so \
|
||||
|
||||
# Patched Proprietary Blobs
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/libstagefright_soft_ac4dec.so:$(TARGET_COPY_OUT_VENDOR)/lib/libstagefright_soft_ac4dec.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/libstagefright_soft_ddpdec.so:$(TARGET_COPY_OUT_VENDOR)/lib/libstagefright_soft_ddpdec.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib/libstagefrightdolby.so:$(TARGET_COPY_OUT_VENDOR)/lib/libstagefrightdolby.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libdlbdsservice.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libdlbdsservice.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libstagefright_soft_ac4dec.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libstagefright_soft_ac4dec.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libstagefright_soft_ddpdec.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libstagefright_soft_ddpdec.so \
|
||||
$(DOLBY_PATH)/proprietary/vendor/lib64/libstagefrightdolby.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libstagefrightdolby.so \
|
||||
|
||||
# Not Xiaomi Proprietary Blobs
|
||||
PRODUCT_COPY_FILES += \
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
<compatibility-matrix version="4.0" type="framework">
|
||||
<hal format="hidl" optional="true">
|
||||
<name>vendor.dolby.hardware.dms</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>IDms</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hardware.media.c2</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IComponentStore</name>
|
||||
<instance>default1</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</compatibility-matrix>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
proprietary/vendor/bin/hw/vendor.dolby.media.c2@1.0-service
vendored
Normal file
BIN
proprietary/vendor/bin/hw/vendor.dolby.media.c2@1.0-service
vendored
Normal file
Binary file not shown.
7
proprietary/vendor/etc/init/vendor.dolby.media.c2@1.0-service.rc
vendored
Normal file
7
proprietary/vendor/etc/init/vendor.dolby.media.c2@1.0-service.rc
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
service vendor-dolby-media-c2-hal-1-0 /vendor/bin/hw/vendor.dolby.media.c2@1.0-service
|
||||
class hal
|
||||
user mediacodec
|
||||
group camera mediadrm drmrpc
|
||||
ioprio rt 4
|
||||
writepid /dev/cpuset/foreground/tasks
|
||||
|
||||
BIN
proprietary/vendor/lib/libdapparamstorage.so
vendored
BIN
proprietary/vendor/lib/libdapparamstorage.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib/libdeccfg.so
vendored
BIN
proprietary/vendor/lib/libdeccfg.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib/libdlbpreg.so
vendored
Normal file
BIN
proprietary/vendor/lib/libdlbpreg.so
vendored
Normal file
Binary file not shown.
BIN
proprietary/vendor/lib/libstagefright_soft_ac4dec.so
vendored
BIN
proprietary/vendor/lib/libstagefright_soft_ac4dec.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib/libstagefrightdolby.so
vendored
BIN
proprietary/vendor/lib/libstagefrightdolby.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib/soundfx/libdlbvol.so
vendored
BIN
proprietary/vendor/lib/soundfx/libdlbvol.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib/soundfx/libhwdap.so
vendored
BIN
proprietary/vendor/lib/soundfx/libhwdap.so
vendored
Binary file not shown.
Binary file not shown.
BIN
proprietary/vendor/lib/soundfx/libswgamedap.so
vendored
BIN
proprietary/vendor/lib/soundfx/libswgamedap.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib/soundfx/libswvqe.so
vendored
BIN
proprietary/vendor/lib/soundfx/libswvqe.so
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
proprietary/vendor/lib64/libcodec2_soft_dolby.so
vendored
Normal file
BIN
proprietary/vendor/lib64/libcodec2_soft_dolby.so
vendored
Normal file
Binary file not shown.
BIN
proprietary/vendor/lib64/libcodec2_store_dolby.so
vendored
Normal file
BIN
proprietary/vendor/lib64/libcodec2_store_dolby.so
vendored
Normal file
Binary file not shown.
BIN
proprietary/vendor/lib64/libdapparamstorage.so
vendored
BIN
proprietary/vendor/lib64/libdapparamstorage.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib64/libdeccfg.so
vendored
BIN
proprietary/vendor/lib64/libdeccfg.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib64/libdlbdsservice.so
vendored
BIN
proprietary/vendor/lib64/libdlbdsservice.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib64/libdlbpreg.so
vendored
Normal file
BIN
proprietary/vendor/lib64/libdlbpreg.so
vendored
Normal file
Binary file not shown.
BIN
proprietary/vendor/lib64/liboem_specific.so
vendored
Normal file
BIN
proprietary/vendor/lib64/liboem_specific.so
vendored
Normal file
Binary file not shown.
BIN
proprietary/vendor/lib64/libstagefrightdolby.so
vendored
BIN
proprietary/vendor/lib64/libstagefrightdolby.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib64/soundfx/libdlbvol.so
vendored
BIN
proprietary/vendor/lib64/soundfx/libdlbvol.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib64/soundfx/libhwdap.so
vendored
BIN
proprietary/vendor/lib64/soundfx/libhwdap.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib64/soundfx/libswdap.so
vendored
Normal file
BIN
proprietary/vendor/lib64/soundfx/libswdap.so
vendored
Normal file
Binary file not shown.
BIN
proprietary/vendor/lib64/soundfx/libswgamedap.so
vendored
BIN
proprietary/vendor/lib64/soundfx/libswgamedap.so
vendored
Binary file not shown.
BIN
proprietary/vendor/lib64/soundfx/libswvqe.so
vendored
BIN
proprietary/vendor/lib64/soundfx/libswvqe.so
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
3
sepolicy/vendor/file_contexts
vendored
3
sepolicy/vendor/file_contexts
vendored
@@ -1,5 +1,6 @@
|
||||
# Data files
|
||||
# Dolby Files
|
||||
/data/vendor/dolby(/.*)? u:object_r:vendor_data_file:s0
|
||||
|
||||
# Dolby
|
||||
/(system/vendor|vendor)/bin/hw/vendor\.dolby\.media\.c2@1\.0-service u:object_r:mediacodec_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.dolby\.hardware\.dms@2\.0-service u:object_r:hal_dms_default_exec:s0
|
||||
|
||||
2
sepolicy/vendor/hal_audio_default.te
vendored
2
sepolicy/vendor/hal_audio_default.te
vendored
@@ -1,2 +1,4 @@
|
||||
allow hal_audio_default hal_dms_hwservice:hwservice_manager find;
|
||||
binder_call(hal_audio_default, hal_dms_default)
|
||||
|
||||
hal_client_domain(hal_audio_default, hal_dms)
|
||||
|
||||
1
sepolicy/vendor/mediacodec.te
vendored
1
sepolicy/vendor/mediacodec.te
vendored
@@ -1,2 +1,3 @@
|
||||
allow mediacodec hal_dms_hwservice:hwservice_manager find;
|
||||
binder_call(mediacodec, hal_dms_default)
|
||||
hal_client_domain(mediacodec, hal_dms)
|
||||
|
||||
2
sepolicy/vendor/platform_app.te
vendored
2
sepolicy/vendor/platform_app.te
vendored
@@ -1,2 +1,4 @@
|
||||
allow platform_app hal_dms_hwservice:hwservice_manager find;
|
||||
binder_call(platform_app, hal_dms_default)
|
||||
get_prop(platform_app, audio_config_prop)
|
||||
hal_client_domain(platform_app, hal_dms)
|
||||
|
||||
3
sepolicy/vendor/priv_app.te
vendored
Normal file
3
sepolicy/vendor/priv_app.te
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Dolby
|
||||
allow priv_app hal_dms_hwservice:hwservice_manager find;
|
||||
binder_call(priv_app, hal_dms_default)
|
||||
1
sepolicy/vendor/system_server.te
vendored
Normal file
1
sepolicy/vendor/system_server.te
vendored
Normal file
@@ -0,0 +1 @@
|
||||
hal_client_domain(system_server, hal_dms)
|
||||
19
vendor.dolby.media.c2.xml
Normal file
19
vendor.dolby.media.c2.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<!--
|
||||
|
||||
This program is protected under international and U.S. copyright laws as
|
||||
an unpublished work. This program is confidential and proprietary to the
|
||||
copyright owners. Reproduction or disclosure, in whole or in part, or the
|
||||
production of derivative works therefrom without the express permission of
|
||||
the copyright owners is prohibited.
|
||||
|
||||
Copyright (C) 2020-2021 by Dolby Laboratories,
|
||||
All rights reserved.
|
||||
|
||||
-->
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.media.c2</name>
|
||||
<transport>hwbinder</transport>
|
||||
<fqname>@1.0::IComponentStore/default1</fqname>
|
||||
</hal>
|
||||
</manifest>
|
||||
Reference in New Issue
Block a user