1 /******************************************************************************
2  *
3  *  Copyright 2000-2012 Broadcom Corporation
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License");
6  *  you may not use this file except in compliance with the License.
7  *  You may obtain a copy of the License at:
8  *
9  *  http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  ******************************************************************************/
18 
19 #pragma once
20 
21 #include <bluetooth/log.h>
22 
23 #include <cstdint>
24 
25 enum tA2DP_STATUS : uint8_t {
26   /* Success */
27   A2DP_SUCCESS = 0,
28 
29   /* Failed */
30   A2DP_FAIL = 0x0A,
31 
32   /* A2DP_FindService is already in progress */
33   A2DP_BUSY = 0x0B,
34 
35   /* Bad parameters */
36   A2DP_INVALID_PARAMS = 0x0C,
37 
38   /* Wrong codec info */
39   A2DP_WRONG_CODEC = 0x0D,
40 
41   /* Media Codec Type is not valid */
42   A2DP_BAD_CODEC_TYPE = 0xC1,
43 
44   /* Media Codec Type is not supported */
45   A2DP_NS_CODEC_TYPE = 0xC2,
46 
47   /* Sampling Frequency is not valid or multiple values have been selected */
48   A2DP_BAD_SAMP_FREQ = 0xC3,
49 
50   /* Sampling Frequency is not supported */
51   A2DP_NS_SAMP_FREQ = 0xC4,
52 
53   /* Channel Mode is not valid or multiple values * have been selected */
54   A2DP_BAD_CH_MODE = 0xC5,
55 
56   /* Channel Mode is not supported */
57   A2DP_NS_CH_MODE = 0xC6,
58 
59   /* None or multiple values have been selected for Number of Subbands */
60   A2DP_BAD_SUBBANDS = 0xC7,
61 
62   /* Number of Subbands is not supported */
63   A2DP_NS_SUBBANDS = 0xC8,
64 
65   /* None or multiple values have been selected for Allocation Method */
66   A2DP_BAD_ALLOC_METHOD = 0xC9,
67 
68   /* Allocation Method is not supported */
69   A2DP_NS_ALLOC_METHOD = 0xCA,
70 
71   /* Minimum Bitpool Value is not valid */
72   A2DP_BAD_MIN_BITPOOL = 0xCB,
73 
74   /* Minimum Bitpool Value is not supported */
75   A2DP_NS_MIN_BITPOOL = 0xCC,
76 
77   /* Maximum Bitpool Value is not valid */
78   A2DP_BAD_MAX_BITPOOL = 0xCD,
79 
80   /* Maximum Bitpool Value is not supported */
81   A2DP_NS_MAX_BITPOOL = 0xCE,
82 
83   /* None or multiple values have been selected for Layer */
84   A2DP_BAD_LAYER = 0xCF,
85 
86   /* Layer is not supported */
87   A2DP_NS_LAYER = 0xD0,
88 
89   /* CRC is not supported */
90   A2DP_NS_CRC = 0xD1,
91 
92   /* MPF-2 is not supported */
93   A2DP_NS_MPF = 0xD2,
94 
95   /* VBR is not supported */
96   A2DP_NS_VBR = 0xD3,
97 
98   /* None or multiple values have been selected for Bit Rate */
99   A2DP_BAD_BIT_RATE = 0xD4,
100 
101   /* Bit Rate is not supported */
102   A2DP_NS_BIT_RATE = 0xD5,
103 
104   /* Either 1) Object type is not valid (b3-b0) or 2) None or multiple values
105    * have been * selected for Object Type
106    */
107   A2DP_BAD_OBJ_TYPE = 0xD6,
108 
109   /* Object type is not supported */
110   A2DP_NS_OBJ_TYPE = 0xD7,
111 
112   /* None or multiple values have been selected for Channels */
113   A2DP_BAD_CHANNEL = 0xD8,
114 
115   /* Channels is not supported */
116   A2DP_NS_CHANNEL = 0xD9,
117 
118   /* None or multiple values have been selected for Block Length */
119   A2DP_BAD_BLOCK_LEN = 0xDD,
120 
121   /* The requested CP Type is not supported. */
122   A2DP_BAD_CP_TYPE = 0xE0,
123 
124   /* The format of Content Protection Service Capability/Content Protection
125    * Scheme Dependent Data is not correct.
126    */
127   A2DP_BAD_CP_FORMAT = 0xE1,
128 
129   /* Invalid framesize */
130   A2DP_NS_FRAMESIZE = 0xE2,
131 };
132 
133 namespace fmt {
134 template <>
135 struct formatter<tA2DP_STATUS> : enum_formatter<tA2DP_STATUS> {};
136 }  // namespace fmt
137