Merge "Add Opus to BT Audio HAL and update version to V2" into tm-dev am: b229ac5fd1

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

Change-Id: I39deb7786d3416eca07d4782abfc8d8a67d3a7b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Omer Osman
2022-05-13 17:16:42 +00:00
committed by Automerger Merge Worker
69 changed files with 2281 additions and 67 deletions

View File

@@ -59,6 +59,15 @@ aidl_interface {
"android.hardware.audio.common-V1", "android.hardware.audio.common-V1",
], ],
}, },
{
version: "2",
imports: [
"android.hardware.common-V2",
"android.hardware.common.fmq-V1",
"android.hardware.audio.common-V1",
],
},
], ],
} }

View File

@@ -0,0 +1 @@
b82d5b9f717bbf63bef774ee8f72572065ca61ce

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 AacCapabilities {
android.hardware.bluetooth.audio.AacObjectType[] objectType;
int[] sampleRateHz;
android.hardware.bluetooth.audio.ChannelMode[] channelMode;
boolean variableBitRateSupported;
byte[] bitsPerSample;
}

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 AacConfiguration {
android.hardware.bluetooth.audio.AacObjectType objectType;
int sampleRateHz;
android.hardware.bluetooth.audio.ChannelMode channelMode;
boolean variableBitRateEnabled;
byte bitsPerSample;
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright (C) 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="byte") @VintfStability
enum AacObjectType {
MPEG2_LC = 0,
MPEG4_LC = 1,
MPEG4_LTP = 2,
MPEG4_SCALABLE = 3,
}

View File

@@ -0,0 +1,46 @@
/*
* Copyright 2022 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 AptxAdaptiveCapabilities {
int[] sampleRateHz;
android.hardware.bluetooth.audio.AptxAdaptiveChannelMode[] channelMode;
byte[] bitsPerSample;
android.hardware.bluetooth.audio.AptxMode[] aptxMode;
android.hardware.bluetooth.audio.AptxSinkBuffering sinkBufferingMs;
android.hardware.bluetooth.audio.AptxAdaptiveTimeToPlay ttp;
android.hardware.bluetooth.audio.AptxAdaptiveInputMode inputMode;
int inputFadeDurationMs;
byte[] aptxAdaptiveConfigStream;
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2022 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;
@Backing(type="int") @VintfStability
enum AptxAdaptiveChannelMode {
JOINT_STEREO = 0,
MONO = 1,
DUAL_MONO = 2,
TWS_STEREO = 4,
UNKNOWN = 255,
}

View File

@@ -0,0 +1,46 @@
/*
* Copyright 2022 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 AptxAdaptiveConfiguration {
int sampleRateHz;
android.hardware.bluetooth.audio.AptxAdaptiveChannelMode channelMode;
byte bitsPerSample;
android.hardware.bluetooth.audio.AptxMode aptxMode;
android.hardware.bluetooth.audio.AptxSinkBuffering sinkBufferingMs;
android.hardware.bluetooth.audio.AptxAdaptiveTimeToPlay ttp;
android.hardware.bluetooth.audio.AptxAdaptiveInputMode inputMode;
int inputFadeDurationMs;
byte[] aptxAdaptiveConfigStream;
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright 2022 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;
@Backing(type="int") @VintfStability
enum AptxAdaptiveInputMode {
STEREO = 0,
DUAL_MONO = 1,
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright 2022 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 AptxAdaptiveTimeToPlay {
byte lowLowLatency;
byte highLowLatency;
byte lowHighQuality;
byte highHighQuality;
byte lowTws;
byte highTws;
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 AptxCapabilities {
int[] sampleRateHz;
android.hardware.bluetooth.audio.ChannelMode[] channelMode;
byte[] bitsPerSample;
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 AptxConfiguration {
int sampleRateHz;
android.hardware.bluetooth.audio.ChannelMode channelMode;
byte bitsPerSample;
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright 2022 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;
@Backing(type="int") @VintfStability
enum AptxMode {
UNKNOWN = 0,
HIGH_QUALITY = 4096,
LOW_LATENCY = 8192,
ULTRA_LOW_LATENCY = 16384,
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright 2022 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 AptxSinkBuffering {
byte minLowLatency;
byte maxLowLatency;
byte minHighQuality;
byte maxHighQuality;
byte minTws;
byte maxTws;
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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
union AudioCapabilities {
android.hardware.bluetooth.audio.PcmCapabilities pcmCapabilities;
android.hardware.bluetooth.audio.CodecCapabilities a2dpCapabilities;
android.hardware.bluetooth.audio.LeAudioCodecCapabilitiesSetting leAudioCapabilities;
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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
union AudioConfiguration {
android.hardware.bluetooth.audio.PcmConfiguration pcmConfig;
android.hardware.bluetooth.audio.CodecConfiguration a2dpConfig;
android.hardware.bluetooth.audio.LeAudioConfiguration leAudioConfig;
android.hardware.bluetooth.audio.LeAudioBroadcastConfiguration leAudioBroadcastConfig;
}

View File

@@ -0,0 +1,40 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="int") @VintfStability
enum AudioLocation {
UNKNOWN = 1,
FRONT_LEFT = 2,
FRONT_RIGHT = 4,
}

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="int") @VintfStability
enum BluetoothAudioStatus {
UNKNOWN = 0,
SUCCESS = 1,
UNSUPPORTED_CODEC_CONFIGURATION = 2,
FAILURE = 3,
RECONFIGURATION = 4,
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright 2022 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 BroadcastCapability {
android.hardware.bluetooth.audio.CodecType codecType;
android.hardware.bluetooth.audio.AudioLocation supportedChannel;
int channelCountPerStream;
android.hardware.bluetooth.audio.BroadcastCapability.LeAudioCodecCapabilities leAudioCodecCapabilities;
@VintfStability
parcelable VendorCapabilities {
ParcelableHolder extension;
}
@VintfStability
union LeAudioCodecCapabilities {
@nullable android.hardware.bluetooth.audio.Lc3Capabilities[] lc3Capabilities;
@nullable android.hardware.bluetooth.audio.BroadcastCapability.VendorCapabilities[] vendorCapabillities;
}
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="byte") @VintfStability
enum ChannelMode {
UNKNOWN = 0,
MONO = 1,
STEREO = 2,
DUALMONO = 3,
}

View File

@@ -0,0 +1,54 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 CodecCapabilities {
android.hardware.bluetooth.audio.CodecType codecType;
android.hardware.bluetooth.audio.CodecCapabilities.Capabilities capabilities;
@VintfStability
parcelable VendorCapabilities {
ParcelableHolder extension;
}
@VintfStability
union Capabilities {
android.hardware.bluetooth.audio.SbcCapabilities sbcCapabilities;
android.hardware.bluetooth.audio.AacCapabilities aacCapabilities;
android.hardware.bluetooth.audio.LdacCapabilities ldacCapabilities;
android.hardware.bluetooth.audio.AptxCapabilities aptxCapabilities;
android.hardware.bluetooth.audio.AptxAdaptiveCapabilities aptxAdaptiveCapabilities;
android.hardware.bluetooth.audio.Lc3Capabilities lc3Capabilities;
android.hardware.bluetooth.audio.CodecCapabilities.VendorCapabilities vendorCapabilities;
@nullable android.hardware.bluetooth.audio.OpusCapabilities opusCapabilities;
}
}

View File

@@ -0,0 +1,59 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 CodecConfiguration {
android.hardware.bluetooth.audio.CodecType codecType;
int encodedAudioBitrate;
int peerMtu;
boolean isScmstEnabled;
android.hardware.bluetooth.audio.CodecConfiguration.CodecSpecific config;
@VintfStability
parcelable VendorConfiguration {
int vendorId;
char codecId;
ParcelableHolder codecConfig;
}
@VintfStability
union CodecSpecific {
android.hardware.bluetooth.audio.SbcConfiguration sbcConfig;
android.hardware.bluetooth.audio.AacConfiguration aacConfig;
android.hardware.bluetooth.audio.LdacConfiguration ldacConfig;
android.hardware.bluetooth.audio.AptxConfiguration aptxConfig;
android.hardware.bluetooth.audio.AptxAdaptiveConfiguration aptxAdaptiveConfig;
android.hardware.bluetooth.audio.Lc3Configuration lc3Config;
android.hardware.bluetooth.audio.CodecConfiguration.VendorConfiguration vendorConfig;
@nullable android.hardware.bluetooth.audio.OpusConfiguration opusConfig;
}
}

View File

@@ -0,0 +1,47 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="int") @VintfStability
enum CodecType {
UNKNOWN = 0,
SBC = 1,
AAC = 2,
APTX = 3,
APTX_HD = 4,
LDAC = 5,
LC3 = 6,
VENDOR = 7,
APTX_ADAPTIVE = 8,
OPUS = 9,
}

View File

@@ -0,0 +1,44 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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
interface IBluetoothAudioPort {
android.hardware.bluetooth.audio.PresentationPosition getPresentationPosition();
void startStream(boolean isLowLatency);
void stopStream();
void suspendStream();
void updateSourceMetadata(in android.hardware.audio.common.SourceMetadata sourceMetadata);
void updateSinkMetadata(in android.hardware.audio.common.SinkMetadata sinkMetadata);
void setLatencyMode(in android.hardware.bluetooth.audio.LatencyMode latencyMode);
}

View File

@@ -0,0 +1,43 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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
interface IBluetoothAudioProvider {
void endSession();
android.hardware.common.fmq.MQDescriptor<byte,android.hardware.common.fmq.SynchronizedReadWrite> startSession(in android.hardware.bluetooth.audio.IBluetoothAudioPort hostIf, in android.hardware.bluetooth.audio.AudioConfiguration audioConfig, in android.hardware.bluetooth.audio.LatencyMode[] supportedLatencyModes);
void streamStarted(in android.hardware.bluetooth.audio.BluetoothAudioStatus status);
void streamSuspended(in android.hardware.bluetooth.audio.BluetoothAudioStatus status);
void updateAudioConfiguration(in android.hardware.bluetooth.audio.AudioConfiguration audioConfig);
void setLowLatencyModeAllowed(in boolean allowed);
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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
interface IBluetoothAudioProviderFactory {
android.hardware.bluetooth.audio.AudioCapabilities[] getProviderCapabilities(in android.hardware.bluetooth.audio.SessionType sessionType);
android.hardware.bluetooth.audio.IBluetoothAudioProvider openProvider(in android.hardware.bluetooth.audio.SessionType sessionType);
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2022 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;
@Backing(type="int") @VintfStability
enum LatencyMode {
UNKNOWN = 0,
LOW_LATENCY = 1,
FREE = 2,
}

View File

@@ -0,0 +1,43 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 Lc3Capabilities {
byte[] pcmBitDepth;
int[] samplingFrequencyHz;
int[] frameDurationUs;
int[] octetsPerFrame;
byte[] blocksPerSdu;
android.hardware.bluetooth.audio.ChannelMode[] channelMode;
}

View File

@@ -0,0 +1,43 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 Lc3Configuration {
byte pcmBitDepth;
int samplingFrequencyHz;
int frameDurationUs;
int octetsPerFrame;
byte blocksPerSdu;
android.hardware.bluetooth.audio.ChannelMode channelMode;
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 LdacCapabilities {
int[] sampleRateHz;
android.hardware.bluetooth.audio.LdacChannelMode[] channelMode;
android.hardware.bluetooth.audio.LdacQualityIndex[] qualityIndex;
byte[] bitsPerSample;
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="byte") @VintfStability
enum LdacChannelMode {
UNKNOWN = 0,
STEREO = 1,
DUAL = 2,
MONO = 3,
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 LdacConfiguration {
int sampleRateHz;
android.hardware.bluetooth.audio.LdacChannelMode channelMode;
android.hardware.bluetooth.audio.LdacQualityIndex qualityIndex;
byte bitsPerSample;
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="byte") @VintfStability
enum LdacQualityIndex {
HIGH = 0,
MID = 1,
LOW = 2,
ABR = 3,
}

View File

@@ -0,0 +1,45 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 LeAudioBroadcastConfiguration {
android.hardware.bluetooth.audio.CodecType codecType;
android.hardware.bluetooth.audio.LeAudioBroadcastConfiguration.BroadcastStreamMap[] streamMap;
@VintfStability
parcelable BroadcastStreamMap {
char streamHandle;
int audioChannelAllocation;
android.hardware.bluetooth.audio.LeAudioCodecConfiguration leAudioCodecConfig;
}
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2022 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 LeAudioCodecCapabilitiesSetting {
android.hardware.bluetooth.audio.UnicastCapability unicastEncodeCapability;
android.hardware.bluetooth.audio.UnicastCapability unicastDecodeCapability;
android.hardware.bluetooth.audio.BroadcastCapability broadcastCapability;
}

View File

@@ -0,0 +1,43 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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
union LeAudioCodecConfiguration {
android.hardware.bluetooth.audio.Lc3Configuration lc3Config;
android.hardware.bluetooth.audio.LeAudioCodecConfiguration.VendorConfiguration vendorConfig;
@VintfStability
parcelable VendorConfiguration {
ParcelableHolder extension;
}
}

View File

@@ -0,0 +1,46 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 LeAudioConfiguration {
android.hardware.bluetooth.audio.CodecType codecType;
android.hardware.bluetooth.audio.LeAudioConfiguration.StreamMap[] streamMap;
int peerDelayUs;
android.hardware.bluetooth.audio.LeAudioCodecConfiguration leAudioCodecConfig;
@VintfStability
parcelable StreamMap {
char streamHandle;
int audioChannelAllocation;
}
}

View File

@@ -0,0 +1,43 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 OpusCapabilities {
byte[] pcmBitDepth;
int[] samplingFrequencyHz;
int[] frameDurationUs;
int[] octetsPerFrame;
byte[] blocksPerSdu;
android.hardware.bluetooth.audio.ChannelMode[] channelMode;
}

View File

@@ -0,0 +1,43 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 OpusConfiguration {
byte pcmBitDepth;
int samplingFrequencyHz;
int frameDurationUs;
int octetsPerFrame;
byte blocksPerSdu;
android.hardware.bluetooth.audio.ChannelMode channelMode;
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 PcmCapabilities {
int[] sampleRateHz;
android.hardware.bluetooth.audio.ChannelMode[] channelMode;
byte[] bitsPerSample;
int[] dataIntervalUs;
}

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 PcmConfiguration {
int sampleRateHz;
android.hardware.bluetooth.audio.ChannelMode channelMode;
byte bitsPerSample;
int dataIntervalUs;
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (C) 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 PresentationPosition {
long remoteDeviceAudioDelayNanos;
long transmittedOctets;
android.hardware.bluetooth.audio.PresentationPosition.TimeSpec transmittedOctetsTimestamp;
@VintfStability
parcelable TimeSpec {
long tvSec;
long tvNSec;
}
}

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="byte") @VintfStability
enum SbcAllocMethod {
ALLOC_MD_S = 0,
ALLOC_MD_L = 1,
}

View File

@@ -0,0 +1,45 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 SbcCapabilities {
int[] sampleRateHz;
android.hardware.bluetooth.audio.SbcChannelMode[] channelMode;
byte[] blockLength;
byte[] numSubbands;
android.hardware.bluetooth.audio.SbcAllocMethod[] allocMethod;
byte[] bitsPerSample;
int minBitpool;
int maxBitpool;
}

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="byte") @VintfStability
enum SbcChannelMode {
UNKNOWN = 0,
JOINT_STEREO = 1,
STEREO = 2,
DUAL = 3,
MONO = 4,
}

View File

@@ -0,0 +1,45 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 SbcConfiguration {
int sampleRateHz;
android.hardware.bluetooth.audio.SbcChannelMode channelMode;
byte blockLength;
byte numSubbands;
android.hardware.bluetooth.audio.SbcAllocMethod allocMethod;
byte bitsPerSample;
int minBitpool;
int maxBitpool;
}

View File

@@ -0,0 +1,49 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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;
@Backing(type="byte") @VintfStability
enum SessionType {
UNKNOWN = 0,
A2DP_SOFTWARE_ENCODING_DATAPATH = 1,
A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH = 2,
HEARING_AID_SOFTWARE_ENCODING_DATAPATH = 3,
LE_AUDIO_SOFTWARE_ENCODING_DATAPATH = 4,
LE_AUDIO_SOFTWARE_DECODING_DATAPATH = 5,
LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH = 6,
LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH = 7,
LE_AUDIO_BROADCAST_SOFTWARE_ENCODING_DATAPATH = 8,
LE_AUDIO_BROADCAST_HARDWARE_OFFLOAD_ENCODING_DATAPATH = 9,
A2DP_SOFTWARE_DECODING_DATAPATH = 10,
A2DP_HARDWARE_OFFLOAD_DECODING_DATAPATH = 11,
}

View File

@@ -0,0 +1,51 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 UnicastCapability {
android.hardware.bluetooth.audio.CodecType codecType;
android.hardware.bluetooth.audio.AudioLocation supportedChannel;
int deviceCount;
int channelCountPerDevice;
android.hardware.bluetooth.audio.UnicastCapability.LeAudioCodecCapabilities leAudioCodecCapabilities;
@VintfStability
parcelable VendorCapabilities {
ParcelableHolder extension;
}
@VintfStability
union LeAudioCodecCapabilities {
android.hardware.bluetooth.audio.Lc3Capabilities lc3Capabilities;
android.hardware.bluetooth.audio.UnicastCapability.VendorCapabilities vendorCapabillities;
}
}

View File

@@ -37,4 +37,5 @@ enum ChannelMode {
UNKNOWN = 0, UNKNOWN = 0,
MONO = 1, MONO = 1,
STEREO = 2, STEREO = 2,
DUALMONO = 3,
} }

View File

@@ -49,5 +49,6 @@ parcelable CodecCapabilities {
android.hardware.bluetooth.audio.AptxAdaptiveCapabilities aptxAdaptiveCapabilities; android.hardware.bluetooth.audio.AptxAdaptiveCapabilities aptxAdaptiveCapabilities;
android.hardware.bluetooth.audio.Lc3Capabilities lc3Capabilities; android.hardware.bluetooth.audio.Lc3Capabilities lc3Capabilities;
android.hardware.bluetooth.audio.CodecCapabilities.VendorCapabilities vendorCapabilities; android.hardware.bluetooth.audio.CodecCapabilities.VendorCapabilities vendorCapabilities;
@nullable android.hardware.bluetooth.audio.OpusCapabilities opusCapabilities;
} }
} }

View File

@@ -54,5 +54,6 @@ parcelable CodecConfiguration {
android.hardware.bluetooth.audio.AptxAdaptiveConfiguration aptxAdaptiveConfig; android.hardware.bluetooth.audio.AptxAdaptiveConfiguration aptxAdaptiveConfig;
android.hardware.bluetooth.audio.Lc3Configuration lc3Config; android.hardware.bluetooth.audio.Lc3Configuration lc3Config;
android.hardware.bluetooth.audio.CodecConfiguration.VendorConfiguration vendorConfig; android.hardware.bluetooth.audio.CodecConfiguration.VendorConfiguration vendorConfig;
@nullable android.hardware.bluetooth.audio.OpusConfiguration opusConfig;
} }
} }

View File

@@ -43,4 +43,5 @@ enum CodecType {
LC3 = 6, LC3 = 6,
VENDOR = 7, VENDOR = 7,
APTX_ADAPTIVE = 8, APTX_ADAPTIVE = 8,
OPUS = 9,
} }

View File

@@ -0,0 +1,43 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 OpusCapabilities {
byte[] pcmBitDepth;
int[] samplingFrequencyHz;
int[] frameDurationUs;
int[] octetsPerFrame;
byte[] blocksPerSdu;
android.hardware.bluetooth.audio.ChannelMode[] channelMode;
}

View File

@@ -0,0 +1,43 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// 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 OpusConfiguration {
byte pcmBitDepth;
int samplingFrequencyHz;
int frameDurationUs;
int octetsPerFrame;
byte blocksPerSdu;
android.hardware.bluetooth.audio.ChannelMode channelMode;
}

View File

@@ -22,4 +22,5 @@ enum ChannelMode {
UNKNOWN, UNKNOWN,
MONO, MONO,
STEREO, STEREO,
DUALMONO,
} }

View File

@@ -17,11 +17,12 @@
package android.hardware.bluetooth.audio; package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AacCapabilities; import android.hardware.bluetooth.audio.AacCapabilities;
import android.hardware.bluetooth.audio.AptxCapabilities;
import android.hardware.bluetooth.audio.AptxAdaptiveCapabilities; import android.hardware.bluetooth.audio.AptxAdaptiveCapabilities;
import android.hardware.bluetooth.audio.AptxCapabilities;
import android.hardware.bluetooth.audio.CodecType; import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.Lc3Capabilities; import android.hardware.bluetooth.audio.Lc3Capabilities;
import android.hardware.bluetooth.audio.LdacCapabilities; import android.hardware.bluetooth.audio.LdacCapabilities;
import android.hardware.bluetooth.audio.OpusCapabilities;
import android.hardware.bluetooth.audio.SbcCapabilities; import android.hardware.bluetooth.audio.SbcCapabilities;
/** /**
@@ -43,6 +44,7 @@ parcelable CodecCapabilities {
AptxAdaptiveCapabilities aptxAdaptiveCapabilities; AptxAdaptiveCapabilities aptxAdaptiveCapabilities;
Lc3Capabilities lc3Capabilities; Lc3Capabilities lc3Capabilities;
VendorCapabilities vendorCapabilities; VendorCapabilities vendorCapabilities;
@nullable OpusCapabilities opusCapabilities;
} }
CodecType codecType; CodecType codecType;
Capabilities capabilities; Capabilities capabilities;

View File

@@ -17,11 +17,12 @@
package android.hardware.bluetooth.audio; package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AacConfiguration; import android.hardware.bluetooth.audio.AacConfiguration;
import android.hardware.bluetooth.audio.AptxConfiguration;
import android.hardware.bluetooth.audio.AptxAdaptiveConfiguration; import android.hardware.bluetooth.audio.AptxAdaptiveConfiguration;
import android.hardware.bluetooth.audio.AptxConfiguration;
import android.hardware.bluetooth.audio.CodecType; import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.Lc3Configuration; import android.hardware.bluetooth.audio.Lc3Configuration;
import android.hardware.bluetooth.audio.LdacConfiguration; import android.hardware.bluetooth.audio.LdacConfiguration;
import android.hardware.bluetooth.audio.OpusConfiguration;
import android.hardware.bluetooth.audio.SbcConfiguration; import android.hardware.bluetooth.audio.SbcConfiguration;
/** /**
@@ -45,6 +46,7 @@ parcelable CodecConfiguration {
AptxAdaptiveConfiguration aptxAdaptiveConfig; AptxAdaptiveConfiguration aptxAdaptiveConfig;
Lc3Configuration lc3Config; Lc3Configuration lc3Config;
VendorConfiguration vendorConfig; VendorConfiguration vendorConfig;
@nullable OpusConfiguration opusConfig;
} }
CodecType codecType; CodecType codecType;
/** /**

View File

@@ -28,4 +28,5 @@ enum CodecType {
LC3, LC3,
VENDOR, VENDOR,
APTX_ADAPTIVE, APTX_ADAPTIVE,
OPUS,
} }

View File

@@ -0,0 +1,50 @@
/*
* Copyright 2022 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.ChannelMode;
/**
* Used for Hardware Encoding/Decoding Opus codec capabilities.
*/
@VintfStability
parcelable OpusCapabilities {
/*
* PCM is Input for encoder, Output for decoder
*/
byte[] pcmBitDepth;
/*
* codec-specific parameters
*/
int[] samplingFrequencyHz;
/*
* FrameDuration based on microseconds.
*/
int[] frameDurationUs;
/*
* length in octets of a codec frame
*/
int[] octetsPerFrame;
/*
* Number of blocks of codec frames per single SDU (Service Data Unit)
*/
byte[] blocksPerSdu;
/*
* Channel mode used in A2DP special audio, ignored in standard LE Audio mode
*/
ChannelMode[] channelMode;
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright 2022 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.ChannelMode;
/**
* Used for Hardware Encoding/Decoding Opus codec configuration.
*/
@VintfStability
parcelable OpusConfiguration {
/*
* PCM is Input for encoder, Output for decoder
*/
byte pcmBitDepth;
/*
* codec-specific parameters
*/
int samplingFrequencyHz;
/*
* FrameDuration based on microseconds.
*/
int frameDurationUs;
/*
* length in octets of a codec frame
*/
int octetsPerFrame;
/*
* Number of blocks of codec frames per single SDU (Service Data Unit)
*/
byte blocksPerSdu;
/*
* Channel mode used in A2DP special audio, ignored in standard LE Audio mode
*/
ChannelMode channelMode;
}

View File

@@ -29,7 +29,7 @@ cc_library_shared {
"libcutils", "libcutils",
"libfmq", "libfmq",
"liblog", "liblog",
"android.hardware.bluetooth.audio-V1-ndk", "android.hardware.bluetooth.audio-V2-ndk",
"libbluetooth_audio_session_aidl", "libbluetooth_audio_session_aidl",
], ],
} }

View File

@@ -1,6 +1,7 @@
<manifest version="1.0" type="device"> <manifest version="1.0" type="device">
<hal format="aidl"> <hal format="aidl">
<name>android.hardware.bluetooth.audio</name> <name>android.hardware.bluetooth.audio</name>
<version>2</version>
<fqname>IBluetoothAudioProviderFactory/default</fqname> <fqname>IBluetoothAudioProviderFactory/default</fqname>
</hal> </hal>
</manifest> </manifest>

View File

@@ -17,7 +17,7 @@ cc_test {
srcs: ["VtsHalBluetoothAudioTargetTest.cpp"], srcs: ["VtsHalBluetoothAudioTargetTest.cpp"],
shared_libs: [ shared_libs: [
"android.hardware.audio.common-V1-ndk", "android.hardware.audio.common-V1-ndk",
"android.hardware.bluetooth.audio-V1-ndk", "android.hardware.bluetooth.audio-V2-ndk",
"android.hardware.common-V2-ndk", "android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk", "android.hardware.common.fmq-V1-ndk",
"libbase", "libbase",

View File

@@ -57,6 +57,8 @@ using aidl::android::hardware::bluetooth::audio::
LeAudioCodecCapabilitiesSetting; LeAudioCodecCapabilitiesSetting;
using aidl::android::hardware::bluetooth::audio::LeAudioCodecConfiguration; using aidl::android::hardware::bluetooth::audio::LeAudioCodecConfiguration;
using aidl::android::hardware::bluetooth::audio::LeAudioConfiguration; using aidl::android::hardware::bluetooth::audio::LeAudioConfiguration;
using aidl::android::hardware::bluetooth::audio::OpusCapabilities;
using aidl::android::hardware::bluetooth::audio::OpusConfiguration;
using aidl::android::hardware::bluetooth::audio::PcmConfiguration; using aidl::android::hardware::bluetooth::audio::PcmConfiguration;
using aidl::android::hardware::bluetooth::audio::PresentationPosition; using aidl::android::hardware::bluetooth::audio::PresentationPosition;
using aidl::android::hardware::bluetooth::audio::SbcAllocMethod; using aidl::android::hardware::bluetooth::audio::SbcAllocMethod;
@@ -121,9 +123,9 @@ void copy_codec_specific(CodecConfiguration::CodecSpecific& dst,
dst.set<CodecConfiguration::CodecSpecific::aptxConfig>( dst.set<CodecConfiguration::CodecSpecific::aptxConfig>(
src.get<CodecConfiguration::CodecSpecific::aptxConfig>()); src.get<CodecConfiguration::CodecSpecific::aptxConfig>());
break; break;
case CodecConfiguration::CodecSpecific::lc3Config: case CodecConfiguration::CodecSpecific::opusConfig:
dst.set<CodecConfiguration::CodecSpecific::lc3Config>( dst.set<CodecConfiguration::CodecSpecific::opusConfig>(
src.get<CodecConfiguration::CodecSpecific::lc3Config>()); src.get<CodecConfiguration::CodecSpecific::opusConfig>());
break; break;
case CodecConfiguration::CodecSpecific::aptxAdaptiveConfig: case CodecConfiguration::CodecSpecific::aptxAdaptiveConfig:
dst.set<CodecConfiguration::CodecSpecific::aptxAdaptiveConfig>( dst.set<CodecConfiguration::CodecSpecific::aptxAdaptiveConfig>(
@@ -230,11 +232,12 @@ class BluetoothAudioProviderFactoryAidl
ASSERT_EQ(codec_capabilities.capabilities.getTag(), ASSERT_EQ(codec_capabilities.capabilities.getTag(),
CodecCapabilities::Capabilities::ldacCapabilities); CodecCapabilities::Capabilities::ldacCapabilities);
break; break;
case CodecType::LC3: case CodecType::OPUS:
ASSERT_EQ(codec_capabilities.capabilities.getTag(), ASSERT_EQ(codec_capabilities.capabilities.getTag(),
CodecCapabilities::Capabilities::lc3Capabilities); CodecCapabilities::Capabilities::opusCapabilities);
break; break;
case CodecType::APTX_ADAPTIVE: case CodecType::APTX_ADAPTIVE:
case CodecType::LC3:
case CodecType::VENDOR: case CodecType::VENDOR:
case CodecType::UNKNOWN: case CodecType::UNKNOWN:
break; break;
@@ -484,39 +487,40 @@ class BluetoothAudioProviderFactoryAidl
} }
std::vector<CodecConfiguration::CodecSpecific> std::vector<CodecConfiguration::CodecSpecific>
GetLc3CodecSpecificSupportedList(bool supported) { GetOpusCodecSpecificSupportedList(bool supported) {
std::vector<CodecConfiguration::CodecSpecific> lc3_codec_specifics; std::vector<CodecConfiguration::CodecSpecific> opus_codec_specifics;
if (!supported) { if (!supported) {
Lc3Configuration lc3_config{.samplingFrequencyHz = 0, OpusConfiguration opus_config{.samplingFrequencyHz = 0,
.frameDurationUs = 0}; .frameDurationUs = 0};
lc3_codec_specifics.push_back( opus_codec_specifics.push_back(
CodecConfiguration::CodecSpecific(lc3_config)); CodecConfiguration::CodecSpecific(opus_config));
return lc3_codec_specifics; return opus_codec_specifics;
} }
GetA2dpOffloadCapabilityHelper(CodecType::LC3); GetA2dpOffloadCapabilityHelper(CodecType::OPUS);
if (temp_codec_capabilities_ == nullptr || if (temp_codec_capabilities_ == nullptr ||
temp_codec_capabilities_->codecType != CodecType::LC3) { temp_codec_capabilities_->codecType != CodecType::OPUS) {
return lc3_codec_specifics; return opus_codec_specifics;
} }
// parse the capability // parse the capability
auto& lc3_capability = auto& opus_capability =
temp_codec_capabilities_->capabilities temp_codec_capabilities_->capabilities
.get<CodecCapabilities::Capabilities::lc3Capabilities>(); .get<CodecCapabilities::Capabilities::opusCapabilities>();
// combine those parameters into one list of // combine those parameters into one list of
// CodecConfiguration::CodecSpecific // CodecConfiguration::CodecSpecific
for (int32_t samplingFrequencyHz : lc3_capability.samplingFrequencyHz) { for (int32_t samplingFrequencyHz : opus_capability->samplingFrequencyHz) {
for (int32_t frameDurationUs : lc3_capability.frameDurationUs) { for (int32_t frameDurationUs : opus_capability->frameDurationUs) {
for (auto channel_mode : lc3_capability.channelMode) { for (auto channel_mode : opus_capability->channelMode) {
Lc3Configuration lc3_data{.samplingFrequencyHz = samplingFrequencyHz, OpusConfiguration opus_data{
.channelMode = channel_mode, .samplingFrequencyHz = samplingFrequencyHz,
.frameDurationUs = frameDurationUs}; .channelMode = channel_mode,
lc3_codec_specifics.push_back( .frameDurationUs = frameDurationUs};
CodecConfiguration::CodecSpecific(lc3_data)); opus_codec_specifics.push_back(
CodecConfiguration::CodecSpecific(opus_data));
} }
} }
} }
return lc3_codec_specifics; return opus_codec_specifics;
} }
bool IsPcmConfigSupported(const PcmConfiguration& pcm_config) { bool IsPcmConfigSupported(const PcmConfiguration& pcm_config) {
@@ -762,23 +766,23 @@ TEST_P(BluetoothAudioProviderA2dpEncodingHardwareAidl,
/** /**
* Test whether each provider of type * Test whether each provider of type
* SessionType::A2DP_HARDWARE_ENCODING_DATAPATH can be started and stopped with * SessionType::A2DP_HARDWARE_ENCODING_DATAPATH can be started and stopped with
* LDAC hardware encoding config * Opus hardware encoding config
*/ */
TEST_P(BluetoothAudioProviderA2dpEncodingHardwareAidl, TEST_P(BluetoothAudioProviderA2dpEncodingHardwareAidl,
StartAndEndA2dpLc3EncodingHardwareSession) { StartAndEndA2dpOpusEncodingHardwareSession) {
if (!IsOffloadSupported()) { if (!IsOffloadSupported()) {
return; return;
} }
CodecConfiguration codec_config = { CodecConfiguration codec_config = {
.codecType = CodecType::LC3, .codecType = CodecType::OPUS,
.encodedAudioBitrate = 990000, .encodedAudioBitrate = 990000,
.peerMtu = 1005, .peerMtu = 1005,
.isScmstEnabled = false, .isScmstEnabled = false,
}; };
auto lc3_codec_specifics = GetLc3CodecSpecificSupportedList(true); auto opus_codec_specifics = GetOpusCodecSpecificSupportedList(true);
for (auto& codec_specific : lc3_codec_specifics) { for (auto& codec_specific : opus_codec_specifics) {
copy_codec_specific(codec_config.config, codec_specific); copy_codec_specific(codec_config.config, codec_specific);
DataMQDesc mq_desc; DataMQDesc mq_desc;
auto aidl_retval = audio_provider_->startSession( auto aidl_retval = audio_provider_->startSession(
@@ -855,10 +859,11 @@ TEST_P(BluetoothAudioProviderA2dpEncodingHardwareAidl,
case CodecType::APTX_HD: case CodecType::APTX_HD:
codec_specifics = GetAptxCodecSpecificSupportedList(true, false); codec_specifics = GetAptxCodecSpecificSupportedList(true, false);
break; break;
case CodecType::LC3: case CodecType::OPUS:
codec_specifics = GetLc3CodecSpecificSupportedList(false); codec_specifics = GetOpusCodecSpecificSupportedList(false);
continue; continue;
case CodecType::APTX_ADAPTIVE: case CodecType::APTX_ADAPTIVE:
case CodecType::LC3:
case CodecType::VENDOR: case CodecType::VENDOR:
case CodecType::UNKNOWN: case CodecType::UNKNOWN:
codec_specifics.clear(); codec_specifics.clear();
@@ -1788,23 +1793,23 @@ TEST_P(BluetoothAudioProviderA2dpDecodingHardwareAidl,
/** /**
* Test whether each provider of type * Test whether each provider of type
* SessionType::A2DP_HARDWARE_DECODING_DATAPATH can be started and stopped with * SessionType::A2DP_HARDWARE_DECODING_DATAPATH can be started and stopped with
* LDAC hardware encoding config * Opus hardware encoding config
*/ */
TEST_P(BluetoothAudioProviderA2dpDecodingHardwareAidl, TEST_P(BluetoothAudioProviderA2dpDecodingHardwareAidl,
StartAndEndA2dpLc3DecodingHardwareSession) { StartAndEndA2dpOpusDecodingHardwareSession) {
if (!IsOffloadSupported()) { if (!IsOffloadSupported()) {
return; return;
} }
CodecConfiguration codec_config = { CodecConfiguration codec_config = {
.codecType = CodecType::LC3, .codecType = CodecType::OPUS,
.encodedAudioBitrate = 990000, .encodedAudioBitrate = 990000,
.peerMtu = 1005, .peerMtu = 1005,
.isScmstEnabled = false, .isScmstEnabled = false,
}; };
auto lc3_codec_specifics = GetLc3CodecSpecificSupportedList(true); auto opus_codec_specifics = GetOpusCodecSpecificSupportedList(true);
for (auto& codec_specific : lc3_codec_specifics) { for (auto& codec_specific : opus_codec_specifics) {
copy_codec_specific(codec_config.config, codec_specific); copy_codec_specific(codec_config.config, codec_specific);
DataMQDesc mq_desc; DataMQDesc mq_desc;
auto aidl_retval = audio_provider_->startSession( auto aidl_retval = audio_provider_->startSession(
@@ -1881,10 +1886,11 @@ TEST_P(BluetoothAudioProviderA2dpDecodingHardwareAidl,
case CodecType::APTX_HD: case CodecType::APTX_HD:
codec_specifics = GetAptxCodecSpecificSupportedList(true, false); codec_specifics = GetAptxCodecSpecificSupportedList(true, false);
break; break;
case CodecType::LC3: case CodecType::OPUS:
codec_specifics = GetLc3CodecSpecificSupportedList(false); codec_specifics = GetOpusCodecSpecificSupportedList(false);
continue; continue;
case CodecType::APTX_ADAPTIVE: case CodecType::APTX_ADAPTIVE:
case CodecType::LC3:
case CodecType::VENDOR: case CodecType::VENDOR:
case CodecType::UNKNOWN: case CodecType::UNKNOWN:
codec_specifics.clear(); codec_specifics.clear();

View File

@@ -51,7 +51,7 @@ cc_library_shared {
"libbinder_ndk", "libbinder_ndk",
"libfmq", "libfmq",
"liblog", "liblog",
"android.hardware.bluetooth.audio-V1-ndk", "android.hardware.bluetooth.audio-V2-ndk",
"libhidlbase", "libhidlbase",
], ],
} }

View File

@@ -26,6 +26,8 @@
#include <aidl/android/hardware/bluetooth/audio/LdacChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/LdacChannelMode.h>
#include <aidl/android/hardware/bluetooth/audio/LdacQualityIndex.h> #include <aidl/android/hardware/bluetooth/audio/LdacQualityIndex.h>
#include <aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.h>
#include <aidl/android/hardware/bluetooth/audio/OpusCapabilities.h>
#include <aidl/android/hardware/bluetooth/audio/OpusConfiguration.h>
#include <aidl/android/hardware/bluetooth/audio/SbcCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/SbcCapabilities.h>
#include <aidl/android/hardware/bluetooth/audio/SbcChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/SbcChannelMode.h>
#include <android-base/logging.h> #include <android-base/logging.h>
@@ -78,9 +80,9 @@ static const AptxCapabilities kDefaultOffloadAptxHdCapability = {
.bitsPerSample = {24}, .bitsPerSample = {24},
}; };
static const Lc3Capabilities kDefaultA2dpOffloadLc3Capability = { static const OpusCapabilities kDefaultOffloadOpusCapability = {
.samplingFrequencyHz = {44100, 48000}, .samplingFrequencyHz = {48000},
.frameDurationUs = {7500, 10000}, .frameDurationUs = {10000, 20000},
.channelMode = {ChannelMode::MONO, ChannelMode::STEREO}, .channelMode = {ChannelMode::MONO, ChannelMode::STEREO},
}; };
@@ -90,7 +92,7 @@ const std::vector<CodecCapabilities> kDefaultOffloadA2dpCodecCapabilities = {
{.codecType = CodecType::LDAC, .capabilities = {}}, {.codecType = CodecType::LDAC, .capabilities = {}},
{.codecType = CodecType::APTX, .capabilities = {}}, {.codecType = CodecType::APTX, .capabilities = {}},
{.codecType = CodecType::APTX_HD, .capabilities = {}}, {.codecType = CodecType::APTX_HD, .capabilities = {}},
{.codecType = CodecType::LC3, .capabilities = {}}}; {.codecType = CodecType::OPUS, .capabilities = {}}};
std::vector<LeAudioCodecCapabilitiesSetting> kDefaultOffloadLeAudioCapabilities; std::vector<LeAudioCodecCapabilitiesSetting> kDefaultOffloadLeAudioCapabilities;
@@ -294,22 +296,24 @@ bool BluetoothAudioCodecs::IsOffloadAptxHdConfigurationValid(
return false; return false;
} }
bool BluetoothAudioCodecs::IsOffloadLc3ConfigurationValid( bool BluetoothAudioCodecs::IsOffloadOpusConfigurationValid(
const CodecConfiguration::CodecSpecific& codec_specific) { const CodecConfiguration::CodecSpecific& codec_specific) {
if (codec_specific.getTag() != CodecConfiguration::CodecSpecific::lc3Config) { if (codec_specific.getTag() !=
CodecConfiguration::CodecSpecific::opusConfig) {
LOG(WARNING) << __func__ LOG(WARNING) << __func__
<< ": Invalid CodecSpecific=" << codec_specific.toString(); << ": Invalid CodecSpecific=" << codec_specific.toString();
return false; return false;
} }
const Lc3Configuration lc3_data = std::optional<OpusConfiguration> opus_data =
codec_specific.get<CodecConfiguration::CodecSpecific::lc3Config>(); codec_specific.get<CodecConfiguration::CodecSpecific::opusConfig>();
if (ContainedInVector(kDefaultA2dpOffloadLc3Capability.samplingFrequencyHz, if (opus_data.has_value() &&
lc3_data.samplingFrequencyHz) && ContainedInVector(kDefaultOffloadOpusCapability.samplingFrequencyHz,
ContainedInVector(kDefaultA2dpOffloadLc3Capability.frameDurationUs, opus_data->samplingFrequencyHz) &&
lc3_data.frameDurationUs) && ContainedInVector(kDefaultOffloadOpusCapability.frameDurationUs,
ContainedInVector(kDefaultA2dpOffloadLc3Capability.channelMode, opus_data->frameDurationUs) &&
lc3_data.channelMode)) { ContainedInVector(kDefaultOffloadOpusCapability.channelMode,
opus_data->channelMode)) {
return true; return true;
} }
LOG(WARNING) << __func__ LOG(WARNING) << __func__
@@ -371,13 +375,14 @@ BluetoothAudioCodecs::GetA2dpOffloadCodecCapabilities(
.set<CodecCapabilities::Capabilities::aptxCapabilities>( .set<CodecCapabilities::Capabilities::aptxCapabilities>(
kDefaultOffloadAptxHdCapability); kDefaultOffloadAptxHdCapability);
break; break;
case CodecType::LC3: case CodecType::OPUS:
codec_capability.capabilities codec_capability.capabilities
.set<CodecCapabilities::Capabilities::lc3Capabilities>( .set<CodecCapabilities::Capabilities::opusCapabilities>(
kDefaultA2dpOffloadLc3Capability); kDefaultOffloadOpusCapability);
break; break;
case CodecType::UNKNOWN: case CodecType::UNKNOWN:
case CodecType::VENDOR: case CodecType::VENDOR:
case CodecType::LC3:
case CodecType::APTX_ADAPTIVE: case CodecType::APTX_ADAPTIVE:
break; break;
} }
@@ -438,12 +443,13 @@ bool BluetoothAudioCodecs::IsOffloadCodecConfigurationValid(
return true; return true;
} }
break; break;
case CodecType::LC3: case CodecType::OPUS:
if (IsOffloadLc3ConfigurationValid(codec_specific)) { if (IsOffloadOpusConfigurationValid(codec_specific)) {
return true; return true;
} }
break; break;
case CodecType::APTX_ADAPTIVE: case CodecType::APTX_ADAPTIVE:
case CodecType::LC3:
case CodecType::UNKNOWN: case CodecType::UNKNOWN:
case CodecType::VENDOR: case CodecType::VENDOR:
break; break;

View File

@@ -18,9 +18,9 @@
#include <aidl/android/hardware/bluetooth/audio/CodecCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/CodecCapabilities.h>
#include <aidl/android/hardware/bluetooth/audio/CodecConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/CodecConfiguration.h>
#include <aidl/android/hardware/bluetooth/audio/Lc3Configuration.h>
#include <aidl/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.h>
#include <aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.h>
#include <aidl/android/hardware/bluetooth/audio/OpusConfiguration.h>
#include <aidl/android/hardware/bluetooth/audio/PcmCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/PcmCapabilities.h>
#include <aidl/android/hardware/bluetooth/audio/PcmConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/PcmConfiguration.h>
#include <aidl/android/hardware/bluetooth/audio/SessionType.h> #include <aidl/android/hardware/bluetooth/audio/SessionType.h>
@@ -71,7 +71,7 @@ class BluetoothAudioCodecs {
const CodecConfiguration::CodecSpecific& codec_specific); const CodecConfiguration::CodecSpecific& codec_specific);
static bool IsOffloadAptxHdConfigurationValid( static bool IsOffloadAptxHdConfigurationValid(
const CodecConfiguration::CodecSpecific& codec_specific); const CodecConfiguration::CodecSpecific& codec_specific);
static bool IsOffloadLc3ConfigurationValid( static bool IsOffloadOpusConfigurationValid(
const CodecConfiguration::CodecSpecific& codec_specific); const CodecConfiguration::CodecSpecific& codec_specific);
}; };

View File

@@ -142,6 +142,7 @@
</hal> </hal>
<hal format="aidl" optional="true"> <hal format="aidl" optional="true">
<name>android.hardware.bluetooth.audio</name> <name>android.hardware.bluetooth.audio</name>
<version>2</version>
<interface> <interface>
<name>IBluetoothAudioProviderFactory</name> <name>IBluetoothAudioProviderFactory</name>
<instance>default</instance> <instance>default</instance>

View File

@@ -142,6 +142,7 @@
</hal> </hal>
<hal format="aidl" optional="true"> <hal format="aidl" optional="true">
<name>android.hardware.bluetooth.audio</name> <name>android.hardware.bluetooth.audio</name>
<version>2</version>
<interface> <interface>
<name>IBluetoothAudioProviderFactory</name> <name>IBluetoothAudioProviderFactory</name>
<instance>default</instance> <instance>default</instance>