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

Commit 4282822c authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Automerger Merge Worker
Browse files

Merge changes from topic "CAP_AIDL_AUDIO_HAL" into main am: a73556cb

parents a9da6295 a73556cb
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -26,6 +26,25 @@ namespace android {

using StreamTypeVector = std::vector<audio_stream_type_t>;

/**
 * Legacy audio policy product strategies IDs. These strategies are supported by the default
 * policy engine.
 */
enum legacy_strategy {
    STRATEGY_NONE = -1,
    STRATEGY_MEDIA,
    STRATEGY_PHONE,
    STRATEGY_SONIFICATION,
    STRATEGY_SONIFICATION_RESPECTFUL,
    STRATEGY_DTMF,
    STRATEGY_ENFORCED_AUDIBLE,
    STRATEGY_TRANSMITTED_THROUGH_SPEAKER,
    STRATEGY_ACCESSIBILITY,
    STRATEGY_REROUTING,
    STRATEGY_CALL_ASSISTANT,
    STRATEGY_PATCH,
};

static const audio_attributes_t defaultAttr = AUDIO_ATTRIBUTES_INITIALIZER;

static const std::set<audio_usage_t > gHighPriorityUseCases = {
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ public:
    static const constexpr char* const kDefaultConfigSource = "AudioPolicyConfig::setDefault";
    // The suffix of the "engine default" implementation shared library name.
    static const constexpr char* const kDefaultEngineLibraryNameSuffix = "default";
    static const constexpr char* const kCapEngineLibraryNameSuffix = "configurable";

    // Creates the default (fallback) configuration.
    static sp<const AudioPolicyConfig> createDefault();
+3 −0
Original line number Diff line number Diff line
@@ -269,6 +269,9 @@ status_t AudioPolicyConfig::loadFromAidl(const media::AudioPolicyConfig& aidl) {
    mSurroundFormats = VALUE_OR_RETURN_STATUS(
            aidl2legacy_SurroundSoundConfig_SurroundFormats(aidl.surroundSoundConfig));
    mSource = kAidlConfigSource;
    if (aidl.engineConfig.capSpecificConfig.has_value()) {
        setEngineLibraryNameSuffix(kCapEngineLibraryNameSuffix);
    }
    // No need to augmentData() as AIDL HAL must provide correct mic addresses.
    return NO_ERROR;
}
+1 −0
Original line number Diff line number Diff line
@@ -64,5 +64,6 @@ cc_library_static {
    ],
    defaults: [
        "aconfig_lib_cc_static_link.defaults",
        "latest_android_media_audio_common_types_cpp_static",
    ],
}
+2 −0
Original line number Diff line number Diff line
@@ -129,6 +129,8 @@ public:

    product_strategy_t getProductStrategyByName(const std::string &name) const;

    std::string getProductStrategyName(product_strategy_t id) const;

    AudioPolicyManagerObserver *getApmObserver() const { return mApmObserver; }

    inline bool isInCall() const
Loading