From 046c6a0f5508472d088eefced1ddf4b664bcfa4b Mon Sep 17 00:00:00 2001 From: Dhina17 Date: Sat, 11 Feb 2023 11:22:28 +0530 Subject: [PATCH] sm6225-common: Import common audio configs - from hawao S2SE32.28-41-1 Change-Id: I52af44295af31ca6901bd3d71f74abf80abd5b48 --- audio/audio_effects.xml | 81 ++++++++ audio/audio_ext_spkr.conf | 29 +++ audio/audio_policy_configuration.xml | 261 +++++++++++++++++++++++ audio/audio_policy_volumes.xml | 135 ++++++++++++ audio/sound_trigger_mixer_paths.xml | 284 ++++++++++++++++++++++++++ audio/sound_trigger_platform_info.xml | 250 +++++++++++++++++++++++ bengal.mk | 14 ++ 7 files changed, 1054 insertions(+) create mode 100644 audio/audio_effects.xml create mode 100644 audio/audio_ext_spkr.conf create mode 100644 audio/audio_policy_configuration.xml create mode 100644 audio/audio_policy_volumes.xml create mode 100644 audio/sound_trigger_mixer_paths.xml create mode 100644 audio/sound_trigger_platform_info.xml diff --git a/audio/audio_effects.xml b/audio/audio_effects.xml new file mode 100644 index 0000000..c26cb4e --- /dev/null +++ b/audio/audio_effects.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/audio_ext_spkr.conf b/audio/audio_ext_spkr.conf new file mode 100644 index 0000000..0e49a8d --- /dev/null +++ b/audio/audio_ext_spkr.conf @@ -0,0 +1,29 @@ +global_config { + # name Hawao + sonification_pad 20 + sonification_prox_timeout_sec 5 +} + +ring { + #dB to attenuate playback to meet safety level at each volume step + #16 steps total, 15...0. In case of truncated list, last attenuation + #given will be applied to all lower volume steps + attenuation 32,31,30,29,27,25,23,21,19,17,15,12,9,6,3,0 + knee_step 16 +} + +voice { + #dB to attenuate playback to meet safety level at each volume step + #16 steps total, 15...0. In case of truncated list, last attenuation + #given will be applied to all lower volume steps + attenuation 32,31,30,29,27,25,23,21,19,17,15,12,9,6,3,0 + knee_step 16 +} + +media { + #dB to attenuate playback to meet safety level at each volume step + #16 steps total, 15...0. In case of truncated list, last attenuation + #given will be applied to all lower volume steps + attenuation 32,31,30,29,27,25,23,21,19,17,15,12,9,6,3,0 + knee_step 16 +} diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml new file mode 100644 index 0000000..993930a --- /dev/null +++ b/audio/audio_policy_configuration.xml @@ -0,0 +1,261 @@ + + + + + + + + + + + + + Earpiece + Speaker + Telephony Tx + Built-In Mic + Built-In Back Mic + Telephony Rx + FM tuner + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/audio_policy_volumes.xml b/audio/audio_policy_volumes.xml new file mode 100644 index 0000000..b973aa1 --- /dev/null +++ b/audio/audio_policy_volumes.xml @@ -0,0 +1,135 @@ + + + + + + 0,-3800 + 33,-1700 + 66,-700 + 100,0 + + + 0,-3000 + 33,-2300 + 66,-700 + 100,0 + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + + + + + + + + 1,-5600 + 33,-3400 + 66,-1600 + 100,0 + + + + + + + + + + + + + + + + + + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/sound_trigger_mixer_paths.xml b/audio/sound_trigger_mixer_paths.xml new file mode 100644 index 0000000..1905d23 --- /dev/null +++ b/audio/sound_trigger_mixer_paths.xml @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/sound_trigger_platform_info.xml b/audio/sound_trigger_platform_info.xml new file mode 100644 index 0000000..71f7eff --- /dev/null +++ b/audio/sound_trigger_platform_info.xml @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bengal.mk b/bengal.mk index f899d42..d5bc892 100644 --- a/bengal.mk +++ b/bengal.mk @@ -45,6 +45,20 @@ PRODUCT_PACKAGES += \ PRODUCT_AAPT_CONFIG := normal PRODUCT_AAPT_PREF_CONFIG := xxhdpi +# Audio - Configs +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \ + $(LOCAL_PATH)/audio/audio_ext_spkr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_ext_spkr.conf \ + $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + $(LOCAL_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \ + $(LOCAL_PATH)/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml + +PRODUCT_COPY_FILES += \ + frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \ + 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 + # Boot animation TARGET_SCREEN_HEIGHT := 2400 TARGET_SCREEN_WIDTH := 1080