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

Commit 478565dd authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11517367 from da8f5210 to 24Q2-release

Change-Id: I7e22fbfa12698012c89dd24e92db0e222c4570dc
parents 8ff22ca4 da8f5210
Loading
Loading
Loading
Loading

media/Android.mk

deleted100644 → 0
+0 −5
Original line number Diff line number Diff line
LOCAL_PATH := $(call my-dir)

$(eval $(call declare-1p-copy-files,frameworks/av/media/libeffects,audio_effects.conf))
$(eval $(call declare-1p-copy-files,frameworks/av/media/libeffects,audio_effects.xml))
$(eval $(call declare-1p-copy-files,frameworks/av/media/libstagefright,))
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ cc_aconfig_library {
    name: "android.media.codec-aconfig-cc",
    min_sdk_version: "30",
    vendor_available: true,
    double_loadable: true,
    apex_available: [
        "//apex_available:platform",
        "com.android.media.swcodec",
+7 −0
Original line number Diff line number Diff line
@@ -70,6 +70,13 @@ support."
    is_exported: true
}

flag {
    name: "mute_background_audio"
    namespace: "media_audio"
    description: "mute audio playing in background"
    bug: "296232417"
}

flag {
    name: "sco_managed_by_audio"
    namespace: "media_audio"
+1 −24
Original line number Diff line number Diff line
@@ -205,30 +205,7 @@ Component::Component(
        mDeathContext(nullptr) {
    // Retrieve supported parameters from store
    // TODO: We could cache this per component/interface type
    if (MultiAccessUnitHelper::isEnabledOnPlatform()) {
        c2_status_t err = C2_OK;
        C2ComponentDomainSetting domain;
        std::vector<std::unique_ptr<C2Param>> heapParams;
        err = component->intf()->query_vb({&domain}, {}, C2_MAY_BLOCK, &heapParams);
        if (err == C2_OK && (domain.value == C2Component::DOMAIN_AUDIO)) {
            std::vector<std::shared_ptr<C2ParamDescriptor>> params;
            bool isComponentSupportsLargeAudioFrame = false;
            component->intf()->querySupportedParams_nb(&params);
            for (const auto &paramDesc : params) {
                if (paramDesc->name().compare(C2_PARAMKEY_OUTPUT_LARGE_FRAME) == 0) {
                    isComponentSupportsLargeAudioFrame = true;
                    LOG(VERBOSE) << "Underlying component supports large frame audio";
                    break;
                }
            }
            if (!isComponentSupportsLargeAudioFrame) {
                mMultiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>(
                        component->intf(),
                        std::static_pointer_cast<C2ReflectorHelper>(
                                ::android::GetCodec2PlatformComponentStore()->getParamReflector()));
            }
        }
    }
    mMultiAccessUnitIntf = store->tryCreateMultiAccessUnitInterface(component->intf());
    mInterface = SharedRefBase::make<ComponentInterface>(
            component->intf(), mMultiAccessUnitIntf, store->getParameterCache());
    mInit = mInterface->status();
+29 −3
Original line number Diff line number Diff line
@@ -131,9 +131,35 @@ struct CompIntf : public ConfigurableC2Intf {
    virtual c2_status_t querySupportedValues(
            std::vector<C2FieldSupportedValuesQuery>& fields,
            c2_blocking_t mayBlock) const override {
        c2_status_t err = mIntf->querySupportedValues_vb(fields, mayBlock);
        if (mMultiAccessUnitIntf != nullptr) {
            err = mMultiAccessUnitIntf->querySupportedValues(fields, mayBlock);
        if (mMultiAccessUnitIntf == nullptr) {
           return  mIntf->querySupportedValues_vb(fields, mayBlock);
        }
        std::vector<C2FieldSupportedValuesQuery> dup = fields;
        std::vector<C2FieldSupportedValuesQuery> queryArray[2];
        std::map<C2ParamField, std::pair<uint32_t, size_t>> queryMap;
        c2_status_t err = C2_OK;
        for (int i = 0 ; i < fields.size(); i++) {
            const C2ParamField &field = fields[i].field();
            uint32_t queryArrayIdx = 1;
            if (mMultiAccessUnitIntf->isValidField(fields[i].field())) {
                queryArrayIdx = 0;
            }
            queryMap[field] = std::make_pair(
                    queryArrayIdx, queryArray[queryArrayIdx].size());
            queryArray[queryArrayIdx].push_back(fields[i]);
        }
        if (queryArray[0].size() > 0) {
            err = mMultiAccessUnitIntf->querySupportedValues(queryArray[0], mayBlock);
        }
        if (queryArray[1].size() > 0) {
             err = mIntf->querySupportedValues_vb(queryArray[1], mayBlock);
        }
        for (int i = 0 ; i < dup.size(); i++) {
            auto it = queryMap.find(dup[i].field());
            if (it != queryMap.end()) {
                std::pair<uint32_t, size_t> queryid = it->second;
                fields[i] = queryArray[queryid.first][queryid.second];
            }
        }
        return err;
    }
Loading