BtAudio: Replace bitmask capabilities with vector
Bug: 203490261
Test: m android.hardware.bluetooth.audio-update-api
Change-Id: I258e9912ab740990cab61772f0d6893a64d372d9
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacCapabilities.aidl
index ad44c26..899b8ca 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacCapabilities.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacCapabilities.aidl
@@ -34,9 +34,9 @@
package android.hardware.bluetooth.audio;
@VintfStability
parcelable AacCapabilities {
- android.hardware.bluetooth.audio.AacObjectType objectType;
+ android.hardware.bluetooth.audio.AacObjectType[] objectType;
int[] sampleRateHz;
- android.hardware.bluetooth.audio.ChannelMode channelMode;
+ android.hardware.bluetooth.audio.ChannelMode[] channelMode;
boolean variableBitRateSupported;
byte[] bitsPerSample;
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacObjectType.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacObjectType.aidl
index c129c66..2148244 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacObjectType.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AacObjectType.aidl
@@ -34,8 +34,8 @@
package android.hardware.bluetooth.audio;
@Backing(type="byte") @VintfStability
enum AacObjectType {
- MPEG2_LC = 1,
- MPEG4_LC = 2,
- MPEG4_LTP = 4,
- MPEG4_SCALABLE = 8,
+ MPEG2_LC = 0,
+ MPEG4_LC = 1,
+ MPEG4_LTP = 2,
+ MPEG4_SCALABLE = 3,
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxCapabilities.aidl
index 4767b69..08a38e2 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxCapabilities.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/AptxCapabilities.aidl
@@ -35,6 +35,6 @@
@VintfStability
parcelable AptxCapabilities {
int[] sampleRateHz;
- android.hardware.bluetooth.audio.ChannelMode channelMode;
+ android.hardware.bluetooth.audio.ChannelMode[] channelMode;
byte[] bitsPerSample;
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ChannelMode.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ChannelMode.aidl
index 3ca93c3..c3bc741 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ChannelMode.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ChannelMode.aidl
@@ -34,7 +34,7 @@
package android.hardware.bluetooth.audio;
@Backing(type="byte") @VintfStability
enum ChannelMode {
- UNKNOWN = 1,
- MONO = 2,
- STEREO = 4,
+ UNKNOWN = 0,
+ MONO = 1,
+ STEREO = 2,
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacCapabilities.aidl
index 19e041a..aa4e4c8 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacCapabilities.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacCapabilities.aidl
@@ -35,7 +35,7 @@
@VintfStability
parcelable LdacCapabilities {
int[] sampleRateHz;
- android.hardware.bluetooth.audio.LdacChannelMode channelMode;
- android.hardware.bluetooth.audio.LdacQualityIndex qualityIndex;
+ android.hardware.bluetooth.audio.LdacChannelMode[] channelMode;
+ android.hardware.bluetooth.audio.LdacQualityIndex[] qualityIndex;
byte[] bitsPerSample;
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacChannelMode.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacChannelMode.aidl
index a9d6c5e..88d6faf 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacChannelMode.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacChannelMode.aidl
@@ -34,8 +34,8 @@
package android.hardware.bluetooth.audio;
@Backing(type="byte") @VintfStability
enum LdacChannelMode {
- UNKNOWN = 1,
- STEREO = 2,
- DUAL = 4,
- MONO = 8,
+ UNKNOWN = 0,
+ STEREO = 1,
+ DUAL = 2,
+ MONO = 3,
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacQualityIndex.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacQualityIndex.aidl
index 693392f..35e4358 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacQualityIndex.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LdacQualityIndex.aidl
@@ -34,8 +34,8 @@
package android.hardware.bluetooth.audio;
@Backing(type="byte") @VintfStability
enum LdacQualityIndex {
- HIGH = 1,
- MID = 2,
- LOW = 4,
- ABR = 8,
+ HIGH = 0,
+ MID = 1,
+ LOW = 2,
+ ABR = 3,
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/PcmCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/PcmCapabilities.aidl
index 6cfe5cd..0c2f87d 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/PcmCapabilities.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/PcmCapabilities.aidl
@@ -35,7 +35,7 @@
@VintfStability
parcelable PcmCapabilities {
int[] sampleRateHz;
- android.hardware.bluetooth.audio.ChannelMode channelMode;
+ android.hardware.bluetooth.audio.ChannelMode[] channelMode;
byte[] bitsPerSample;
int[] dataIntervalUs;
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcAllocMethod.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcAllocMethod.aidl
index 5170f16..091f6d7 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcAllocMethod.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcAllocMethod.aidl
@@ -34,6 +34,6 @@
package android.hardware.bluetooth.audio;
@Backing(type="byte") @VintfStability
enum SbcAllocMethod {
- ALLOC_MD_S = 1,
- ALLOC_MD_L = 2,
+ ALLOC_MD_S = 0,
+ ALLOC_MD_L = 1,
}
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcCapabilities.aidl
index ec3aa0f..c8d7e7e 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcCapabilities.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcCapabilities.aidl
@@ -35,10 +35,10 @@
@VintfStability
parcelable SbcCapabilities {
int[] sampleRateHz;
- android.hardware.bluetooth.audio.SbcChannelMode channelMode;
+ android.hardware.bluetooth.audio.SbcChannelMode[] channelMode;
byte[] blockLength;
byte[] numSubbands;
- android.hardware.bluetooth.audio.SbcAllocMethod allocMethod;
+ android.hardware.bluetooth.audio.SbcAllocMethod[] allocMethod;
byte[] bitsPerSample;
int minBitpool;
int maxBitpool;
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcChannelMode.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcChannelMode.aidl
index 88fca4a..6441a99 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcChannelMode.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/SbcChannelMode.aidl
@@ -34,9 +34,9 @@
package android.hardware.bluetooth.audio;
@Backing(type="byte") @VintfStability
enum SbcChannelMode {
- UNKNOWN = 1,
- JOINT_STEREO = 2,
- STEREO = 4,
- DUAL = 8,
- MONO = 16,
+ UNKNOWN = 0,
+ JOINT_STEREO = 1,
+ STEREO = 2,
+ DUAL = 3,
+ MONO = 4,
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacCapabilities.aidl
index 4303883..c4153e9 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacCapabilities.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacCapabilities.aidl
@@ -24,11 +24,9 @@
*/
@VintfStability
parcelable AacCapabilities {
- /* bitfield */
- AacObjectType objectType;
+ AacObjectType[] objectType;
int[] sampleRateHz;
- /* bitfield */
- ChannelMode channelMode;
+ ChannelMode[] channelMode;
boolean variableBitRateSupported;
byte[] bitsPerSample;
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacObjectType.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacObjectType.aidl
index 480e422..4e9958c 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacObjectType.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AacObjectType.aidl
@@ -22,17 +22,17 @@
/**
* MPEG-2 Low Complexity. Support is Mandatory.
*/
- MPEG2_LC = 1,
+ MPEG2_LC,
/**
* MPEG-4 Low Complexity. Support is Optional.
*/
- MPEG4_LC = 1 << 1,
+ MPEG4_LC,
/**
* MPEG-4 Long Term Prediction. Support is Optional.
*/
- MPEG4_LTP = 1 << 2,
+ MPEG4_LTP,
/**
* MPEG-4 Scalable. Support is Optional.
*/
- MPEG4_SCALABLE = 1 << 3,
+ MPEG4_SCALABLE,
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxCapabilities.aidl
index 6a37fc6..f5605d3 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxCapabilities.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/AptxCapabilities.aidl
@@ -24,7 +24,6 @@
@VintfStability
parcelable AptxCapabilities {
int[] sampleRateHz;
- /* bitfield */
- ChannelMode channelMode;
+ ChannelMode[] channelMode;
byte[] bitsPerSample;
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ChannelMode.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ChannelMode.aidl
index 2df879d..6613872 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ChannelMode.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ChannelMode.aidl
@@ -19,7 +19,7 @@
@VintfStability
@Backing(type="byte")
enum ChannelMode {
- UNKNOWN = 1,
- MONO = 1 << 1,
- STEREO = 1 << 2,
+ UNKNOWN,
+ MONO,
+ STEREO,
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacCapabilities.aidl
index 44cca7e..1dbec08 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacCapabilities.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacCapabilities.aidl
@@ -26,9 +26,7 @@
@VintfStability
parcelable LdacCapabilities {
int[] sampleRateHz;
- /* bitfiled */
- LdacChannelMode channelMode;
- /* bitfiled */
- LdacQualityIndex qualityIndex;
+ LdacChannelMode[] channelMode;
+ LdacQualityIndex[] qualityIndex;
byte[] bitsPerSample;
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacChannelMode.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacChannelMode.aidl
index 3acca32..3cc910f 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacChannelMode.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacChannelMode.aidl
@@ -22,8 +22,8 @@
@VintfStability
@Backing(type="byte")
enum LdacChannelMode {
- UNKNOWN = 1,
- STEREO = 1 << 1,
- DUAL = 1 << 2,
- MONO = 1 << 3,
+ UNKNOWN,
+ STEREO,
+ DUAL,
+ MONO,
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacQualityIndex.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacQualityIndex.aidl
index cb12583..9993b8b 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacQualityIndex.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LdacQualityIndex.aidl
@@ -22,17 +22,17 @@
/**
* 990kbps
*/
- HIGH = 1,
+ HIGH,
/**
* 660kbps
*/
- MID = 1 << 1,
+ MID,
/**
* 330kbps
*/
- LOW = 1 << 2,
+ LOW,
/**
* Adaptive Bit Rate mode
*/
- ABR = 1 << 3,
+ ABR,
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/PcmCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/PcmCapabilities.aidl
index f5d699e..776b777 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/PcmCapabilities.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/PcmCapabilities.aidl
@@ -24,7 +24,7 @@
@VintfStability
parcelable PcmCapabilities {
int[] sampleRateHz;
- ChannelMode channelMode;
+ ChannelMode[] channelMode;
byte[] bitsPerSample;
/**
* Data interval for data transfer
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcAllocMethod.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcAllocMethod.aidl
index 7047e34..1159f30 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcAllocMethod.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcAllocMethod.aidl
@@ -22,9 +22,9 @@
/**
* SNR
*/
- ALLOC_MD_S = 1,
+ ALLOC_MD_S,
/**
* Loudness
*/
- ALLOC_MD_L = 1 << 1,
+ ALLOC_MD_L,
}
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcCapabilities.aidl
index cf62ed4..743a1f7 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcCapabilities.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcCapabilities.aidl
@@ -25,12 +25,10 @@
@VintfStability
parcelable SbcCapabilities {
int[] sampleRateHz;
- /* bitfield */
- SbcChannelMode channelMode;
+ SbcChannelMode[] channelMode;
byte[] blockLength;
byte[] numSubbands;
- /* bitfield */
- SbcAllocMethod allocMethod;
+ SbcAllocMethod[] allocMethod;
byte[] bitsPerSample;
/*
* range from 2 to 250.
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcChannelMode.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcChannelMode.aidl
index 7eb38cd..68e3267 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcChannelMode.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/SbcChannelMode.aidl
@@ -19,9 +19,9 @@
@VintfStability
@Backing(type="byte")
enum SbcChannelMode {
- UNKNOWN = 1,
- JOINT_STEREO = 1 << 1,
- STEREO = 1 << 2,
- DUAL = 1 << 3,
- MONO = 1 << 4,
+ UNKNOWN,
+ JOINT_STEREO,
+ STEREO,
+ DUAL,
+ MONO,
}