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

Commit 852dac2c authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7731944 from 8b6fe3a4 to sc-v2-release

Change-Id: I35430a63ece1b358f08f775ef4fa737d49eae07b
parents 73f80c33 8b6fe3a4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -394,6 +394,7 @@ aidl_interface {
        "aidl/android/media/DeviceRole.aidl",
        "aidl/android/media/SoundTriggerSession.aidl",
        "aidl/android/media/SpatializationLevel.aidl",
        "aidl/android/media/SpatializationMode.aidl",
        "aidl/android/media/SpatializerHeadTrackingMode.aidl",
    ],
    imports: [
+17 −5
Original line number Diff line number Diff line
@@ -17,17 +17,29 @@
package android.media;

import android.media.SpatializationLevel;
import android.media.SpatializerHeadTrackingMode;

/**
 * The INativeSpatializerCallback interface is a callback associated to the
 * ISpatializer interface. The callback is used by the spatializer stage
 * implementation in native audio server to communicate stage changes to the
 * ISpatializer interface. The callback is used by the spatializer
 * implementation in native audio server to communicate state changes to the
 * client controlling the spatializer with the ISpatializer interface.
 * {@hide}
 */
interface INativeSpatializerCallback {
    /** Called when the spatialization level applied by the vitualizer stage changes
oneway interface INativeSpatializerCallback {
    /** Called when the spatialization level applied by the spatializer changes
     * (e.g. when the spatializer is enabled or disabled)
     */
    oneway void onLevelChanged(SpatializationLevel level);
    void onLevelChanged(SpatializationLevel level);

    /** Called when the head tracking mode has changed
     */
    void onHeadTrackingModeChanged(SpatializerHeadTrackingMode mode);

    /** Called when the head to stage pose hase been updated
     * The head to stage pose is conveyed as a vector of 6 elements,
     * where the first three are a translation vector and
     * the last three are a rotation vector.
     */
    void onHeadToSoundStagePoseUpdated(in float[] headToStage);
}
+38 −1
Original line number Diff line number Diff line
@@ -17,8 +17,10 @@
package android.media;

import android.media.SpatializationLevel;
import android.media.SpatializationMode;
import android.media.SpatializerHeadTrackingMode;


/**
 * The ISpatializer interface is used to control the native audio service implementation
 * of the spatializer stage with headtracking when present on a platform.
@@ -64,6 +66,41 @@ interface ISpatializer {
    /** Reset the head tracking algorithm to consider current head pose as neutral */
    void recenterHeadTracker();

    /** Set the screen to stage transform to use by the head tracking algorithm */
    /** Set the screen to stage transform to use by the head tracking algorithm
     * The screen to stage transform is conveyed as a vector of 6 elements,
     * where the first three are a translation vector and
     * the last three are a rotation vector.
     */
    void setGlobalTransform(in float[] screenToStage);

    /**
     * Set the sensor that is to be used for head-tracking.
     * -1 can be used to disable head-tracking.
     */
    void setHeadSensor(int sensorHandle);

    /**
     * Set the sensor that is to be used for screen-tracking.
     * -1 can be used to disable screen-tracking.
     */
    void setScreenSensor(int sensorHandle);

    /**
     * Sets the display orientation.
     * Orientation is expressed in the angle of rotation from the physical "up" side of the screen
     * to the logical "up" side of the content displayed the screen. Counterclockwise angles, as
     * viewed while facing the screen are positive.
     */
    void setDisplayOrientation(float physicalToLogicalAngle);

    /**
     * Sets the hinge angle for foldable devices.
     */
    void setHingeAngle(float hingeAngle);

    /** Reports the list of supported spatialization modess (see SpatializationMode.aidl).
     * The list should never be empty if an ISpatializer interface was successfully
     * retrieved with IAudioPolicyService.getSpatializer().
     */
    SpatializationMode[] getSupportedModes();
}
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
package android.media;

/**
 * The spatialization level or mode supported by the spatializer stage effect implementation.
 * The spatialization level supported by the spatializer stage effect implementation.
 * Used by methods of the ISpatializer interface.
 * {@hide}
 */
+30 −0
Original line number Diff line number Diff line
/*
 * Copyright 2021 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;

/**
 * The spatialization mode supported by the spatializer stage effect implementation.
 * Used by methods of the ISpatializer interface.
 * {@hide}
 */
@Backing(type="byte")
enum SpatializationMode {
    /** The spatializer supports binaural mode (over headphones type devices). */
    SPATIALIZATER_BINAURAL = 0,
    /** The spatializer supports transaural mode (over speaker type devices). */
    SPATIALIZATER_TRANSAURAL = 1,
}
Loading