diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AudioCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AudioCapabilities.aidl index 20a7731010..43d79111d9 100644 --- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AudioCapabilities.aidl +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AudioCapabilities.aidl @@ -36,5 +36,5 @@ package android.hardware.bluetooth.audio; union AudioCapabilities { android.hardware.bluetooth.audio.PcmCapabilities pcmCapabilities; android.hardware.bluetooth.audio.CodecCapabilities codecCapabilities; - android.hardware.bluetooth.audio.LeAudioCapabilities leAudioCapabilities; + android.hardware.bluetooth.audio.LeAudioCodecCapabilitiesSetting leAudioCapabilities; } diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastCapability.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastCapability.aidl new file mode 100644 index 0000000000..58710effe7 --- /dev/null +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastCapability.aidl @@ -0,0 +1,50 @@ +/* + * Copyright 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.bluetooth.audio; +@VintfStability +parcelable BroadcastCapability { + android.hardware.bluetooth.audio.CodecType codecType; + android.hardware.bluetooth.audio.AudioLocation supportedChannel; + int channelCountPerStream; + android.hardware.bluetooth.audio.BroadcastCapability.LeAudioCodecCapabilities leAudioCodecCapabilities; + @VintfStability + parcelable VendorCapabilities { + ParcelableHolder extension; + } + @VintfStability + union LeAudioCodecCapabilities { + @nullable android.hardware.bluetooth.audio.Lc3Capabilities[] lc3Capabilities; + @nullable android.hardware.bluetooth.audio.BroadcastCapability.VendorCapabilities[] vendorCapabillities; + } +} diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastConfiguration.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastConfiguration.aidl index b3aa709ddd..5fa392631b 100644 --- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastConfiguration.aidl +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/BroadcastConfiguration.aidl @@ -39,6 +39,6 @@ parcelable BroadcastConfiguration { parcelable BroadcastStreamMap { char streamHandle; int audioChannelAllocation; - android.hardware.bluetooth.audio.LeAudioCodecConfiguration leAudioCondecConfig; + android.hardware.bluetooth.audio.LeAudioCodecConfiguration leAudioCodecConfig; } } diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl index e5e79cb1c4..0dcba2e818 100644 --- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl @@ -38,4 +38,5 @@ interface IBluetoothAudioProvider { android.hardware.common.fmq.MQDescriptor 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); + void updateAudioConfiguration(in android.hardware.bluetooth.audio.AudioConfiguration audioConfig); } diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.aidl new file mode 100644 index 0000000000..9818d543ac --- /dev/null +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.aidl @@ -0,0 +1,40 @@ +/* + * Copyright 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.bluetooth.audio; +@VintfStability +parcelable LeAudioCodecCapabilitiesSetting { + android.hardware.bluetooth.audio.UnicastCapability unicastEncodeCapability; + android.hardware.bluetooth.audio.UnicastCapability unicastDecodeCapability; + android.hardware.bluetooth.audio.BroadcastCapability broadcastCapability; +} diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl similarity index 86% rename from bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCapabilities.aidl rename to bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl index a7224ca5da..130fef971c 100644 --- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioCapabilities.aidl +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/UnicastCapability.aidl @@ -33,12 +33,12 @@ package android.hardware.bluetooth.audio; @VintfStability -parcelable LeAudioCapabilities { - android.hardware.bluetooth.audio.LeAudioMode mode; +parcelable UnicastCapability { android.hardware.bluetooth.audio.CodecType codecType; android.hardware.bluetooth.audio.AudioLocation supportedChannel; - int supportedChannelCount; - android.hardware.bluetooth.audio.LeAudioCapabilities.LeAudioCodecCapabilities leAudioCodecCapabilities; + int deviceCount; + int channelCountPerDevice; + android.hardware.bluetooth.audio.UnicastCapability.LeAudioCodecCapabilities leAudioCodecCapabilities; @VintfStability parcelable VendorCapabilities { ParcelableHolder extension; @@ -46,6 +46,6 @@ parcelable LeAudioCapabilities { @VintfStability union LeAudioCodecCapabilities { android.hardware.bluetooth.audio.Lc3Capabilities lc3Capabilities; - android.hardware.bluetooth.audio.LeAudioCapabilities.VendorCapabilities vendorCapabillities; + android.hardware.bluetooth.audio.UnicastCapability.VendorCapabilities vendorCapabillities; } } diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AudioCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AudioCapabilities.aidl index 6ed44722cc..339c475d47 100644 --- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AudioCapabilities.aidl +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AudioCapabilities.aidl @@ -17,7 +17,7 @@ package android.hardware.bluetooth.audio; import android.hardware.bluetooth.audio.CodecCapabilities; -import android.hardware.bluetooth.audio.LeAudioCapabilities; +import android.hardware.bluetooth.audio.LeAudioCodecCapabilitiesSetting; import android.hardware.bluetooth.audio.PcmCapabilities; /** @@ -27,5 +27,5 @@ import android.hardware.bluetooth.audio.PcmCapabilities; union AudioCapabilities { PcmCapabilities pcmCapabilities; CodecCapabilities codecCapabilities; - LeAudioCapabilities leAudioCapabilities; + LeAudioCodecCapabilitiesSetting leAudioCapabilities; } diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastCapability.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastCapability.aidl new file mode 100644 index 0000000000..cb63f88ea9 --- /dev/null +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastCapability.aidl @@ -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. + */ + +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 le audio broadcast codec capabilities for hardware offload. + */ +@VintfStability +parcelable BroadcastCapability { + @VintfStability + parcelable VendorCapabilities { + ParcelableHolder extension; + } + @VintfStability + union LeAudioCodecCapabilities { + @nullable Lc3Capabilities[] lc3Capabilities; + @nullable VendorCapabilities[] vendorCapabillities; + } + CodecType codecType; + AudioLocation supportedChannel; + // Supported channel count for each stream + int channelCountPerStream; + LeAudioCodecCapabilities leAudioCodecCapabilities; +} diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastConfiguration.aidl index 07d05f1bd7..cfc9d3aa01 100644 --- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastConfiguration.aidl +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BroadcastConfiguration.aidl @@ -33,7 +33,7 @@ parcelable BroadcastConfiguration { * least significant bit to the most significant bit. */ int audioChannelAllocation; - LeAudioCodecConfiguration leAudioCondecConfig; + LeAudioCodecConfiguration leAudioCodecConfig; } BroadcastStreamMap[] streamMap; } diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl index a2c5ae9a76..6f88f3041a 100644 --- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl @@ -72,4 +72,14 @@ interface IBluetoothAudioProvider { * @param status true for SUCCESS or false for FAILURE */ void streamSuspended(in BluetoothAudioStatus status); + + /** + * Called when the audio configuration of the stream has been changed. + * + * @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. + */ + void updateAudioConfiguration(in AudioConfiguration audioConfig); } diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.aidl new file mode 100644 index 0000000000..58dac06080 --- /dev/null +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.aidl @@ -0,0 +1,30 @@ +/* + * 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.BroadcastCapability; +import android.hardware.bluetooth.audio.UnicastCapability; + +/** + * Used to specify the le audio capabilities for unicast and broadcast hardware offload. + */ +@VintfStability +parcelable LeAudioCodecCapabilitiesSetting { + UnicastCapability unicastEncodeCapability; + UnicastCapability unicastDecodeCapability; + BroadcastCapability broadcastCapability; +} diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl similarity index 77% rename from bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCapabilities.aidl rename to bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl index 732427f060..cd8a4c1971 100644 --- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioCapabilities.aidl +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/UnicastCapability.aidl @@ -22,10 +22,10 @@ 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. + * Used to specify the le audio unicast codec capabilities for hardware offload. */ @VintfStability -parcelable LeAudioCapabilities { +parcelable UnicastCapability { @VintfStability parcelable VendorCapabilities { ParcelableHolder extension; @@ -35,13 +35,11 @@ parcelable LeAudioCapabilities { 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; + // The number of connected device + int deviceCount; + // Supported channel count for each device + int channelCountPerDevice; LeAudioCodecCapabilities leAudioCodecCapabilities; }