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

Commit cf72a5fb authored by Shunkai Yao's avatar Shunkai Yao Committed by Automerger Merge Worker
Browse files

Merge "Effect AIDL: Add default extension with vector<uint8_t>" am: c2e1b5f7

parents 79262a24 c2e1b5f7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ aidl_interface {
        "android/hardware/audio/effect/BassBoost.aidl",
        "android/hardware/audio/effect/Capability.aidl",
        "android/hardware/audio/effect/CommandId.aidl",
        "android/hardware/audio/effect/DefaultExtension.aidl",
        "android/hardware/audio/effect/Descriptor.aidl",
        "android/hardware/audio/effect/Downmix.aidl",
        "android/hardware/audio/effect/DynamicsProcessing.aidl",
+38 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 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.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.audio.effect;
@VintfStability
parcelable DefaultExtension {
  byte[] bytes;
}
+38 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 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.
 */

package android.hardware.audio.effect;

/**
 * The default extension used for Parameter.Specific.vendorEffect ParcelableHolder.
 *
 * The audio framework attach this default extension to the ParcelableHolder in VendorExtension,
 * and pass though all parameters it received from the client to audio HAL.
 *
 * For now it's not possible for vendor to define their own vendor extensions without changing the
 * audio framework. More specificly, in order to add a customized effect parameter AIDL parcelable,
 * vendors need to add the logic for conversion between AIDL and effect_param_t for the effect AIDL
 * in: frameworks/av/media/libaudiohal/impl/effectAidlConversion.
 *
 * There is no VTS test cases for the vendor extension effect implementation, however all effect
 * implementations must support the common parameters defined in Parameter.aidl, so vendor
 * extension effect implementation still need to support setting and getting of these common
 * parameters, which is enforced by VTS.
 */
@VintfStability
parcelable DefaultExtension {
    byte[] bytes;
}
+2 −5
Original line number Diff line number Diff line
@@ -107,11 +107,8 @@ ndk::ScopedAStatus EffectImpl::getParameter(const Parameter::Id& id, Parameter*
                                     "CommonParamNotSupported");
            break;
        }
        case Parameter::Id::vendorEffectTag: {
            LOG(DEBUG) << __func__ << " noop for vendor tag";
            return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT,
                                                                    "vendortagNotSupported");
        }
        case Parameter::Id::vendorEffectTag:
            FALLTHROUGH_INTENDED;
        default: {
            Parameter::Specific specific;
            RETURN_IF_ASTATUS_NOT_OK(getParameterSpecific(id, &specific), "SpecParamNotSupported");
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
        <library name="virtualizersw" path="libvirtualizersw.so"/>
        <library name="visualizer" path="libvisualizeraidl.so"/>
        <library name="volumesw" path="libvolumesw.so"/>
        <library name="extensioneffect" path="libextensioneffect.so"/>
    </libraries>

    <!-- list of effects to load.
@@ -95,6 +96,7 @@
            <libsw library="equalizersw" uuid="0bed4300-847d-11df-bb17-0002a5d5c51b"/>
            <libsw library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/>
        </effectProxy>
        <effect name="extensioneffect" library="extensioneffect" uuid="fa81dd00-588b-11ed-9b6a-0242ac120002"/>
    </effects>

    <!-- Audio pre processor configurations.
Loading