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

Commit 754875ec authored by Ytai Ben-tsvi's avatar Ytai Ben-tsvi Committed by Android (Google) Code Review
Browse files

Merge changes from topic "aidlize-audioflinger"

* changes:
  Remove manual parceling from Interpolator and VolumeShaper
  Make use of AIDL unions.
  Convert AudioFlinger create* arguments to AIDL
  Small fixes to AidlConversion
  Correctly set offload info in AudioTrack
parents 8005db47 f0658f4e
Loading
Loading
Loading
Loading

Android.bp

0 → 100644
+27 −0
Original line number Original line Diff line number Diff line
aidl_interface {
    name: "av-types-aidl",
    unstable: true,
    host_supported: true,
    vendor_available: true,
    double_loadable: true,
    local_include_dir: "aidl",
    srcs: [
        "aidl/android/media/InterpolatorConfig.aidl",
        "aidl/android/media/InterpolatorType.aidl",
        "aidl/android/media/VolumeShaperConfiguration.aidl",
        "aidl/android/media/VolumeShaperConfigurationOptionFlag.aidl",
        "aidl/android/media/VolumeShaperConfigurationType.aidl",
        "aidl/android/media/VolumeShaperOperation.aidl",
        "aidl/android/media/VolumeShaperOperationFlag.aidl",
        "aidl/android/media/VolumeShaperState.aidl",
    ],
    backend: {
        cpp: {
            min_sdk_version: "29",
            apex_available: [
                "//apex_available:platform",
                "com.android.media",
            ],
        },
    },
}
+31 −0
Original line number Original line Diff line number Diff line
/*
 * 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.
 */

package android.media;

import android.media.InterpolatorType;

/**
 * {@hide}
 */
parcelable InterpolatorConfig {
    InterpolatorType type;
    /** For cubic interpolation, the boundary conditions in slope. */
    float firstSlope;
    float lastSlope;
    /** A flattened list of <x, y> pairs, monotonically increasing in x. */
    float[] xy;
}
+34 −0
Original line number Original line Diff line number Diff line
/*
 * 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.
 */
package android.media;

/**
 * Polynomial spline interpolators.
 *
 * {@hide}
 */
@Backing(type="int")
enum InterpolatorType {
    /** Not continuous. */
    STEP,
    /** C0. */
    LINEAR,
    /** C1. */
    CUBIC,
    /** C1 (to provide locally monotonic curves). */
    CUBIC_MONOTONIC,
    // CUBIC_C2, // TODO - requires global computation / cache
}
+33 −0
Original line number Original line Diff line number Diff line
/*
 * 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.
 */

package android.media;

import android.media.InterpolatorConfig;
import android.media.VolumeShaperConfigurationOptionFlag;
import android.media.VolumeShaperConfigurationType;

/**
 * {@hide}
 */
parcelable VolumeShaperConfiguration {
    VolumeShaperConfigurationType type;
    int id;
    /** Bitmask, indexed by VolumeShaperConfigurationOptionFlag. */
    int optionFlags;
    double durationMs;
    InterpolatorConfig interpolatorConfig;
}
+3 −6
Original line number Original line Diff line number Diff line
@@ -16,10 +16,7 @@
package android.media;
package android.media;


@Backing(type="int")
@Backing(type="int")
enum AudioSessionType {
enum VolumeShaperConfigurationOptionFlag {
    DEVICE = -2,
    VOLUME_IN_DBFS,
    OUTPUT_STAGE = -1,
    CLOCK_TIME,
    OUTPUT_MIX = 0,
    ALLOCATE = 0,
    NONE = 0,
}
}
Loading