From d11af90eef037b22e75ba0773858a5ea56de7b56 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Mon, 18 Dec 2017 11:20:17 +0000 Subject: [PATCH] universal7580: Use XML audio policy configuration file * Modified from s8 stock Change-Id: Ia93e30428ff9e27ae409e685a84fa5a8e406bca0 --- BoardConfigCommon.mk | 3 + configs/audio/audio_policy_configuration.xml | 149 +++++++++++++++++++ device-common.mk | 8 +- 3 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 configs/audio/audio_policy_configuration.xml diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 453d6aa..60c1d05 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -43,6 +43,9 @@ TARGET_CPU_ABI2 := armeabi TARGET_CPU_VARIANT := cortex-a53 TARGET_CPU_CORTEX_A53 := true +# Audio +USE_XML_AUDIO_POLICY_CONF := 1 + # Binder TARGET_USES_64_BIT_BINDER := true diff --git a/configs/audio/audio_policy_configuration.xml b/configs/audio/audio_policy_configuration.xml new file mode 100644 index 0000000..08a6133 --- /dev/null +++ b/configs/audio/audio_policy_configuration.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + Earpiece + Speaker + Built-In Mic + Built-In Back Mic + Voice Call Mic + + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device-common.mk b/device-common.mk index fb6a9fb..8a377d6 100644 --- a/device-common.mk +++ b/device-common.mk @@ -30,7 +30,13 @@ PRODUCT_PACKAGES += \ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/audio/audio_policy.conf:system/etc/audio_policy.conf \ - $(LOCAL_PATH)/configs/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml + $(LOCAL_PATH)/configs/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \ + frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + 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/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 \ + frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ + $(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml # Bluetooth PRODUCT_PACKAGES += \ -- 2.20.1