Merge "BtAudio: Replace bitmask capabilities with vector" am: 3ee0b2d08a

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

Change-Id: I9303e472500fcfd2953f615f2fcbd41c509f88d7
This commit is contained in:
Treehugger Robot
2022-01-17 12:42:18 +00:00
committed by Automerger Merge Worker
22 changed files with 60 additions and 67 deletions

View File

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

View File

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

View File

@@ -35,6 +35,6 @@ package android.hardware.bluetooth.audio;
@VintfStability
parcelable AptxCapabilities {
int[] sampleRateHz;
android.hardware.bluetooth.audio.ChannelMode channelMode;
android.hardware.bluetooth.audio.ChannelMode[] channelMode;
byte[] bitsPerSample;
}

View File

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

View File

@@ -35,7 +35,7 @@ package android.hardware.bluetooth.audio;
@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;
}

View File

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

View File

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

View File

@@ -35,7 +35,7 @@ package android.hardware.bluetooth.audio;
@VintfStability
parcelable PcmCapabilities {
int[] sampleRateHz;
android.hardware.bluetooth.audio.ChannelMode channelMode;
android.hardware.bluetooth.audio.ChannelMode[] channelMode;
byte[] bitsPerSample;
int[] dataIntervalUs;
}

View File

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

View File

@@ -35,10 +35,10 @@ package android.hardware.bluetooth.audio;
@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;

View File

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

View File

@@ -24,11 +24,9 @@ import android.hardware.bluetooth.audio.ChannelMode;
*/
@VintfStability
parcelable AacCapabilities {
/* bitfield */
AacObjectType objectType;
AacObjectType[] objectType;
int[] sampleRateHz;
/* bitfield */
ChannelMode channelMode;
ChannelMode[] channelMode;
boolean variableBitRateSupported;
byte[] bitsPerSample;
}

View File

@@ -22,17 +22,17 @@ enum AacObjectType {
/**
* 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,
}

View File

@@ -24,7 +24,6 @@ import android.hardware.bluetooth.audio.ChannelMode;
@VintfStability
parcelable AptxCapabilities {
int[] sampleRateHz;
/* bitfield */
ChannelMode channelMode;
ChannelMode[] channelMode;
byte[] bitsPerSample;
}

View File

@@ -19,7 +19,7 @@ package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="byte")
enum ChannelMode {
UNKNOWN = 1,
MONO = 1 << 1,
STEREO = 1 << 2,
UNKNOWN,
MONO,
STEREO,
}

View File

@@ -26,9 +26,7 @@ import android.hardware.bluetooth.audio.LdacQualityIndex;
@VintfStability
parcelable LdacCapabilities {
int[] sampleRateHz;
/* bitfiled */
LdacChannelMode channelMode;
/* bitfiled */
LdacQualityIndex qualityIndex;
LdacChannelMode[] channelMode;
LdacQualityIndex[] qualityIndex;
byte[] bitsPerSample;
}

View File

@@ -22,8 +22,8 @@ package android.hardware.bluetooth.audio;
@VintfStability
@Backing(type="byte")
enum LdacChannelMode {
UNKNOWN = 1,
STEREO = 1 << 1,
DUAL = 1 << 2,
MONO = 1 << 3,
UNKNOWN,
STEREO,
DUAL,
MONO,
}

View File

@@ -22,17 +22,17 @@ enum LdacQualityIndex {
/**
* 990kbps
*/
HIGH = 1,
HIGH,
/**
* 660kbps
*/
MID = 1 << 1,
MID,
/**
* 330kbps
*/
LOW = 1 << 2,
LOW,
/**
* Adaptive Bit Rate mode
*/
ABR = 1 << 3,
ABR,
}

View File

@@ -24,7 +24,7 @@ import android.hardware.bluetooth.audio.ChannelMode;
@VintfStability
parcelable PcmCapabilities {
int[] sampleRateHz;
ChannelMode channelMode;
ChannelMode[] channelMode;
byte[] bitsPerSample;
/**
* Data interval for data transfer

View File

@@ -22,9 +22,9 @@ enum SbcAllocMethod {
/**
* SNR
*/
ALLOC_MD_S = 1,
ALLOC_MD_S,
/**
* Loudness
*/
ALLOC_MD_L = 1 << 1,
ALLOC_MD_L,
}

View File

@@ -25,12 +25,10 @@ import android.hardware.bluetooth.audio.SbcChannelMode;
@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.

View File

@@ -19,9 +19,9 @@ 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,
UNKNOWN,
JOINT_STEREO,
STEREO,
DUAL,
MONO,
}