summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Kapdi2018-02-07 17:08:01 -0600
committerPavlin Radoslavov2018-03-12 15:41:04 -0500
commit9526c2ff73ab62f62ace44d2418453e57b3feb61 (patch)
treeda7e27c120021cd17226496358130acc3edc00bd /bluetooth/a2dp/1.0/types.hal
parent4cd374a6c4b19125da85253c65990daa6ef5683b (diff)
downloadplatform-hardware-interfaces-9526c2ff73ab62f62ace44d2418453e57b3feb61.tar.gz
platform-hardware-interfaces-9526c2ff73ab62f62ace44d2418453e57b3feb61.tar.xz
platform-hardware-interfaces-9526c2ff73ab62f62ace44d2418453e57b3feb61.zip
Bluetooth: A2DP offload HIDL
Interface for Bluetooth A2DP offload feature. Bug: 72242910 Test: Manual; TestTracker/148125 Change-Id: I3649800dfe3e1a2d66b76859be87e01ee58d2de0 (cherry picked from commit 4e95d81ef048bfdc33cee7cf8bdbe66603b30f96)
Diffstat (limited to 'bluetooth/a2dp/1.0/types.hal')
-rw-r--r--bluetooth/a2dp/1.0/types.hal99
1 files changed, 99 insertions, 0 deletions
diff --git a/bluetooth/a2dp/1.0/types.hal b/bluetooth/a2dp/1.0/types.hal
new file mode 100644
index 00000000..6a430f05
--- /dev/null
+++ b/bluetooth/a2dp/1.0/types.hal
@@ -0,0 +1,99 @@
1/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.bluetooth.a2dp@1.0;
18
19enum Status : uint8_t {
20 SUCCESS,
21 FAILURE,
22 /** codec configuration not supported by the audio platform */
23 UNSUPPORTED_CODEC_CONFIGURATION ,
24 /** operation is pending */
25 PENDING,
26};
27
28enum CodecType : uint32_t {
29 UNKNOWN = 0x00,
30 SBC = 0x01,
31 AAC = 0x02,
32 APTX = 0x04,
33 APTX_HD = 0x08,
34 LDAC = 0x10,
35};
36enum SampleRate : uint32_t {
37 RATE_UNKNOWN = 0x00,
38 RATE_44100 = 0x01,
39 RATE_48000 = 0x02,
40 RATE_88200 = 0x04,
41 RATE_96000 = 0x08,
42 RATE_176400 = 0x10,
43 RATE_192000 = 0x20,
44};
45enum BitsPerSample : uint8_t {
46 BITS_UNKNOWN = 0x00,
47 BITS_16 = 0x01,
48 BITS_24 = 0x02,
49 BITS_32 = 0x04,
50};
51enum ChannelMode : uint8_t {
52 UNKNOWN = 0x00,
53 MONO = 0x01,
54 STEREO = 0x02,
55};
56struct CodecConfiguration {
57 /** Bluetooth A2DP codec */
58 CodecType codecType;
59 /** Sampling rate for encoder */
60 SampleRate sampleRate;
61 /** Bits per sample for encoder */
62 BitsPerSample bitsPerSample;
63 /** Channel mode for encoder */
64 ChannelMode channelMode;
65 /**
66 * The encoded audio bitrate in bits / second.
67 * 0x00000000 - The audio bitrate is not specified / unused
68 * 0x00000001 - 0x00FFFFFF - Encoded audio bitrate in bits/second
69 * 0x01000000 - 0xFFFFFFFF - Reserved
70 */
71 uint32_t encodedAudioBitrate;
72 /** Peer MTU (in octets) */
73 uint16_t peerMtu;
74 union CodecSpecific {
75 /**
76 * SBC Codec specific information
77 * Refer to SBC Codec specific information elements in A2DP v1.3
78 * Profile Specification.
79 */
80 struct SbcData {
81 /** Block length: 4 bits | Subbands: 2 bits | Allocation Method: 2 bits */
82 uint8_t codecParameters;
83 /** Minimum bitpool value */
84 uint8_t minBitpool;
85 /** Maximum bitpool value */
86 uint8_t maxBitpool;
87 } sbcData;
88 struct LdacData {
89 /**
90 * LDAC bitrate index value:
91 * 0x00 - High
92 * 0x01 - Mid
93 * 0x02 - Low
94 * 0x7F - ABR (Adaptive Bit Rate)
95 */
96 uint8_t bitrateIndex;
97 } ldacData;
98 } codecSpecific;
99};