Add HFP AIDL design am: e50be86fd4

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2774933

Change-Id: I77bd9347d6b226b5320a021e239d2f63d7232a0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Yuyang Huang
2023-12-07 17:08:23 +00:00
committed by Automerger Merge Worker
6 changed files with 104 additions and 0 deletions

View File

@@ -38,4 +38,5 @@ union AudioConfiguration {
android.hardware.bluetooth.audio.CodecConfiguration a2dpConfig;
android.hardware.bluetooth.audio.LeAudioConfiguration leAudioConfig;
android.hardware.bluetooth.audio.LeAudioBroadcastConfiguration leAudioBroadcastConfig;
android.hardware.bluetooth.audio.HfpConfiguration hfpConfig;
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright 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.bluetooth.audio;
@VintfStability
parcelable HfpConfiguration {
android.hardware.bluetooth.audio.CodecId codecId;
int connectionHandle;
boolean nrec;
boolean controllerCodec;
}

View File

@@ -46,4 +46,7 @@ enum SessionType {
LE_AUDIO_BROADCAST_HARDWARE_OFFLOAD_ENCODING_DATAPATH,
A2DP_SOFTWARE_DECODING_DATAPATH,
A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH,
HFP_SOFTWARE_ENCODING_DATAPATH,
HFP_SOFTWARE_DECODING_DATAPATH,
HFP_HARDWARE_OFFLOAD_DATAPATH,
}

View File

@@ -17,6 +17,7 @@
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.CodecConfiguration;
import android.hardware.bluetooth.audio.HfpConfiguration;
import android.hardware.bluetooth.audio.LeAudioBroadcastConfiguration;
import android.hardware.bluetooth.audio.LeAudioConfiguration;
import android.hardware.bluetooth.audio.PcmConfiguration;
@@ -30,4 +31,5 @@ union AudioConfiguration {
CodecConfiguration a2dpConfig;
LeAudioConfiguration leAudioConfig;
LeAudioBroadcastConfiguration leAudioBroadcastConfig;
HfpConfiguration hfpConfig;
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 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.bluetooth.audio;
import android.hardware.bluetooth.audio.CodecId;
@VintfStability
parcelable HfpConfiguration {
/**
* Codec identifier.
*/
CodecId codecId;
/**
* The connection handle used for SCO connection.
* Range: 0x0000 to 0x0EFF.
*/
int connectionHandle;
/**
* Echo canceling and noise reduction functions resident in the AG.
*/
boolean nrec;
/**
* Indicate whether the codec is encoded and decoded in the controller.
* If the codec is inside the DSP, then it would be transparent mode.
*/
boolean controllerCodec;
}

View File

@@ -70,4 +70,17 @@ enum SessionType {
* The decoding of AVDTP media is done by HW and there is control only
*/
A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH,
/**
* Used when audio is encoded by Bluetooth Stack and is streaming to HFP device.
*/
HFP_SOFTWARE_ENCODING_DATAPATH,
/**
* Used when audio is decoded by Bluetooth Stack and is streaming to HFP device.
*/
HFP_SOFTWARE_DECODING_DATAPATH,
/**
* Used when encoded and decoded by hardware offload and is streamed to HFP device.
* This is a control path only.
*/
HFP_HARDWARE_OFFLOAD_DATAPATH,
}