Merge "Audio Policy: enable surround sound configuration in xml"
diff --git a/services/audiopolicy/config/audio_policy_configuration.xml b/services/audiopolicy/config/audio_policy_configuration.xml
index b5ecbf9..42c52de 100644
--- a/services/audiopolicy/config/audio_policy_configuration.xml
+++ b/services/audiopolicy/config/audio_policy_configuration.xml
@@ -198,27 +198,10 @@
 
     <!-- End of Volume section -->
 
-    <?disabledUntilHalV5_0
-    <!-- Surround configuration -->
+    <!-- Surround Sound configuration -->
 
-    <surroundSound>
-      <!-- Each of the listed formats gets an entry in Surround Settings dialog.
-           There must be a corresponding Java ENCODING_... contant defined in AudioFormat.java,
-           and a display name defined in AudioFormat.toDisplayName. For the formats that don't
-           need a dedicated Surrond Settings dialog entry, a subformats list should be used. -->
-      <formats>
-        <format name="AUDIO_FORMAT_AC3" />
-        <format name="AUDIO_FORMAT_E_AC3" />
-        <format name="AUDIO_FORMAT_E_AC3_JOC" />
-        <format name="AUDIO_FORMAT_DOLBY_TRUEHD" />
-        <format name="AUDIO_FORMAT_DTS" />
-        <format name="AUDIO_FORMAT_DTS_HD" />
-        <format name="AUDIO_FORMAT_AAC_LC" subformats="AUDIO_FORMAT_AAC_HE_V1 AUDIO_FORMAT_AAC_HE_V2 AUDIO_FORMAT_AAC_ELD AUDIO_FORMAT_AAC_XHE" />
-        <format name="AUDIO_FORMAT_AC4" />
-      </formats>
-    </surroundSound>
+    <xi:include href="surround_sound_configuration_5_0.xml"/>
 
-    <!-- End of Surround configuration -->
-    ?>
+    <!-- End of Surround Sound configuration -->
 
 </audioPolicyConfiguration>
diff --git a/services/audiopolicy/config/surround_sound_configuration_5_0.xml b/services/audiopolicy/config/surround_sound_configuration_5_0.xml
new file mode 100644
index 0000000..590a181
--- /dev/null
+++ b/services/audiopolicy/config/surround_sound_configuration_5_0.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<surroundSound>
+  <!-- Each of the listed formats gets an entry in Surround Settings dialog on TV devices.
+       There must be a corresponding Java ENCODING_... contant defined in AudioFormat.java,
+       and a display name defined in AudioFormat.toDisplayName. For the formats that don't
+       need a dedicated Surrond Settings dialog entry, a subformats list has to be used. -->
+  <formats>
+    <format name="AUDIO_FORMAT_AC3" />
+    <format name="AUDIO_FORMAT_E_AC3" />
+    <format name="AUDIO_FORMAT_E_AC3_JOC" />
+    <format name="AUDIO_FORMAT_DOLBY_TRUEHD" />
+    <format name="AUDIO_FORMAT_DTS" />
+    <format name="AUDIO_FORMAT_DTS_HD" />
+    <format name="AUDIO_FORMAT_AAC_LC" subformats="AUDIO_FORMAT_AAC_HE_V1 AUDIO_FORMAT_AAC_HE_V2 AUDIO_FORMAT_AAC_ELD AUDIO_FORMAT_AAC_XHE" />
+    <format name="AUDIO_FORMAT_AC4" />
+  </formats>
+</surroundSound>