Loading services/audiopolicy/common/managerdefinitions/src/Serializer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,7 @@ struct GlobalConfigTraits struct Attributes { static constexpr const char *speakerDrcEnabled = "speaker_drc_enabled"; static constexpr const char *engineLibrarySuffix = "engine_library"; }; static status_t deserialize(const xmlNode *root, AudioPolicyConfig *config); Loading Loading @@ -687,6 +688,10 @@ status_t GlobalConfigTraits::deserialize(const xmlNode *root, AudioPolicyConfig convertTo<std::string, bool>(speakerDrcEnabled, isSpeakerDrcEnabled)) { config->setSpeakerDrcEnabled(isSpeakerDrcEnabled); } std::string engineLibrarySuffix = getXmlAttribute(cur, Attributes::engineLibrarySuffix); if (!engineLibrarySuffix.empty()) { config->setEngineLibraryNameSuffix(engineLibrarySuffix); } return NO_ERROR; } } Loading services/audiopolicy/config/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,10 @@ filegroup { name: "audio_policy_configuration_generic", srcs: ["audio_policy_configuration_generic.xml"], } filegroup { name: "audio_policy_configuration_generic_configurable", srcs: ["audio_policy_configuration_generic_configurable.xml"], } filegroup { name: "usb_audio_policy_configuration", srcs: ["usb_audio_policy_configuration.xml"], Loading services/audiopolicy/config/audio_policy_configuration_generic_configurable.xml 0 → 100644 +50 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- Copyright (C) 2020 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. --> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” --> <!-- Global configuration Decalaration --> <globalConfiguration speaker_drc_enabled="false" engine_library="configurable"/> <modules> <!-- Primary Audio HAL --> <xi:include href="primary_audio_policy_configuration.xml"/> <!-- Remote Submix Audio HAL --> <xi:include href="r_submix_audio_policy_configuration.xml"/> </modules> <!-- End of Modules section --> <!-- Volume section: IMPORTANT NOTE: Volume tables have been moved to engine configuration. Keep it here for legacy. Engine will fallback on these files if none are provided by engine. --> <xi:include href="audio_policy_volumes.xml"/> <xi:include href="default_volume_tables.xml"/> <!-- End of Volume section --> <!-- Surround Sound configuration --> <xi:include href="surround_sound_configuration_5_0.xml"/> <!-- End of Surround Sound configuration --> </audioPolicyConfiguration> Loading
services/audiopolicy/common/managerdefinitions/src/Serializer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,7 @@ struct GlobalConfigTraits struct Attributes { static constexpr const char *speakerDrcEnabled = "speaker_drc_enabled"; static constexpr const char *engineLibrarySuffix = "engine_library"; }; static status_t deserialize(const xmlNode *root, AudioPolicyConfig *config); Loading Loading @@ -687,6 +688,10 @@ status_t GlobalConfigTraits::deserialize(const xmlNode *root, AudioPolicyConfig convertTo<std::string, bool>(speakerDrcEnabled, isSpeakerDrcEnabled)) { config->setSpeakerDrcEnabled(isSpeakerDrcEnabled); } std::string engineLibrarySuffix = getXmlAttribute(cur, Attributes::engineLibrarySuffix); if (!engineLibrarySuffix.empty()) { config->setEngineLibraryNameSuffix(engineLibrarySuffix); } return NO_ERROR; } } Loading
services/audiopolicy/config/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,10 @@ filegroup { name: "audio_policy_configuration_generic", srcs: ["audio_policy_configuration_generic.xml"], } filegroup { name: "audio_policy_configuration_generic_configurable", srcs: ["audio_policy_configuration_generic_configurable.xml"], } filegroup { name: "usb_audio_policy_configuration", srcs: ["usb_audio_policy_configuration.xml"], Loading
services/audiopolicy/config/audio_policy_configuration_generic_configurable.xml 0 → 100644 +50 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- Copyright (C) 2020 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. --> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” --> <!-- Global configuration Decalaration --> <globalConfiguration speaker_drc_enabled="false" engine_library="configurable"/> <modules> <!-- Primary Audio HAL --> <xi:include href="primary_audio_policy_configuration.xml"/> <!-- Remote Submix Audio HAL --> <xi:include href="r_submix_audio_policy_configuration.xml"/> </modules> <!-- End of Modules section --> <!-- Volume section: IMPORTANT NOTE: Volume tables have been moved to engine configuration. Keep it here for legacy. Engine will fallback on these files if none are provided by engine. --> <xi:include href="audio_policy_volumes.xml"/> <xi:include href="default_volume_tables.xml"/> <!-- End of Volume section --> <!-- Surround Sound configuration --> <xi:include href="surround_sound_configuration_5_0.xml"/> <!-- End of Surround Sound configuration --> </audioPolicyConfiguration>