diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index bf0d4bc..a1b369e 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -39,6 +39,22 @@ TARGET_2ND_CPU_ABI := armeabi-v7a TARGET_2ND_CPU_ABI2 := armeabi TARGET_2ND_CPU_VARIANT := cortex-a75 +# Audio +AUDIO_FEATURE_ENABLED_DLKM := true +AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true +AUDIO_FEATURE_ENABLED_GKI := true +AUDIO_FEATURE_ENABLED_INSTANCE_ID := true +AUDIO_FEATURE_ENABLED_AGM_HIDL := true +AUDIO_FEATURE_ENABLED_LSM_HIDL := true +AUDIO_FEATURE_ENABLED_PAL_HIDL := true +AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true +AUDIO_FEATURE_ENABLED_SSR := true +AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true +BOARD_SUPPORTS_OPENSOURCE_STHAL := true +BOARD_SUPPORTS_SOUND_TRIGGER := true +BOARD_USES_ALSA_AUDIO := true +TARGET_USES_QCOM_MM_AUDIO := true + # Boot BOARD_BOOT_HEADER_VERSION := 4 BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml new file mode 100644 index 0000000..96ac4c8 --- /dev/null +++ b/audio/audio_policy_configuration.xml @@ -0,0 +1,549 @@ + + + + + + + + + + + + + + + + + + + Earpiece + Speaker + Telephony Tx + Built-In Mic + Built-In Back Mic + FM Tuner + Telephony Rx + Echo Reference + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/audio_policy_volumes.xml b/audio/audio_policy_volumes.xml new file mode 100644 index 0000000..32912b8 --- /dev/null +++ b/audio/audio_policy_volumes.xml @@ -0,0 +1,205 @@ + + + + + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + + + + + + 1,-2970 + 33,-2010 + 66,-1020 + 100,0 + + + + + + + + + + + + 0,-2970 + 33,-2010 + 66,-1020 + 100,0 + + + + + + + 1,-2970 + 33,-2010 + 66,-1020 + 100,0 + + + + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/default_volume_tables.xml b/audio/default_volume_tables.xml new file mode 100644 index 0000000..207be41 --- /dev/null +++ b/audio/default_volume_tables.xml @@ -0,0 +1,129 @@ + + + + + + + + 0,0 + 100,0 + + + 0,-9600 + 100,-9600 + + + + 1,-2400 + 33,-1800 + 66,-1200 + 100,-600 + + + + 1,-5800 + 20,-4000 + 60,-1700 + 100,0 + + + + 1,-4950 + 33,-3350 + 66,-1700 + 100,0 + + + + 1,-5800 + 20,-4000 + 60,-1700 + 100,0 + + + + 1,-4950 + 33,-3350 + 66,-1700 + 100,0 + + + + 1,-5800 + 20,-4000 + 60,-2100 + 100,-1000 + + + + 1,-12700 + 20,-8000 + 60,-4000 + 100,0 + + + + + + + + + 0,-5800 + 20,-4000 + 60,-1700 + 100,0 + + + + + 0,-4950 + 33,-3350 + 66,-1700 + 100,0 + + + + + 0,-5800 + 20,-4000 + 60,-1700 + 100,0 + + + + + 0,-4950 + 33,-3350 + 66,-1700 + 100,0 + + + + + 0,-5800 + 20,-4000 + 60,-2100 + 100,-1000 + + + + + 0,-12700 + 20,-8000 + 60,-4000 + 100,0 + + diff --git a/common.mk b/common.mk index ae02c07..e55cd99 100644 --- a/common.mk +++ b/common.mk @@ -33,6 +33,44 @@ PRODUCT_PACKAGES += \ checkpoint_gc \ otapreopt_script +# Audio +PRODUCT_PACKAGES += \ + android.hardware.audio@7.1-impl \ + android.hardware.audio.effect@7.0-impl \ + android.hardware.audio.service_64 \ + android.hardware.bluetooth.audio-impl \ + android.hardware.soundtrigger@2.3-impl \ + audio.bluetooth.default \ + audio.primary.kalama \ + audio.r_submix.default \ + audio.usb.default \ + audioadsprpcd \ + libbatterylistener \ + libqcompostprocbundle \ + libqcomvisualizer \ + libqcomvoiceprocessing \ + libsndcardparser \ + libtinycompress \ + libvolumelistener \ + sound_trigger.primary.kalama + +AUDIO_HAL_DIR := hardware/qcom-caf/sm8550/audio + +PRODUCT_COPY_FILES += \ + $(AUDIO_HAL_DIR)/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + $(AUDIO_HAL_DIR)/configs/kalama/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_kalama/audio_effects.conf \ + $(AUDIO_HAL_DIR)/configs/kalama/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_kalama/audio_effects.xml \ + $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_kalama_qssi/audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + $(LOCAL_PATH)/audio/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml + +PRODUCT_COPY_FILES += \ + frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ + frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ + frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \ + frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \ + frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml + # Atrace PRODUCT_PACKAGES += \ android.hardware.atrace@1.0-service diff --git a/proprietary-files.txt b/proprietary-files.txt index 34e882c..3ce47de 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -169,8 +169,6 @@ vendor/lib64/libagmmixer.so -vendor/lib64/vendor.qti.hardware.AGMIPC@1.0-impl.so # Audio configs -vendor/etc/audio/sku_kalama/audio_effects.conf -vendor/etc/audio/sku_kalama/audio_effects.xml vendor/etc/audio/sku_kalama/mixer_paths.xml vendor/etc/audio/sku_kalama/mixer_paths_kalama_cdp.xml vendor/etc/audio/sku_kalama/mixer_paths_kalama_cdp_wsa883x.xml @@ -182,16 +180,12 @@ vendor/etc/audio/sku_kalama/resourcemanager_kalama_cdp.xml vendor/etc/audio/sku_kalama/resourcemanager_kalama_grd.xml vendor/etc/audio/sku_kalama/resourcemanager_kalama_mtp.xml vendor/etc/audio/sku_kalama/resourcemanager_kalama_qrd.xml -vendor/etc/audio/sku_kalama_qssi/audio_policy_configuration.xml vendor/etc/audio_effects.xml vendor/etc/audio_effects_haptic.xml vendor/etc/audio_effects_sec.xml vendor/etc/audio_effects_spatializer.xml -vendor/etc/audio_policy_configuration.xml vendor/etc/audio_policy_configuration_base.xml -vendor/etc/audio_policy_volumes.xml vendor/etc/card-defs.xml -vendor/etc/default_volume_tables.xml vendor/etc/microphone_characteristics.xml vendor/etc/usecaseKvManager.xml