Merge "BT: Aptx-Adaptive AIDL changes" am: 303c0f1eb9

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

Change-Id: I5a417c5c117303c4c66a5d9439b2730de1f22c7c
This commit is contained in:
Alice Kuo
2022-02-08 23:12:41 +00:00
committed by Automerger Merge Worker
21 changed files with 518 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.audio;
@VintfStability
parcelable AptxAdaptiveCapabilities {
int[] sampleRateHz;
android.hardware.bluetooth.audio.AptxAdaptiveChannelMode[] channelMode;
byte[] bitsPerSample;
android.hardware.bluetooth.audio.AptxMode[] aptxMode;
android.hardware.bluetooth.audio.AptxSinkBuffering sinkBufferingMs;
android.hardware.bluetooth.audio.AptxAdaptiveTimeToPlay ttp;
android.hardware.bluetooth.audio.AptxAdaptiveInputMode inputMode;
int inputFadeDurationMs;
byte[] aptxAdaptiveConfigStream;
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.audio;
@Backing(type="int") @VintfStability
enum AptxAdaptiveChannelMode {
JOINT_STEREO = 0,
MONO = 1,
DUAL_MONO = 2,
TWS_STEREO = 4,
UNKNOWN = 255,
}

View File

@@ -0,0 +1,46 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.audio;
@VintfStability
parcelable AptxAdaptiveConfiguration {
int sampleRateHz;
android.hardware.bluetooth.audio.AptxAdaptiveChannelMode channelMode;
byte bitsPerSample;
android.hardware.bluetooth.audio.AptxMode aptxMode;
android.hardware.bluetooth.audio.AptxSinkBuffering sinkBufferingMs;
android.hardware.bluetooth.audio.AptxAdaptiveTimeToPlay ttp;
android.hardware.bluetooth.audio.AptxAdaptiveInputMode inputMode;
int inputFadeDurationMs;
byte[] aptxAdaptiveConfigStream;
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.audio;
@Backing(type="int") @VintfStability
enum AptxAdaptiveInputMode {
STEREO = 0,
DUAL_MONO = 1,
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.audio;
@VintfStability
parcelable AptxAdaptiveTimeToPlay {
byte lowLowLatency;
byte highLowLatency;
byte lowHighQuality;
byte highHighQuality;
byte lowTws;
byte highTws;
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.audio;
@Backing(type="int") @VintfStability
enum AptxMode {
UNKNOWN = 0,
HIGH_QUALITY = 4096,
LOW_LATENCY = 8192,
ULTRA_LOW_LATENCY = 16384,
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.bluetooth.audio;
@VintfStability
parcelable AptxSinkBuffering {
byte minLowLatency;
byte maxLowLatency;
byte minHighQuality;
byte maxHighQuality;
byte minTws;
byte maxTws;
}

View File

@@ -46,6 +46,7 @@ parcelable CodecCapabilities {
android.hardware.bluetooth.audio.AacCapabilities aacCapabilities;
android.hardware.bluetooth.audio.LdacCapabilities ldacCapabilities;
android.hardware.bluetooth.audio.AptxCapabilities aptxCapabilities;
android.hardware.bluetooth.audio.AptxAdaptiveCapabilities aptxAdaptiveCapabilities;
android.hardware.bluetooth.audio.Lc3Capabilities lc3Capabilities;
android.hardware.bluetooth.audio.CodecCapabilities.VendorCapabilities vendorCapabilities;
}

View File

@@ -51,6 +51,7 @@ parcelable CodecConfiguration {
android.hardware.bluetooth.audio.AacConfiguration aacConfig;
android.hardware.bluetooth.audio.LdacConfiguration ldacConfig;
android.hardware.bluetooth.audio.AptxConfiguration aptxConfig;
android.hardware.bluetooth.audio.AptxAdaptiveConfiguration aptxAdaptiveConfig;
android.hardware.bluetooth.audio.Lc3Configuration lc3Config;
android.hardware.bluetooth.audio.CodecConfiguration.VendorConfiguration vendorConfig;
}

View File

@@ -42,4 +42,5 @@ enum CodecType {
LDAC = 5,
LC3 = 6,
VENDOR = 7,
APTX_ADAPTIVE = 8,
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AptxAdaptiveChannelMode;
import android.hardware.bluetooth.audio.AptxMode;
import android.hardware.bluetooth.audio.AptxSinkBuffering;
import android.hardware.bluetooth.audio.AptxAdaptiveTimeToPlay;
import android.hardware.bluetooth.audio.AptxAdaptiveInputMode;
@VintfStability
parcelable AptxAdaptiveCapabilities {
int[] sampleRateHz;
AptxAdaptiveChannelMode[] channelMode;
byte[] bitsPerSample;
AptxMode[] aptxMode;
AptxSinkBuffering sinkBufferingMs;
AptxAdaptiveTimeToPlay ttp;
AptxAdaptiveInputMode inputMode;
int inputFadeDurationMs;
byte[] aptxAdaptiveConfigStream;
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="int")
enum AptxAdaptiveChannelMode {
/* Joint Stereo - default mode */
JOINT_STEREO = 0,
/* Legacy Mono */
MONO = 1,
/* Two streams L & R in a single channel (TWS) */
DUAL_MONO = 2,
/* Stereo - For TWS+ where L and R are different links */
TWS_STEREO = 4,
UNKNOWN = 0xFF,
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AptxAdaptiveChannelMode;
import android.hardware.bluetooth.audio.AptxMode;
import android.hardware.bluetooth.audio.AptxSinkBuffering;
import android.hardware.bluetooth.audio.AptxAdaptiveTimeToPlay;
import android.hardware.bluetooth.audio.AptxAdaptiveInputMode;
@VintfStability
parcelable AptxAdaptiveConfiguration {
int sampleRateHz;
AptxAdaptiveChannelMode channelMode;
byte bitsPerSample;
AptxMode aptxMode;
AptxSinkBuffering sinkBufferingMs;
AptxAdaptiveTimeToPlay ttp;
AptxAdaptiveInputMode inputMode;
int inputFadeDurationMs;
byte[] aptxAdaptiveConfigStream;
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -18,6 +18,7 @@ package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AacCapabilities;
import android.hardware.bluetooth.audio.AptxCapabilities;
import android.hardware.bluetooth.audio.AptxAdaptiveCapabilities;
import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.Lc3Capabilities;
import android.hardware.bluetooth.audio.LdacCapabilities;
@@ -39,6 +40,7 @@ parcelable CodecCapabilities {
AacCapabilities aacCapabilities;
LdacCapabilities ldacCapabilities;
AptxCapabilities aptxCapabilities;
AptxAdaptiveCapabilities aptxAdaptiveCapabilities;
Lc3Capabilities lc3Capabilities;
VendorCapabilities vendorCapabilities;
}

View File

@@ -18,6 +18,7 @@ package android.hardware.bluetooth.audio;
import android.hardware.bluetooth.audio.AacConfiguration;
import android.hardware.bluetooth.audio.AptxConfiguration;
import android.hardware.bluetooth.audio.AptxAdaptiveConfiguration;
import android.hardware.bluetooth.audio.CodecType;
import android.hardware.bluetooth.audio.Lc3Configuration;
import android.hardware.bluetooth.audio.LdacConfiguration;
@@ -41,6 +42,7 @@ parcelable CodecConfiguration {
AacConfiguration aacConfig;
LdacConfiguration ldacConfig;
AptxConfiguration aptxConfig;
AptxAdaptiveConfiguration aptxAdaptiveConfig;
Lc3Configuration lc3Config;
VendorConfiguration vendorConfig;
}

View File

@@ -27,4 +27,5 @@ enum CodecType {
LDAC,
LC3,
VENDOR,
APTX_ADAPTIVE,
}

View File

@@ -356,6 +356,7 @@ BluetoothAudioCodecs::GetA2dpOffloadCodecCapabilities(
break;
case CodecType::UNKNOWN:
case CodecType::VENDOR:
case CodecType::APTX_ADAPTIVE:
break;
}
}
@@ -419,6 +420,7 @@ bool BluetoothAudioCodecs::IsOffloadCodecConfigurationValid(
return true;
}
break;
case CodecType::APTX_ADAPTIVE:
case CodecType::UNKNOWN:
case CodecType::VENDOR:
break;
@@ -487,4 +489,4 @@ BluetoothAudioCodecs::GetLeAudioOffloadCodecCapabilities(
} // namespace bluetooth
} // namespace hardware
} // namespace android
} // namespace aidl
} // namespace aidl