avicii: Add support for Dolby Atmos

Co-authored-by: HELLBOY017 <abhaygill017@gmail.com>
Co-authored-by: kibria5 <mdkibria687@gmail.com>
This commit is contained in:
Sanju0910
2023-05-28 20:08:40 +05:30
committed by psavarmattas
parent 33308604cd
commit bc2f1a5993
10 changed files with 96 additions and 5 deletions

View File

@@ -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

60
audio/audio_effects.conf Normal file
View File

@@ -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 {
# <lib name> {
# path <lib 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 {
}
}

View File

@@ -41,6 +41,7 @@
<library name="volume_listener" path="libvolumelistener.so"/>
<library name="audiosphere" path="libasphere.so"/>
<library name="shoebox" path="libshoebox.so"/>
<library name="dolbyatmos" path="libatmos.so"/>
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
@@ -89,8 +90,11 @@
<effect name="notification_helper" library="volume_listener" uuid="0b776dde-0590-11e5-81ba-0025b32654a0"/>
<effect name="audiosphere" library="audiosphere" uuid="184e62ab-2d19-4364-9d1b-c0a40733866c"/>
<effect name="shoebox" library="shoebox" uuid="1eab784c-1a36-4b2a-b7fc-e34c44cab89e"/>
<effect name="dolbyatmos" library="dolbyatmos" uuid="74697567-7261-6564-6864-65726f206678"/>
</effects>
<postprocess>
<stream type="system">
</stream>
<stream type="music">
<apply effect="music_helper"/>
</stream>

View File

@@ -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

View File

@@ -166,6 +166,18 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V2"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AC3"
samplingRates="32000,44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1"/>
<profile name="" format="AUDIO_FORMAT_AC4"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_E_AC3"
samplingRates="32000,44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_E_AC3_JOC"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
</mixPort>
<mixPort name="voice_tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"

View File

@@ -62,6 +62,7 @@ PRODUCT_PACKAGES += \
libvolumelistener
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/audio/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
$(LOCAL_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
$(LOCAL_PATH)/audio/audio_platform_info.xml:$(TARGET_COPY_OUT_ODM)/etc/audio_platform_info.xml \
$(LOCAL_PATH)/audio/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf \
@@ -164,6 +165,9 @@ PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
# Dolby Atmos
$(call inherit-product, vendor/dolby/atmos/config.mk)
# Doze
PRODUCT_PACKAGES += \
OplusDoze

View File

@@ -8,8 +8,8 @@
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.dolby_v3_6.hardware.dms360</name>
<version>2.0</version>
<name>vendor.dolby.hardware.dms</name>
<version>1.0</version>
<interface>
<name>IDms</name>
<instance>default</instance>

View File

@@ -131,6 +131,7 @@ Only the three quirks included above are recognized at this point:
<MediaCodecs>
<Include href="media_codecs_google_audio.xml" />
<Include href="media_codecs_google_telephony.xml" />
<Include href="media_codecs_dolby_audio.xml" />
<Settings>
<Setting name="max-video-encoder-input-buffers" value="11" />
</Settings>

View File

@@ -136,6 +136,7 @@ Only the three quirks included above are recognized at this point:
<Include href="media_codecs_google_audio.xml" />
<Include href="media_codecs_vendor_audio.xml" />
<Include href="media_codecs_google_telephony.xml" />
<Include href="media_codecs_dolby_audio.xml" />
<Settings>
<Setting name="max-video-encoder-input-buffers" value="11" />
</Settings>

View File

@@ -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