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

Commit 9db1ca74 authored by Hayden Gomes's avatar Hayden Gomes Committed by Android (Google) Code Review
Browse files

Merge changes from topic "AudioControl AIDL"

* changes:
  Adding VTS tests for AudioControl AIDL HAL
  Default implementation for AudioControl AIDL HAL
  Adding AIDL version of AudioControl HAL
parents dce9676f a521acf0
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
// This is the expected build file, but it may not be right in all cases

aidl_interface {
    name: "android.hardware.automotive.audiocontrol",
    vendor_available: true,
    srcs: ["android/hardware/automotive/audiocontrol/*.aidl"],
    stability: "vintf",
    backend: {
        java: {
            sdk_version: "module_current",
        },
    },
}
+29 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files 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.automotive.audiocontrol;
@Backing(type="int") @VintfStability
enum AudioFocusChange {
  NONE = 0,
  GAIN = 1,
  GAIN_TRANSIENT = 2,
  GAIN_TRANSIENT_MAY_DUCK = 3,
  GAIN_TRANSIENT_EXCLUSIVE = 4,
  LOSS = -1,
  LOSS_TRANSIENT = -2,
  LOSS_TRANSIENT_CAN_DUCK = -3,
}
+25 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files 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.automotive.audiocontrol;
@VintfStability
interface IAudioControl {
  oneway void onAudioFocusChange(in String usage, in int zoneId, in android.hardware.automotive.audiocontrol.AudioFocusChange focusChange);
  oneway void registerFocusListener(in android.hardware.automotive.audiocontrol.IFocusListener listener);
  oneway void setBalanceTowardRight(in float value);
  oneway void setFadeTowardFront(in float value);
}
+23 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files 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.automotive.audiocontrol;
@VintfStability
interface IFocusListener {
  oneway void abandonAudioFocus(in String usage, in int zoneId);
  oneway void requestAudioFocus(in String usage, in int zoneId, in android.hardware.automotive.audiocontrol.AudioFocusChange focusGain);
}
+33 −0
Original line number 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.hardware.automotive.audiocontrol;

/**
 * Changes in audio focus that can be experienced
 */
@VintfStability
@Backing(type="int")
enum AudioFocusChange {
    NONE = 0,
    GAIN = 1,
    GAIN_TRANSIENT = 2,
    GAIN_TRANSIENT_MAY_DUCK = 3,
    GAIN_TRANSIENT_EXCLUSIVE = 4,
    LOSS = -1, // -1 * GAIN,
    LOSS_TRANSIENT = -2, // -1 * GAIN_TRANSIENT,
    LOSS_TRANSIENT_CAN_DUCK = -3, // -1 * GAIN_TRANSIENT_MAY_DUCK,
}
 No newline at end of file
Loading