From bc2f1a59939efa2f18cd5e96ae2a96c9e75ff61a Mon Sep 17 00:00:00 2001 From: Sanju0910 Date: Sun, 28 May 2023 20:08:40 +0530 Subject: [PATCH] avicii: Add support for Dolby Atmos Co-authored-by: HELLBOY017 Co-authored-by: kibria5 --- BoardConfig.mk | 1 + audio/audio_effects.conf | 60 ++++++++++++++++++++++++++++ audio/audio_effects.xml | 4 ++ audio/audio_io_policy.conf | 2 +- audio/audio_policy_configuration.xml | 12 ++++++ device.mk | 4 ++ device_framework_matrix.xml | 4 +- media/media_codecs.xml | 1 + media/media_codecs_vendor.xml | 1 + vendor.prop | 12 +++++- 10 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 audio/audio_effects.conf diff --git a/BoardConfig.mk b/BoardConfig.mk index c1d78c3..8605aac 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -43,6 +43,7 @@ TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385 # Audio AUDIO_FEATURE_ENABLED_DLKM := true +AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := true AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := true AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true diff --git a/audio/audio_effects.conf b/audio/audio_effects.conf new file mode 100644 index 0000000..3fef93e --- /dev/null +++ b/audio/audio_effects.conf @@ -0,0 +1,60 @@ +# List of effect libraries to load. Each library element must contain a "path" element +# giving the full path of the library .so file. +# libraries { +# { +# path +# } +# } +libraries { + dolbyatmos { + path /vendor/lib/soundfx/libatmos.so + } +} +effects { +# additions for the proxy implementation +# Proxy implementation + #effectname { + #library proxy + #uuid xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + # SW implemetation of the effect. Added as a node under the proxy to + # indicate this as a sub effect. + #libsw { + #library libSW + #uuid yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy + #} End of SW effect + # HW implementation of the effect. Added as a node under the proxy to + # indicate this as a sub effect. + #libhw { + #library libHW + #uuid zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz + #}End of HW effect + #} End of effect proxy + dolbyatmos { + library dolbyatmos + uuid 74697567-7261-6564-6864-65726f206678 + } +} +# additional effect from vendor +# UUID generated using version 1 + +output_session_processing { + system { + + } + music { + + } + ring { + + } + alarm { + + } + # stream type voice_call is used for VoIP call + voice_call { + + } + notification { + + } +} diff --git a/audio/audio_effects.xml b/audio/audio_effects.xml index add0925..1ba89f1 100644 --- a/audio/audio_effects.xml +++ b/audio/audio_effects.xml @@ -41,6 +41,7 @@ + @@ -89,8 +90,11 @@ + + + diff --git a/audio/audio_io_policy.conf b/audio/audio_io_policy.conf index 18d216d..3eece00 100644 --- a/audio/audio_io_policy.conf +++ b/audio/audio_io_policy.conf @@ -82,7 +82,7 @@ outputs { } compress_passthrough { flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH - formats AUDIO_FORMAT_DTS|AUDIO_FORMAT_DTS_HD|AUDIO_FORMAT_DSD + formats AUDIO_FORMAT_AC3|AUDIO_FORMAT_AC4|AUDIO_FORMAT_E_AC3|AUDIO_FORMAT_E_AC3_JOC|AUDIO_FORMAT_DTS|AUDIO_FORMAT_DTS_HD|AUDIO_FORMAT_DSD sampling_rates 32000|44100|48000|88200|96000|176400|192000|352800 bit_width 16 app_type 69941 diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml index d3e2060..ccae545 100644 --- a/audio/audio_policy_configuration.xml +++ b/audio/audio_policy_configuration.xml @@ -166,6 +166,18 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + + - vendor.dolby_v3_6.hardware.dms360 - 2.0 + vendor.dolby.hardware.dms + 1.0 IDms default diff --git a/media/media_codecs.xml b/media/media_codecs.xml index 00a921b..95b571d 100644 --- a/media/media_codecs.xml +++ b/media/media_codecs.xml @@ -131,6 +131,7 @@ Only the three quirks included above are recognized at this point: + diff --git a/media/media_codecs_vendor.xml b/media/media_codecs_vendor.xml index 10a364d..cb48898 100644 --- a/media/media_codecs_vendor.xml +++ b/media/media_codecs_vendor.xml @@ -136,6 +136,7 @@ Only the three quirks included above are recognized at this point: + diff --git a/vendor.prop b/vendor.prop index ecebe56..a31bcdb 100644 --- a/vendor.prop +++ b/vendor.prop @@ -19,8 +19,6 @@ persist.vendor.audio_hal.dsp_bit_width_enforce_mode=24 ro.vendor.audio.sdk.fluencetype=none ro.vendor.audio.sdk.ssr=false vendor.audio.adm.buffering.ms=2 -vendor.audio.dolby.ds2.enabled=false -vendor.audio.dolby.ds2.hardbypass=false vendor.audio.enable.mirrorlink=false vendor.audio.feature.a2dp_offload.enable=true vendor.audio.feature.afe_proxy.enable=true @@ -86,6 +84,16 @@ vendor.audio_hal.period_multiplier=3 vendor.audio_hal.period_size=192 vendor.voice.path.for.pcm.voip=true +# Audio - Dolby +vendor.audio.dolby.ds2.enabled=true +vendor.audio.dolby.ds2.hardbypass=false +ro.vendor.df.effect.conflict=1 +ro.audio.monitorRotation=true +ro.vendor.audio.dolby.dax.support=true +persist.vendor.audio.delta.refresh=true +ro.vendor.audio.dolby.surround.enable=true + + # Bluetooth bluetooth.device.class_of_device=90,2,12 bluetooth.hardware.power.idle_cur_ma=6