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

Commit 5c862f3a authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

Spatializer load doesn't fail for spatialized masks

Do not report an error is the spatializer effect doesn't
support SPATIALIZER_PARAM_SUPPORTED_CHANNEL_MASKS or
reports an empty list as not all implementations may
have been updated to support it.

Bug: 377582613
Flag: android.media.audio.spatializer_capabilities
Test: adb shell dumpsys audio | grep "Spatial audio" -A 7
Change-Id: I8c955496f75d167b46e812b79a0d970f8ed27581
parent 7dfeaa17
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -418,11 +418,13 @@ status_t Spatializer::loadEngineConfiguration(sp<EffectHalInterface> effect) {
                                   &spatializedChannelMasks);
    if (status != NO_ERROR) {
        ALOGW("%s: cannot get SPATIALIZER_PARAM_SPATIALIZED_CHANNEL_MASKS", __func__);
        return status;
        // do not return an error yet as spatializer implementations may not have been
        // updated yet to support this parameter
    }
    if (spatializedChannelMasks.empty()) {
        ALOGW("%s: SPATIALIZER_PARAM_SPATIALIZED_CHANNEL_MASKS reports empty", __func__);
        return BAD_VALUE;
        // do not return an error yet as spatializer implementations may not have been
        // updated yet to support this parameter
    }
    for (const audio_channel_mask_t spatializedMask : spatializedChannelMasks) {
        // spatialized masks must be contained in the supported input masks