AIDL API Review changes
Test: m
Bug: 319669518
Change-Id: I9f6bb9479c5432b87c01b522a8b0e3211bfc030c
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecParameters.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecParameters.aidl
index 60cf82a..ac63c28 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecParameters.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecParameters.aidl
@@ -39,7 +39,7 @@
int bitdepth;
int minBitrate;
int maxBitrate;
- boolean lowLatency;
- boolean lossless;
+ boolean lowLatency = false;
+ boolean lossless = false;
byte[] vendorSpecificParameters;
}
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 87401ff..0707d8f 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
@@ -41,7 +41,7 @@
void updateAudioConfiguration(in android.hardware.bluetooth.audio.AudioConfiguration audioConfig);
void setLowLatencyModeAllowed(in boolean allowed);
android.hardware.bluetooth.audio.A2dpStatus parseA2dpConfiguration(in android.hardware.bluetooth.audio.CodecId codecId, in byte[] configuration, out android.hardware.bluetooth.audio.CodecParameters codecParameters);
- @nullable android.hardware.bluetooth.audio.A2dpConfiguration getA2dpConfiguration(in List<android.hardware.bluetooth.audio.A2dpRemoteCapabilities> remoteA2dpCapabilities, in android.hardware.bluetooth.audio.A2dpConfigurationHint hint);
+ @nullable android.hardware.bluetooth.audio.A2dpConfiguration getA2dpConfiguration(in android.hardware.bluetooth.audio.A2dpRemoteCapabilities[] remoteA2dpCapabilities, in android.hardware.bluetooth.audio.A2dpConfigurationHint hint);
void setCodecPriority(in android.hardware.bluetooth.audio.CodecId codecId, int priority);
List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting> getLeAudioAseConfiguration(in @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities> remoteSinkAudioCapabilities, in @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities> remoteSourceAudioCapabilities, in List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement> requirements);
android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationPair getLeAudioAseQosConfiguration(in android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationRequirement qosRequirement);
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpConfiguration.aidl
index a7fd9ff..db5212f 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpConfiguration.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpConfiguration.aidl
@@ -26,6 +26,7 @@
parcelable A2dpConfiguration {
/**
* Remote Stream Endpoint Identifier
+ * This matches `A2dpRemoteCapabilities.seid` given by the framework.
*/
int remoteSeid;
@@ -35,7 +36,7 @@
* `configuration`. Using `id.a2dp`, the format is given by the `Codec
* Specific Information Elements` [A2DP - 4.3-6.2], and using `id.vendor`,
* by `Vendor Specific Value` [A2DP - 4.7.2].
- * In any case, this byte array is limited by the framework to 128 Bytes.
+ * In any case, this byte array must be limited to 128 bytes.
*/
CodecId id;
CodecParameters parameters;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpRemoteCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpRemoteCapabilities.aidl
index 87277f1..224bb60 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpRemoteCapabilities.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpRemoteCapabilities.aidl
@@ -25,6 +25,8 @@
parcelable A2dpRemoteCapabilities {
/**
* Remote Stream Endpoint identifier
+ * Allocated by the remote device to identify a specific codec and capabilities,
+ * in the meaning of the AVDTP standard.
*/
int seid;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpStreamConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpStreamConfiguration.aidl
index 2a0c4d8..b8521f4 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpStreamConfiguration.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/A2dpStreamConfiguration.aidl
@@ -21,7 +21,9 @@
@VintfStability
parcelable A2dpStreamConfiguration {
/**
- * Peer MTU (16 bits)
+ * Peer Maximum Transfer Unit (MTU), 16 bits value [Core - 3.A.5.1]
+ * It's the remote device indication of the maximum amount of data that
+ * can be received on the AVDTP Stream Channel.
*/
int peerMtu;
@@ -29,6 +31,7 @@
* Optional SCMS-T Content Protection header
* that precedes audio content when enabled [A2DP - 3.2.1-2].
* The content protection byte is defined by [Assigned Number - 6.3.2].
+ * When the content protection is not enabled, this field should be left `null`.
*/
@nullable byte[1] cpHeaderScmst;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecParameters.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecParameters.aidl
index b6f8a94..37f8942 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecParameters.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecParameters.aidl
@@ -35,24 +35,29 @@
int bitdepth;
/**
- * Encoding parameters:
- *
- * - Bitrate limits on a frame basis, defined in bits per second.
- * The encoder bitrate mode can be encoded following this rule:
- * . minBitrate equals to maxBitrate for constant bitrate
- * . minBitrate set to 0, for VBR with peak bitrate at maxBitratre value.
- * . minBitrate greater than 0, for ABR, the bitrate of the stream varies
- * between minBitrate to maxBitrate according to link quality.
- * The 0 value for both means "undefined" or "don't care".
- *
- * - Low-latency configuration privileged
- * - Lossless effort indication. The 'False' value can be used as "don't care"
+ * Bitrate limits on a frame basis, defined in bits per second.
+ * The encoder bitrate mode can be encoded following this rule:
+ * . minBitrate equals to maxBitrate for constant bitrate
+ * . minBitrate set to 0, for VBR with peak bitrate at maxBitratre value.
+ * . minBitrate greater than 0, for ABR, the bitrate of the stream varies
+ * between minBitrate to maxBitrate according to link quality.
+ * The 0 value for both means "undefined" or "don't care".
*/
int minBitrate;
int maxBitrate;
- boolean lowLatency;
- boolean lossless;
+ /**
+ * Low-latency configuration. The interpretation is vendor specific.
+ * When returned to the client, the assessment of the low latency configuration is left
+ * to the vendor's discretion. When set by the client, it indicates that we are entering
+ * a low-latency context (e.g. gaming), and such a configuration should be privileged.
+ */
+ boolean lowLatency = false;
+
+ /**
+ * Lossless effort indication. The 'False' value can be used as "don't care"
+ */
+ boolean lossless = false;
/**
* Vendor specific parameters, inserted in the Vendor Specific HCI Command
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
index 8c6fe69..82da863 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
@@ -133,7 +133,7 @@
* when no suitable configuration has been found.
*/
@nullable A2dpConfiguration getA2dpConfiguration(
- in List<A2dpRemoteCapabilities> remoteA2dpCapabilities, in A2dpConfigurationHint hint);
+ in A2dpRemoteCapabilities[] remoteA2dpCapabilities, in A2dpConfigurationHint hint);
/**
* Set specific codec priority