Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8475ae5d authored by François Gaffie's avatar François Gaffie Committed by Mikhail Naganov
Browse files

audiopolicy: managerdefinitions: add attribute for engine dynamic loading



This CL updates the parser to support a new attributes in GlobalConfiguration
in order to support dynamic loading of engine.
The given value shall be <<none>|default|configurable>
XSD for HAL v6.0 has been updated accordingly.

Bug: 141989952
Test: build & audio check

Change-Id: I5774597e252261d8369cd7dc3cce9bb7056e1569
Signed-off-by: default avatarFrançois Gaffie <francois.gaffie@renault.com>
parent 9c3728b0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -200,6 +200,7 @@ struct GlobalConfigTraits
    {
        static constexpr const char *speakerDrcEnabled = "speaker_drc_enabled";
        static constexpr const char *callScreenModeSupported= "call_screen_mode_supported";
        static constexpr const char *engineLibrarySuffix = "engine_library";
    };

    static status_t deserialize(const xmlNode *root, AudioPolicyConfig *config);
@@ -692,6 +693,11 @@ status_t GlobalConfigTraits::deserialize(const xmlNode *root, AudioPolicyConfig
                    convertTo<std::string, bool>(attr, value)) {
                config->setCallScreenModeSupported(value);
            }
            std::string engineLibrarySuffix = getXmlAttribute(cur, Attributes::engineLibrarySuffix);
            if (!engineLibrarySuffix.empty()) {
                config->setEngineLibraryNameSuffix(engineLibrarySuffix);
            }
            return NO_ERROR;
        }
    }
    return NO_ERROR;
+4 −0
Original line number Diff line number Diff line
@@ -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"],
+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>