From 3da6c400aaddbeff54554641ca176d38eeacb89d Mon Sep 17 00:00:00 2001 From: Sarthak Roy Date: Sat, 19 Oct 2024 18:47:58 +0530 Subject: [PATCH] sm6150-common: audio: Use `DEFAULT_DEVICE_CATEGORY_SPEAKER_VOLUME_CURVE` for earpiece speaker Signed-off-by: Sarthak Roy Change-Id: Ifbd54257d339b8e9b5fbcebf4b1fc1ef9104ae5e [basamaryan: Import from android-14.0.0_r67 and guard it] Signed-off-by: basamaryan --- configs/audio/audio_policy_volumes.xml | 215 +++++++++++++++++++++++++ sm6150.mk | 9 +- 2 files changed, 223 insertions(+), 1 deletion(-) create mode 100644 configs/audio/audio_policy_volumes.xml diff --git a/configs/audio/audio_policy_volumes.xml b/configs/audio/audio_policy_volumes.xml new file mode 100644 index 0000000..02c4302 --- /dev/null +++ b/configs/audio/audio_policy_volumes.xml @@ -0,0 +1,215 @@ + + + + + + + 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/sm6150.mk b/sm6150.mk index ca56aa2..043c483 100644 --- a/sm6150.mk +++ b/sm6150.mk @@ -78,8 +78,15 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml +ifeq ($(TARGET_USES_DOLBY),true) +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/audio/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml +else +PRODUCT_COPY_FILES += \ + frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml +endif + PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \ frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml