sm8350-common: Include Moto Dolby Atmos

* Using dolby from: https://github.com/swiitch-OFF-Lab/hardware_dolby
* dolby: Add mediacodecs support (Useful for Apple Music)

Signed-off-by: swiitchOFF <120115258+swiitchOFF@users.noreply.github.com>
Co-Authored-By: HELLBOY017 <abhaygill017@gmail.com>
Co-Authored-By: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
New Author Name 2024-08-14 08:18:37 +05:30 committed by DigiGoon
parent 5574e90af9
commit 9d295d35ba
8 changed files with 36 additions and 10 deletions

View file

@ -55,12 +55,12 @@ BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
# HIDL
DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
hardware/xiaomi/vintf/xiaomi_framework_compatibility_matrix.xml \
vendor/lineage/config/device_framework_matrix.xml
DEVICE_MANIFEST_FILE := \
DEVICE_MANIFEST_FILE += \
$(COMMON_PATH)/hidl/manifest_lahaina.xml \
$(COMMON_PATH)/hidl/manifest_xiaomi.xml

View file

@ -41,6 +41,13 @@
<library name="volume_listener" path="libvolumelistener.so"/>
<library name="audiosphere" path="libasphere.so"/>
<library name="shoebox" path="libshoebox.so"/>
<!-- DOLBY DAP -->
<library name="vqe" path="libswvqe.so"/>
<library name="dap" path="libswdap.so"/>
<!-- DOLBY END -->
<!--DOLBY GAME-->
<library name="gamedap" path="libswgamedap.so"/>
<!--DOLBY END-->
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
@ -89,22 +96,26 @@
<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"/>
<!-- DOLBY DAP -->
<effect name="vqe" library="vqe" uuid="64a0f614-7fa4-48b8-b081-d59dc954616f"/>
<effect name="dap" library="dap" uuid="9d4921da-8225-4f29-aefa-39537a04bcaa"/>
<!-- DOLBY END -->
<!--DOLBY GAME-->
<effect name="gamedap" library="gamedap" uuid="3783c334-d3a0-4d13-874f-0032e5fb80e2"/>
<!--DOLBY END-->
</effects>
<postprocess>
<stream type="system">
</stream>
<stream type="music">
<apply effect="music_helper"/>
</stream>
<stream type="ring">
<apply effect="ring_helper"/>
</stream>
<stream type="alarm">
<apply effect="alarm_helper"/>
</stream>
<stream type="voice_call">
<apply effect="voice_helper"/>
</stream>
<stream type="notification">
<apply effect="notification_helper"/>
</stream>
</postprocess>
<preprocess>

View file

@ -76,7 +76,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_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

@ -181,6 +181,15 @@ 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_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="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"/>
</mixPort>
<mixPort name="voice_tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"

View file

@ -145,6 +145,9 @@ PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
hardware/qcom-caf/sm8350/display/config/snapdragon_color_libs_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/snapdragon_color_libs_config.xml
# Dolby
$(call inherit-product, hardware/dolby/dolby.mk)
# DRM
PRODUCT_PACKAGES += \
android.hardware.drm-service.clearkey

View file

@ -103,6 +103,7 @@
-->
<MediaCodecs>
<Include href="media_codecs_dolby_audio.xml" />
<Settings>
<Domain name="telephony" enabled="true" />
<Setting name="max-video-encoder-input-buffers" value="11" />

View file

@ -116,6 +116,10 @@ on post-fs-data
on early-boot
# Enable WLAN cold boot calibration
write /sys/devices/platform/soc/b0000000.qcom,cnss-qca6490/fs_ready 1
# Dolby
mkdir /data/vendor/dolby 0770 media media
mkdir /data/vendor/multimedia 0775 system system
start vendor.sensors

View file

@ -47,8 +47,6 @@ ro.vendor.audio.soundtrigger.xiaomievent=1
ro.vendor.audio.soundtrigger=sva
ro.vendor.audio.us.proximity=true
vendor.audio.adm.buffering.ms=6
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