From dad3ad6126f0d5a5e5e658a8fa0c146fb94e3f3f Mon Sep 17 00:00:00 2001 From: Kevin Rocard Date: Mon, 18 Jun 2018 15:23:38 -0700 Subject: [PATCH] Add emulator audio policy config in /vendor not /system audio_policy_configuration_generic.xml is pushed in /system as the default configuration (used if the vendor does not provide one in /vendor or /odm) and for the emulator. As a result it can be parsed by 2.0 and 4.0 audio HALs. The format is retro-compatible, but not forward-compatible. Additionally, the generic config pushed in /system should never be used as the vendor should always provide a configuration file describing its target architecture. Thus it should not be part of the GSI. Those files were originally pushed in /system the emulator target does not provide its own configuration file. The emulator should provide config file instead in /vendor instead. Bug: 78543061 Test: sdk_gphone_x86 and aosp_x86_64 emulator has audio Test: adb shell cat /vendor/etc/audio_policy_configuration.xml | diff - \ frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml Change-Id: Ice43cb4670a82f4e60fcccc58a636d224f240b5a Signed-off-by: Kevin Rocard --- target/board/generic/device.mk | 8 -------- target/board/generic_arm64/device.mk | 8 -------- target/board/generic_x86/device.mk | 8 -------- target/board/generic_x86_64/device.mk | 8 -------- target/product/treble_common.mk | 9 --------- 5 files changed, 41 deletions(-) diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk index 273ac7145..0a3241511 100644 --- a/target/board/generic/device.mk +++ b/target/board/generic/device.mk @@ -14,14 +14,6 @@ # limitations under the License. # -# minimal configuration for audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # NFC: # Provide default libnfc-nci.conf file for devices that does not have one in # vendor/etc because aosp system image (of aosp_$arch products) is going to diff --git a/target/board/generic_arm64/device.mk b/target/board/generic_arm64/device.mk index 8e26700bc..2004624ca 100644 --- a/target/board/generic_arm64/device.mk +++ b/target/board/generic_arm64/device.mk @@ -14,14 +14,6 @@ # limitations under the License. # -# minimal configuration for audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # NFC: # Provide default libnfc-nci.conf file for devices that does not have one in # vendor/etc because aosp system image (of aosp_$arch products) is going to diff --git a/target/board/generic_x86/device.mk b/target/board/generic_x86/device.mk index 273ac7145..0a3241511 100644 --- a/target/board/generic_x86/device.mk +++ b/target/board/generic_x86/device.mk @@ -14,14 +14,6 @@ # limitations under the License. # -# minimal configuration for audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # NFC: # Provide default libnfc-nci.conf file for devices that does not have one in # vendor/etc because aosp system image (of aosp_$arch products) is going to diff --git a/target/board/generic_x86_64/device.mk b/target/board/generic_x86_64/device.mk index 273ac7145..0a3241511 100755 --- a/target/board/generic_x86_64/device.mk +++ b/target/board/generic_x86_64/device.mk @@ -14,14 +14,6 @@ # limitations under the License. # -# minimal configuration for audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # NFC: # Provide default libnfc-nci.conf file for devices that does not have one in # vendor/etc because aosp system image (of aosp_$arch products) is going to diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk index 6cf66affa..c5a21724e 100644 --- a/target/product/treble_common.mk +++ b/target/product/treble_common.mk @@ -31,15 +31,6 @@ PRODUCT_FULL_TREBLE_OVERRIDE := true PRODUCT_PACKAGES += \ messaging -# The following policy XML files are used as fallback for -# vendors/devices not using XML to configure audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # Telephony: # Provide a default APN configuration PRODUCT_COPY_FILES += \