Merge "Add new aidl interface for android.hardware.bluetooth.audio" am: e0a7d60db0 am: 8f191590a5 am: 81bef7285c

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

Change-Id: I65a6e71722b38d7477a315fecc2326340b979c1f
This commit is contained in:
Treehugger Robot 2022-01-07 16:18:04 +00:00 committed by Automerger Merge Worker
commit a5becfbd2c
74 changed files with 2962 additions and 0 deletions

View file

@ -0,0 +1,39 @@
// 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.
aidl_interface {
name: "android.hardware.bluetooth.audio",
vendor_available: true,
srcs: ["android/hardware/bluetooth/audio/*.aidl"],
stability: "vintf",
imports: [
"android.hardware.common-V2",
"android.hardware.common.fmq-V1",
"android.hardware.audio.common",
],
backend: {
cpp: {
enabled: false,
},
java: {
sdk_version: "module_current",
enabled: false,
},
ndk: {
vndk: {
enabled: true,
},
},
},
}

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 = 1,
MPEG4_LC = 2,
MPEG4_LTP = 4,
MPEG4_SCALABLE = 8,
}

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,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 codecCapabilities;
android.hardware.bluetooth.audio.LeAudioCapabilities leAudioCapabilities;
}

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 AudioConfiguration {
android.hardware.bluetooth.audio.PcmConfiguration pcmConfig;
android.hardware.bluetooth.audio.CodecConfiguration codecConfig;
android.hardware.bluetooth.audio.LeAudioConfiguration leAudioConfig;
}

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,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="int") @VintfStability
enum BluetoothAudioStatus {
UNKNOWN = 0,
SUCCESS = 1,
UNSUPPORTED_CODEC_CONFIGURATION = 2,
FAILURE = 3,
}

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
parcelable BroadcastConfiguration {
android.hardware.bluetooth.audio.BroadcastConfiguration.BroadcastStreamMap[] streamMap;
@VintfStability
parcelable BroadcastStreamMap {
char streamHandle;
int audioChannelAllocation;
android.hardware.bluetooth.audio.LeAudioCodecConfiguration leAudioCondecConfig;
}
}

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="byte") @VintfStability
enum ChannelMode {
UNKNOWN = 1,
MONO = 2,
STEREO = 4,
}

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 CodecCapabilities {
android.hardware.bluetooth.audio.CodecType codecType;
android.hardware.bluetooth.audio.CodecCapabilities.Capabilities capabilities;
@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;
}
}

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;
@VintfStability
parcelable CodecConfiguration {
android.hardware.bluetooth.audio.CodecType codecType;
int encodedAudioBitrate;
int peerMtu;
boolean isScmstEnabled;
android.hardware.bluetooth.audio.CodecConfiguration.CodecSpecific config;
@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;
}
}

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;
@Backing(type="int") @VintfStability
enum CodecType {
UNKNOWN = 0,
SBC = 1,
AAC = 2,
APTX = 3,
APTX_HD = 4,
LDAC = 5,
LC3 = 6,
}

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
interface IBluetoothAudioPort {
android.hardware.bluetooth.audio.PresentationPosition getPresentationPosition();
void startStream();
void stopStream();
void suspendStream();
void updateMetadata(in android.hardware.audio.common.SourceMetadata sourceMetadata);
}

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
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);
void streamStarted(in android.hardware.bluetooth.audio.BluetoothAudioStatus status);
void streamSuspended(in android.hardware.bluetooth.audio.BluetoothAudioStatus status);
}

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,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 Lc3Capabilities {
byte[] pcmBitDepth;
int[] samplingFrequencyHz;
int[] frameDurationUs;
int[] octetsPerFrame;
byte[] blocksPerSdu;
}

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 Lc3Configuration {
byte pcmBitDepth;
int samplingFrequencyHz;
int frameDurationUs;
int octetsPerFrame;
byte blocksPerSdu;
}

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 = 1,
STEREO = 2,
DUAL = 4,
MONO = 8,
}

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 = 1,
MID = 2,
LOW = 4,
ABR = 8,
}

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 LeAudioCapabilities {
android.hardware.bluetooth.audio.LeAudioMode mode;
android.hardware.bluetooth.audio.CodecType codecType;
android.hardware.bluetooth.audio.AudioLocation supportedChannel;
int supportedChannelCount;
android.hardware.bluetooth.audio.LeAudioCapabilities.LeAudioCodecCapabilities leAudioCodecCapabilities;
@VintfStability
parcelable VendorCapabilities {
ParcelableHolder extension;
}
@VintfStability
union LeAudioCodecCapabilities {
android.hardware.bluetooth.audio.Lc3Capabilities lc3Capabilities;
android.hardware.bluetooth.audio.LeAudioCapabilities.VendorCapabilities vendorCapabillities;
}
}

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,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 LeAudioConfiguration {
android.hardware.bluetooth.audio.LeAudioMode mode;
android.hardware.bluetooth.audio.LeAudioConfiguration.LeAudioModeConfig modeConfig;
android.hardware.bluetooth.audio.CodecType codecType;
@VintfStability
union LeAudioModeConfig {
android.hardware.bluetooth.audio.UnicastConfiguration unicastConfig;
android.hardware.bluetooth.audio.BroadcastConfiguration broadcastConfig;
}
}

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="byte") @VintfStability
enum LeAudioMode {
UNKNOWN = 0,
UNICAST = 1,
BROADCAST = 2,
}

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 = 1,
ALLOC_MD_L = 2,
}

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 = 1,
JOINT_STEREO = 2,
STEREO = 4,
DUAL = 8,
MONO = 16,
}

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,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;
@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,
}

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 UnicastConfiguration {
android.hardware.bluetooth.audio.UnicastConfiguration.UnicastStreamMap[] streamMap;
int peerDelay;
android.hardware.bluetooth.audio.LeAudioCodecConfiguration leAudioCodecConfig;
@VintfStability
parcelable UnicastStreamMap {
char streamHandle;
int audioChannelAllocation;
}
}

View file

@ -0,0 +1,34 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AacObjectType;
import android.hardware.bluetooth.audio.ChannelMode;
/**
* Used for Hardware Encoding AAC codec capabilities
*/
@VintfStability
parcelable AacCapabilities {
/* bitfield */
AacObjectType objectType;
int[] sampleRateHz;
/* bitfield */
ChannelMode channelMode;
boolean variableBitRateSupported;
byte[] bitsPerSample;
}

View file

@ -0,0 +1,32 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AacObjectType;
import android.hardware.bluetooth.audio.ChannelMode;
/**
* Used for Hardware Encoding AAC codec configuration
*/
@VintfStability
parcelable AacConfiguration {
AacObjectType objectType;
int sampleRateHz;
ChannelMode channelMode;
boolean variableBitRateEnabled;
byte bitsPerSample;
}

View file

@ -0,0 +1,38 @@
/*
* 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.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="byte")
enum AacObjectType {
/**
* MPEG-2 Low Complexity. Support is Mandatory.
*/
MPEG2_LC = 1,
/**
* MPEG-4 Low Complexity. Support is Optional.
*/
MPEG4_LC = 1 << 1,
/**
* MPEG-4 Long Term Prediction. Support is Optional.
*/
MPEG4_LTP = 1 << 2,
/**
* MPEG-4 Scalable. Support is Optional.
*/
MPEG4_SCALABLE = 1 << 3,
}

View file

@ -0,0 +1,30 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.ChannelMode;
/**
* Used for Hardware Encoding AptX and AptX-HD codec capabilities
*/
@VintfStability
parcelable AptxCapabilities {
int[] sampleRateHz;
/* bitfield */
ChannelMode channelMode;
byte[] bitsPerSample;
}

View file

@ -0,0 +1,29 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.ChannelMode;
/**
* Used for Hardware Encoding AptX and AptX-HD codec configuration
*/
@VintfStability
parcelable AptxConfiguration {
int sampleRateHz;
ChannelMode channelMode;
byte bitsPerSample;
}

View file

@ -0,0 +1,31 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.CodecCapabilities;
import android.hardware.bluetooth.audio.LeAudioCapabilities;
import android.hardware.bluetooth.audio.PcmCapabilities;
/**
* Used to specify the capabilities of the different session types
*/
@VintfStability
union AudioCapabilities {
PcmCapabilities pcmCapabilities;
CodecCapabilities codecCapabilities;
LeAudioCapabilities leAudioCapabilities;
}

View file

@ -0,0 +1,31 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.CodecConfiguration;
import android.hardware.bluetooth.audio.LeAudioConfiguration;
import android.hardware.bluetooth.audio.PcmConfiguration;
/**
* Used to configure either a Hardware or Software Encoding session based on session type
*/
@VintfStability
union AudioConfiguration {
PcmConfiguration pcmConfig;
CodecConfiguration codecConfig;
LeAudioConfiguration leAudioConfig;
}

View file

@ -0,0 +1,25 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="int")
enum AudioLocation {
UNKNOWN = 1,
FRONT_LEFT = 1 << 1,
FRONT_RIGHT = 1 << 2,
}

View file

@ -0,0 +1,27 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="int")
enum BluetoothAudioStatus {
UNKNOWN = 0,
SUCCESS = 1,
UNSUPPORTED_CODEC_CONFIGURATION = 2,
// General failure
FAILURE = 3
}

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.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.LeAudioCodecConfiguration;
@VintfStability
parcelable BroadcastConfiguration {
@VintfStability
parcelable BroadcastStreamMap {
/*
* The connection handle used for a unicast or a broadcast group.
* Range: 0x0000 to 0xEFFF
*/
char streamHandle;
/*
* Audio channel allocation is a bit field, each enabled bit means that given audio
* direction, i.e. "left", or "right" is used. Ordering of audio channels comes from the
* least significant bit to the most significant bit.
*/
int audioChannelAllocation;
LeAudioCodecConfiguration leAudioCondecConfig;
}
BroadcastStreamMap[] streamMap;
}

View file

@ -0,0 +1,25 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="byte")
enum ChannelMode {
UNKNOWN = 1,
MONO = 1 << 1,
STEREO = 1 << 2,
}

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.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AacCapabilities;
import android.hardware.bluetooth.audio.AptxCapabilities;
import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.LdacCapabilities;
import android.hardware.bluetooth.audio.SbcCapabilities;
/**
* Used to specify the capabilities of the codecs supported by Hardware Encoding.
* AptX and AptX-HD both use the AptxCapabilities field.
*/
@VintfStability
parcelable CodecCapabilities {
@VintfStability
union Capabilities {
SbcCapabilities sbcCapabilities;
AacCapabilities aacCapabilities;
LdacCapabilities ldacCapabilities;
AptxCapabilities aptxCapabilities;
}
CodecType codecType;
Capabilities capabilities;
}

View file

@ -0,0 +1,57 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AacConfiguration;
import android.hardware.bluetooth.audio.AptxConfiguration;
import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.LdacConfiguration;
import android.hardware.bluetooth.audio.SbcConfiguration;
/**
* Used to configure a Hardware Encoding session.
* AptX and AptX-HD both use the AptxConfiguration field.
*/
@VintfStability
parcelable CodecConfiguration {
@VintfStability
union CodecSpecific {
SbcConfiguration sbcConfig;
AacConfiguration aacConfig;
LdacConfiguration ldacConfig;
AptxConfiguration aptxConfig;
}
CodecType codecType;
/**
* The encoded audio bitrate in bits / second.
* 0x00000000 - The audio bitrate is not specified / unused
* 0x00000001 - 0x00FFFFFF - Encoded audio bitrate in bits/second
* 0x01000000 - 0xFFFFFFFF - Reserved
*
* The HAL needs to support all legal bitrates for the selected codec.
*/
int encodedAudioBitrate;
/**
* Peer MTU (in two-octets)
*/
int peerMtu;
/**
* Content protection by SCMS-T
*/
boolean isScmstEnabled;
CodecSpecific config;
}

View file

@ -0,0 +1,29 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="int")
enum CodecType {
UNKNOWN,
SBC,
AAC,
APTX,
APTX_HD,
LDAC,
LC3,
}

View file

@ -0,0 +1,73 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.audio.common.SourceMetadata;
import android.hardware.bluetooth.audio.PresentationPosition;
/**
* HAL interface from the Audio HAL to the Bluetooth stack
*
* The Audio HAL calls methods in this interface to start, suspend, and stop
* an audio stream. These calls return immediately and the results, if any,
* are sent over the IBluetoothAudioProvider interface.
*
* Moreover, the Audio HAL can also get the presentation position of the stream
* and provide stream metadata.
*
*/
@VintfStability
interface IBluetoothAudioPort {
/**
* Get the audio presentation position.
*
* @return the audio presentation position
*
*/
PresentationPosition getPresentationPosition();
/**
* This indicates that the caller of this method has opened the data path
* and wants to start an audio stream. The caller must wait for a
* IBluetoothAudioProvider.streamStarted(Status) call.
*/
void startStream();
/**
* This indicates that the caller of this method wants to stop the audio
* stream. The data path will be closed after this call. There is no
* callback from the IBluetoothAudioProvider interface even though the
* teardown is asynchronous.
*/
void stopStream();
/**
* This indicates that the caller of this method wants to suspend the audio
* stream. The caller must wait for the Bluetooth process to call
* IBluetoothAudioProvider.streamSuspended(Status). The caller still keeps
* the data path open.
*/
void suspendStream();
/**
* Called when the metadata of the stream's source has been changed.
*
* @param sourceMetadata Description of the audio that is played by the
* clients.
*/
void updateMetadata(in SourceMetadata sourceMetadata);
}

View file

@ -0,0 +1,75 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AudioConfiguration;
import android.hardware.bluetooth.audio.BluetoothAudioStatus;
import android.hardware.bluetooth.audio.IBluetoothAudioPort;
import android.hardware.common.fmq.MQDescriptor;
import android.hardware.common.fmq.SynchronizedReadWrite;
/**
* HAL interface from the Bluetooth stack to the Audio HAL
*
* The Bluetooth stack calls methods in this interface to start and end audio
* sessions and sends callback events to the Audio HAL.
*
*/
@VintfStability
interface IBluetoothAudioProvider {
/**
* Ends the current session and unregisters the IBluetoothAudioPort
* interface.
*/
void endSession();
/**
* This method indicates that the Bluetooth stack is ready to stream audio.
* It registers an instance of IBluetoothAudioPort with and provides the
* current negotiated codec to the Audio HAL. After this method is called,
* the Audio HAL can invoke IBluetoothAudioPort.startStream().
*
* Note: endSession() must be called to unregister this IBluetoothAudioPort
*
* @param hostIf An instance of IBluetoothAudioPort for stream control
* @param audioConfig The audio configuration negotiated with the remote
* device. The PCM parameters are set if software based encoding,
* otherwise the correct codec configuration is used for hardware
* encoding.
*
* @return The fast message queue for audio data from/to this
* provider. Audio data will be in PCM format as specified by the
* audioConfig.pcmConfig parameter. Invalid if streaming is offloaded
* from/to hardware or on failure
*/
MQDescriptor<byte, SynchronizedReadWrite> startSession(
in IBluetoothAudioPort hostIf, in AudioConfiguration audioConfig);
/**
* Callback for IBluetoothAudioPort.startStream()
*
* @param status true for SUCCESS or false for FAILURE
*/
void streamStarted(in BluetoothAudioStatus status);
/**
* Callback for IBluetoothAudioPort.suspendStream()
*
* @param status true for SUCCESS or false for FAILURE
*/
void streamSuspended(in BluetoothAudioStatus status);
}

View file

@ -0,0 +1,65 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AudioCapabilities;
import android.hardware.bluetooth.audio.IBluetoothAudioProvider;
import android.hardware.bluetooth.audio.SessionType;
/**
* This factory allows a HAL implementation to be split into multiple
* independent providers.
*
* When the Bluetooth stack is ready to create an audio session, it must first
* obtain the IBluetoothAudioProvider for that session type by calling
* openProvider().
*
*/
@VintfStability
interface IBluetoothAudioProviderFactory {
/**
* Gets a list of audio capabilities for a session type.
*
* For software encoding, the PCM capabilities are returned.
* For hardware encoding, the supported codecs and their capabilities are
* returned.
*
* @param sessionType The session type (e.g.
* A2DP_SOFTWARE_ENCODING_DATAPATH).
* @return A list containing all the capabilities
* supported by the sesson type. The capabilities is a list of
* available options when configuring the codec for the session.
* For software encoding it is the PCM data rate.
* For hardware encoding it is the list of supported codecs and their
* capabilities.
* If a provider isn't supported, an empty list should be returned.
* Note: Only one entry should exist per codec when using hardware
* encoding.
*/
AudioCapabilities[] getProviderCapabilities(in SessionType sessionType);
/**
* Opens an audio provider for a session type. To close the provider, it is
* necessary to release references to the returned provider object.
*
* @param sessionType The session type (e.g.
* LE_AUDIO_SOFTWARE_ENCODING_DATAPATH).
*
* @return provider The provider of the specified session type
*/
IBluetoothAudioProvider openProvider(in SessionType sessionType);
}

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.
*/
package android.hardware.bluetooth.audio;
/**
* Used for Hardware Encoding/Decoding LC3 codec capabilities.
*/
@VintfStability
parcelable Lc3Capabilities {
/*
* 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;
}

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.
*/
package android.hardware.bluetooth.audio;
/**
* Used for Hardware Encoding/Decoding LC3 codec configuration.
*/
@VintfStability
parcelable Lc3Configuration {
/*
* 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;
}

View file

@ -0,0 +1,34 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.LdacChannelMode;
import android.hardware.bluetooth.audio.LdacQualityIndex;
/**
* Used for Hardware Encoding LDAC codec capabilities
* all qualities must be supported.
*/
@VintfStability
parcelable LdacCapabilities {
int[] sampleRateHz;
/* bitfiled */
LdacChannelMode channelMode;
/* bitfiled */
LdacQualityIndex qualityIndex;
byte[] bitsPerSample;
}

View file

@ -0,0 +1,29 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
/**
* Channel Mode: 3 bits
*/
@VintfStability
@Backing(type="byte")
enum LdacChannelMode {
UNKNOWN = 1,
STEREO = 1 << 1,
DUAL = 1 << 2,
MONO = 1 << 3,
}

View file

@ -0,0 +1,32 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.LdacChannelMode;
import android.hardware.bluetooth.audio.LdacQualityIndex;
/**
* Used for Hardware Encoding LDAC codec configuration
* Only used when configuring the codec.
*/
@VintfStability
parcelable LdacConfiguration {
int sampleRateHz;
LdacChannelMode channelMode;
LdacQualityIndex qualityIndex;
byte bitsPerSample;
}

View file

@ -0,0 +1,38 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="byte")
enum LdacQualityIndex {
/**
* 990kbps
*/
HIGH = 1,
/**
* 660kbps
*/
MID = 1 << 1,
/**
* 330kbps
*/
LOW = 1 << 2,
/**
* Adaptive Bit Rate mode
*/
ABR = 1 << 3,
}

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.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AudioLocation;
import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.Lc3Capabilities;
import android.hardware.bluetooth.audio.LeAudioMode;
/**
* Used to specify the capabilities of the LC3 codecs supported by Hardware Encoding.
*/
@VintfStability
parcelable LeAudioCapabilities {
@VintfStability
parcelable VendorCapabilities {
ParcelableHolder extension;
}
@VintfStability
union LeAudioCodecCapabilities {
Lc3Capabilities lc3Capabilities;
VendorCapabilities vendorCapabillities;
}
LeAudioMode mode;
CodecType codecType;
/*
* This is bitfield, if bit N is set, HW Offloader supports N+1 channels at the same time.
* Example: 0x27 = 0b00100111: One, two, three or six channels supported.
*/
AudioLocation supportedChannel;
int supportedChannelCount;
LeAudioCodecCapabilities leAudioCodecCapabilities;
}

View file

@ -0,0 +1,29 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.Lc3Configuration;
@VintfStability
union LeAudioCodecConfiguration {
@VintfStability
parcelable VendorConfiguration {
ParcelableHolder extension;
}
Lc3Configuration lc3Config;
VendorConfiguration vendorConfig;
}

View file

@ -0,0 +1,37 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.BroadcastConfiguration;
import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.LeAudioMode;
import android.hardware.bluetooth.audio.UnicastConfiguration;
@VintfStability
parcelable LeAudioConfiguration {
@VintfStability
union LeAudioModeConfig {
UnicastConfiguration unicastConfig;
BroadcastConfiguration broadcastConfig;
}
/*
* The mode of the LE audio
*/
LeAudioMode mode;
LeAudioModeConfig modeConfig;
CodecType codecType;
}

View file

@ -0,0 +1,25 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="byte")
enum LeAudioMode {
UNKNOWN,
UNICAST,
BROADCAST,
}

View file

@ -0,0 +1,33 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.ChannelMode;
/**
* Used for Software Encoding audio feed capabilities
*/
@VintfStability
parcelable PcmCapabilities {
int[] sampleRateHz;
ChannelMode channelMode;
byte[] bitsPerSample;
/**
* Data interval for data transfer
*/
int[] dataIntervalUs;
}

View file

@ -0,0 +1,33 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.ChannelMode;
/**
* Used for Software Encoding audio feed configuration
*/
@VintfStability
parcelable PcmConfiguration {
int sampleRateHz;
ChannelMode channelMode;
byte bitsPerSample;
/**
* Data interval for data transfer
*/
int dataIntervalUs;
}

View file

@ -0,0 +1,52 @@
/*
* 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.
*/
package android.hardware.bluetooth.audio;
@VintfStability
parcelable PresentationPosition {
@VintfStability
parcelable TimeSpec {
/**
* seconds
*/
long tvSec;
/**
* nanoseconds
*/
long tvNSec;
}
/*
* remoteDeviceAudioDelayNanos the audio delay from when the remote
* device (e.g. headset) receives audio data to when the device plays the
* sound. If the delay is unknown, the value is set to zero.
*/
long remoteDeviceAudioDelayNanos;
/*
* transmittedOctets the number of audio data octets that were sent
* to a remote device. This excludes octets that have been written to the
* data path but have not been sent to the remote device. The count is
* not reset until stopStream() is called. If the software data path is
* unused (e.g. Hardware Offload), the value is set to 0.
*/
long transmittedOctets;
/*
* transmittedOctetsTimestamp the value of CLOCK_MONOTONIC
* corresponding to transmittedOctets. If the software data path is
* unused (e.g., for Hardware Offload), the value is set to zero.
*/
TimeSpec transmittedOctetsTimestamp;
}

View file

@ -0,0 +1,30 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="byte")
enum SbcAllocMethod {
/**
* SNR
*/
ALLOC_MD_S = 1,
/**
* Loudness
*/
ALLOC_MD_L = 1 << 1,
}

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.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.SbcAllocMethod;
import android.hardware.bluetooth.audio.SbcChannelMode;
/**
* Used for Hardware Encoding SBC codec capabilities.
*/
@VintfStability
parcelable SbcCapabilities {
int[] sampleRateHz;
/* bitfield */
SbcChannelMode channelMode;
byte[] blockLength;
byte[] numSubbands;
/* bitfield */
SbcAllocMethod allocMethod;
byte[] bitsPerSample;
/*
* range from 2 to 250.
*/
int minBitpool;
/*
* range from 2 to 250.
*/
int maxBitpool;
}

View file

@ -0,0 +1,27 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="byte")
enum SbcChannelMode {
UNKNOWN = 1,
JOINT_STEREO = 1 << 1,
STEREO = 1 << 2,
DUAL = 1 << 3,
MONO = 1 << 4,
}

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.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.SbcAllocMethod;
import android.hardware.bluetooth.audio.SbcChannelMode;
/**
* Used for Hardware Encoding SBC codec configuration.
*/
@VintfStability
parcelable SbcConfiguration {
int sampleRateHz;
SbcChannelMode channelMode;
byte blockLength;
byte numSubbands;
SbcAllocMethod allocMethod;
byte bitsPerSample;
/*
* range from 2 to 250.
*/
int minBitpool;
/*
* range from 2 to 250.
*/
int maxBitpool;
}

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.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="byte")
enum SessionType {
UNKNOWN,
/**
* A2DP legacy that AVDTP media is encoded by Bluetooth Stack
*/
A2DP_SOFTWARE_ENCODING_DATAPATH,
/**
* The encoding of AVDTP media is done by HW and there is control only
*/
A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH,
/**
* Used when encoded by Bluetooth Stack and streaming to Hearing Aid
*/
HEARING_AID_SOFTWARE_ENCODING_DATAPATH,
/**
* Used when encoded by Bluetooth Stack and streaming to LE Audio device
*/
LE_AUDIO_SOFTWARE_ENCODING_DATAPATH,
/**
* Used when decoded by Bluetooth Stack and streaming to audio framework
*/
LE_AUDIO_SOFTWARE_DECODING_DATAPATH,
/**
* Encoding is done by HW an there is control only
*/
LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH,
/**
* Decoding is done by HW an there is control only
*/
LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH,
}

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.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.LeAudioCodecConfiguration;
@VintfStability
parcelable UnicastConfiguration {
@VintfStability
parcelable UnicastStreamMap {
/*
* The connection handle used for a unicast or a broadcast group.
* Range: 0x0000 to 0xEFFF
*/
char streamHandle;
/*
* Audio channel allocation is a bit field, each enabled bit means that given audio
* direction, i.e. "left", or "right" is used. Ordering of audio channels comes from the
* least significant bit to the most significant bit. The valus follows the Bluetooth SIG
* Audio Location assigned number.
*/
int audioChannelAllocation;
}
UnicastStreamMap[] streamMap;
int peerDelay;
LeAudioCodecConfiguration leAudioCodecConfig;
}

View file

@ -139,6 +139,13 @@
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.bluetooth.audio</name>
<interface>
<name>IBluetoothAudioProviderFactory</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.boot</name>
<version>1.2</version>