blob: bc61c0f4ccc14c468faa2864aab731c094a52533 [file] [log] [blame]
Shunkai Yaoea24c1a2022-09-28 17:39:23 +00001/*
2 * Copyright (C) 2022 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
17#pragma once
Shunkai Yao52abf0a2022-11-08 02:44:03 +000018#include <map>
19
Shunkai Yaoea24c1a2022-09-28 17:39:23 +000020#include <aidl/android/media/audio/common/AudioUuid.h>
21
22namespace aidl::android::hardware::audio::effect {
23
24using ::aidl::android::media::audio::common::AudioUuid;
25
Shunkai Yao812d5b42022-11-16 18:08:50 +000026// ec7178ec-e5e1-4432-a3f4-4657e6795210
27static const AudioUuid kEffectNullUuid = {static_cast<int32_t>(0xec7178ec),
28 0xe5e1,
29 0x4432,
30 0xa3f4,
31 {0x46, 0x57, 0xe6, 0x79, 0x52, 0x10}};
Shunkai Yaoa4ab38c2022-10-14 01:07:47 +000032// Zero UUID
Shunkai Yao812d5b42022-11-16 18:08:50 +000033static const AudioUuid kEffectZeroUuid = {
Shunkai Yaoa4ab38c2022-10-14 01:07:47 +000034 static_cast<int32_t>(0x0), 0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}};
35
Shunkai Yaobd862b82022-12-20 00:11:41 +000036// 7b491460-8d4d-11e0-bd61-0002a5d5c51b.
37static const AudioUuid kAcousticEchoCancelerTypeUUID = {static_cast<int32_t>(0x7b491460),
38 0x8d4d,
39 0x11e0,
40 0xbd61,
41 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
42// bb392ec0-8d4d-11e0-a896-0002a5d5c51b
43static const AudioUuid kAcousticEchoCancelerSwImplUUID = {static_cast<int32_t>(0xbb392ec0),
44 0x8d4d,
45 0x11e0,
46 0xa896,
47 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shraddha Basantwanicac2e682023-02-15 18:03:58 +053048// 0a8abfe0-654c-11e0-ba26-0002a5d5c51b
49static const AudioUuid kAutomaticGainControlV1TypeUUID = {static_cast<int32_t>(0x0a8abfe0),
50 0x654c,
51 0x11e0,
52 0xba26,
53 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
54// aa8130e0-66fc-11e0-bad0-0002a5d5c51b
55static const AudioUuid kAutomaticGainControlV1SwImplUUID = {static_cast<int32_t>(0xaa8130e0),
56 0x66fc,
57 0x11e0,
58 0xbad0,
59 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shraddha Basantwani84ea32e2023-02-01 16:22:37 +053060// ae3c653b-be18-4ab8-8938-418f0a7f06ac
61static const AudioUuid kAutomaticGainControlV2TypeUUID = {static_cast<int32_t>(0xae3c653b),
62 0xbe18,
63 0x4ab8,
64 0x8938,
65 {0x41, 0x8f, 0x0a, 0x7f, 0x06, 0xac}};
Shunkai Yaobd862b82022-12-20 00:11:41 +000066// 89f38e65-d4d2-4d64-ad0e-2b3e799ea886
Shraddha Basantwani84ea32e2023-02-01 16:22:37 +053067static const AudioUuid kAutomaticGainControlV2SwImplUUID = {static_cast<int32_t>(0x89f38e65),
68 0xd4d2,
69 0x4d64,
70 0xad0e,
71 {0x2b, 0x3e, 0x79, 0x9e, 0xa8, 0x86}};
Shunkai Yao812d5b42022-11-16 18:08:50 +000072// 0634f220-ddd4-11db-a0fc-0002a5d5c51b
73static const AudioUuid kBassBoostTypeUUID = {static_cast<int32_t>(0x0634f220),
74 0xddd4,
75 0x11db,
76 0xa0fc,
77 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yao6afc8552022-10-26 22:47:20 +000078// fa8181f2-588b-11ed-9b6a-0242ac120002
Shunkai Yao812d5b42022-11-16 18:08:50 +000079static const AudioUuid kBassBoostSwImplUUID = {static_cast<int32_t>(0xfa8181f2),
Shunkai Yao6afc8552022-10-26 22:47:20 +000080 0x588b,
81 0x11ed,
82 0x9b6a,
83 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shraddha Basantwani3a2fb032022-11-22 11:04:35 +053084// 8631f300-72e2-11df-b57e-0002a5d5c51b
85static const AudioUuid kBassBoostBundleImplUUID = {static_cast<int32_t>(0x8631f300),
86 0x72e2,
87 0x11df,
88 0xb57e,
89 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
90// 14804144-a5ee-4d24-aa88-0002a5d5c51b
91static const AudioUuid kBassBoostProxyUUID = {static_cast<int32_t>(0x14804144),
92 0xa5ee,
93 0x4d24,
94 0xaa88,
95 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yao85b01692023-02-15 22:04:57 +000096// 381e49cc-a858-4aa2-87f6-e8388e7601b2
97static const AudioUuid kDownmixTypeUUID = {static_cast<int32_t>(0x381e49cc),
98 0xa858,
99 0x4aa2,
100 0x87f6,
101 {0xe8, 0x38, 0x8e, 0x76, 0x01, 0xb2}};
Shunkai Yao812d5b42022-11-16 18:08:50 +0000102// fa8187ba-588b-11ed-9b6a-0242ac120002
103static const AudioUuid kDownmixSwImplUUID = {static_cast<int32_t>(0xfa8187ba),
104 0x588b,
105 0x11ed,
106 0x9b6a,
107 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shraddha Basantwani4ff86982022-12-13 16:31:49 +0530108// 93f04452-e4fe-41cc-91f9-e475b6d1d69f
109static const AudioUuid kDownmixImplUUID = {static_cast<int32_t>(0x93f04452),
110 0xe4fe,
111 0x41cc,
112 0x91f9,
113 {0xe4, 0x75, 0xb6, 0xd1, 0xd6, 0x9f}};
Shunkai Yao812d5b42022-11-16 18:08:50 +0000114// 0bed4300-ddd6-11db-8f34-0002a5d5c51b.
115static const AudioUuid kEqualizerTypeUUID = {static_cast<int32_t>(0x0bed4300),
116 0xddd6,
117 0x11db,
118 0x8f34,
119 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
120// 0bed4300-847d-11df-bb17-0002a5d5c51b
121static const AudioUuid kEqualizerSwImplUUID = {static_cast<int32_t>(0x0bed4300),
122 0x847d,
123 0x11df,
124 0xbb17,
125 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
126// ce772f20-847d-11df-bb17-0002a5d5c51b
127static const AudioUuid kEqualizerBundleImplUUID = {static_cast<int32_t>(0xce772f20),
128 0x847d,
129 0x11df,
130 0xbb17,
131 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
132// c8e70ecd-48ca-456e-8a4f-0002a5d5c51b
133static const AudioUuid kEqualizerProxyUUID = {static_cast<int32_t>(0xc8e70ecd),
134 0x48ca,
135 0x456e,
136 0x8a4f,
137 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
138// 7261676f-6d75-7369-6364-28e2fd3ac39e
139static const AudioUuid kDynamicsProcessingTypeUUID = {static_cast<int32_t>(0x7261676f),
140 0x6d75,
141 0x7369,
142 0x6364,
143 {0x28, 0xe2, 0xfd, 0x3a, 0xc3, 0x9e}};
144// fa818d78-588b-11ed-9b6a-0242ac120002
145static const AudioUuid kDynamicsProcessingSwImplUUID = {static_cast<int32_t>(0xfa818d78),
146 0x588b,
147 0x11ed,
148 0x9b6a,
149 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Ram Mohane4064ce2022-12-20 18:05:14 +0530150// e0e6539b-1781-7261-676f-6d7573696340
151static const AudioUuid kDynamicsProcessingImplUUID = {static_cast<int32_t>(0xe0e6539b),
152 0x1781,
153 0x7261,
154 0x676f,
155 {0x6d, 0x75, 0x73, 0x69, 0x63, 0x40}};
Shunkai Yao812d5b42022-11-16 18:08:50 +0000156// 1411e6d6-aecd-4021-a1cf-a6aceb0d71e5
157static const AudioUuid kHapticGeneratorTypeUUID = {static_cast<int32_t>(0x1411e6d6),
158 0xaecd,
159 0x4021,
160 0xa1cf,
161 {0xa6, 0xac, 0xeb, 0x0d, 0x71, 0xe5}};
162// fa819110-588b-11ed-9b6a-0242ac120002
163static const AudioUuid kHapticGeneratorSwImplUUID = {static_cast<int32_t>(0xfa819110),
164 0x588b,
165 0x11ed,
166 0x9b6a,
167 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shraddha Basantwaniae7dde52022-12-18 15:01:14 +0530168// 97c4acd1-8b82-4f2f-832e-c2fe5d7a9931
169static const AudioUuid kHapticGeneratorImplUUID = {static_cast<int32_t>(0x97c4acd1),
170 0x8b82,
171 0x4f2f,
172 0x832e,
173 {0xc2, 0xfe, 0x5d, 0x7a, 0x99, 0x31}};
Shunkai Yao812d5b42022-11-16 18:08:50 +0000174// fe3199be-aed0-413f-87bb-11260eb63cf1
175static const AudioUuid kLoudnessEnhancerTypeUUID = {static_cast<int32_t>(0xfe3199be),
176 0xaed0,
177 0x413f,
178 0x87bb,
179 {0x11, 0x26, 0x0e, 0xb6, 0x3c, 0xf1}};
180// fa819610-588b-11ed-9b6a-0242ac120002
181static const AudioUuid kLoudnessEnhancerSwImplUUID = {static_cast<int32_t>(0xfa819610),
182 0x588b,
183 0x11ed,
184 0x9b6a,
185 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shraddha Basantwani22834ea2022-12-08 16:09:05 +0530186// fa415329-2034-4bea-b5dc-5b381c8d1e2c
187static const AudioUuid kLoudnessEnhancerImplUUID = {static_cast<int32_t>(0xfa415329),
188 0x2034,
189 0x4bea,
190 0xb5dc,
191 {0x5b, 0x38, 0x1c, 0x8d, 0x1e, 0x2c}};
Shunkai Yao812d5b42022-11-16 18:08:50 +0000192// c2e5d5f0-94bd-4763-9cac-4e234d06839e
193static const AudioUuid kEnvReverbTypeUUID = {static_cast<int32_t>(0xc2e5d5f0),
194 0x94bd,
195 0x4763,
196 0x9cac,
197 {0x4e, 0x23, 0x4d, 0x06, 0x83, 0x9e}};
198// fa819886-588b-11ed-9b6a-0242ac120002
199static const AudioUuid kEnvReverbSwImplUUID = {static_cast<int32_t>(0xfa819886),
200 0x588b,
201 0x11ed,
202 0x9b6a,
203 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shraddha Basantwanib83ec072022-12-29 19:43:38 +0530204// 4a387fc0-8ab3-11df-8bad-0002a5d5c51b
205static const AudioUuid kAuxEnvReverbImplUUID = {static_cast<int32_t>(0x4a387fc0),
206 0x8ab3,
207 0x11df,
208 0x8bad,
209 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
210// c7a511a0-a3bb-11df-860e-0002a5d5c51b
211static const AudioUuid kInsertEnvReverbImplUUID = {static_cast<int32_t>(0xc7a511a0),
212 0xa3bb,
213 0x11df,
214 0x860e,
215 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yaobd862b82022-12-20 00:11:41 +0000216// 58b4b260-8e06-11e0-aa8e-0002a5d5c51b
217static const AudioUuid kNoiseSuppressionTypeUUID = {static_cast<int32_t>(0x58b4b260),
218 0x8e06,
219 0x11e0,
220 0xaa8e,
221 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
222// c06c8400-8e06-11e0-9cb6-0002a5d5c51b
223static const AudioUuid kNoiseSuppressionSwImplUUID = {static_cast<int32_t>(0xc06c8400),
224 0x8e06,
225 0x11e0,
226 0x9cb6,
227 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yao812d5b42022-11-16 18:08:50 +0000228// 47382d60-ddd8-11db-bf3a-0002a5d5c51b
229static const AudioUuid kPresetReverbTypeUUID = {static_cast<int32_t>(0x47382d60),
230 0xddd8,
231 0x11db,
232 0xbf3a,
233 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
234// fa8199c6-588b-11ed-9b6a-0242ac120002
235static const AudioUuid kPresetReverbSwImplUUID = {static_cast<int32_t>(0xfa8199c6),
236 0x588b,
237 0x11ed,
238 0x9b6a,
239 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shraddha Basantwanib83ec072022-12-29 19:43:38 +0530240// f29a1400-a3bb-11df-8ddc-0002a5d5c51b
241static const AudioUuid kAuxPresetReverbImplUUID = {static_cast<int32_t>(0xf29a1400),
242 0xa3bb,
243 0x11df,
244 0x8ddc,
245 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
246// 172cdf00-a3bc-11df-a72f-0002a5d5c51b
247static const AudioUuid kInsertPresetReverbImplUUID = {static_cast<int32_t>(0x172cdf00),
248 0xa3bc,
249 0x11df,
250 0xa72f,
251 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yao812d5b42022-11-16 18:08:50 +0000252// 37cc2c00-dddd-11db-8577-0002a5d5c51b
253static const AudioUuid kVirtualizerTypeUUID = {static_cast<int32_t>(0x37cc2c00),
254 0xdddd,
255 0x11db,
256 0x8577,
257 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
258// fa819d86-588b-11ed-9b6a-0242ac120002
259static const AudioUuid kVirtualizerSwImplUUID = {static_cast<int32_t>(0xfa819d86),
260 0x588b,
261 0x11ed,
262 0x9b6a,
263 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Sham Rathod5fd232f2022-12-08 13:56:38 +0530264// 1d4033c0-8557-11df-9f2d-0002a5d5c51b
265static const AudioUuid kVirtualizerBundleImplUUID = {static_cast<int32_t>(0x1d4033c0),
266 0x8557,
267 0x11df,
268 0x9f2d,
269 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
270// d3467faa-acc7-4d34-acaf-0002a5d5c51b
271static const AudioUuid kVirtualizerProxyUUID = {static_cast<int32_t>(0xd3467faa),
272 0xacc7,
273 0x4d34,
274 0xacaf,
275 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yao86741082023-02-21 17:56:04 +0000276// e46b26a0-dddd-11db-8afd-0002a5d5c51b
277static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xe46b26a0),
278 0xdddd,
279 0x11db,
280 0x8afd,
281 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yao812d5b42022-11-16 18:08:50 +0000282// fa81a0f6-588b-11ed-9b6a-0242ac120002
283static const AudioUuid kVisualizerSwImplUUID = {static_cast<int32_t>(0xfa81a0f6),
284 0x588b,
285 0x11ed,
286 0x9b6a,
287 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shunkai Yaoe39cd362022-12-22 00:23:34 +0000288// d069d9e0-8329-11df-9168-0002a5d5c51b
289// {0xd069d9e0, 0x8329, 0x11df, 0x9168, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}},
290static const AudioUuid kVisualizerImplUUID = {static_cast<int32_t>(0xd069d9e0),
291 0x8329,
292 0x11df,
293 0x9168,
294 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yao812d5b42022-11-16 18:08:50 +0000295// fa81a2b8-588b-11ed-9b6a-0242ac120002
296static const AudioUuid kVolumeTypeUUID = {static_cast<int32_t>(0xfa81a2b8),
297 0x588b,
298 0x11ed,
299 0x9b6a,
300 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
301// fa81a718-588b-11ed-9b6a-0242ac120002
302static const AudioUuid kVolumeSwImplUUID = {static_cast<int32_t>(0xfa81a718),
303 0x588b,
304 0x11ed,
305 0x9b6a,
306 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Sham Rathod51d16c62022-12-19 17:21:59 +0530307// 119341a0-8469-11df-81f9-0002a5d5c51b
308static const AudioUuid kVolumeBundleImplUUID = {static_cast<int32_t>(0x119341a0),
309 0x8469,
310 0x11df,
311 0x81f9,
312 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yaoea24c1a2022-09-28 17:39:23 +0000313
Shunkai Yao85b01692023-02-15 22:04:57 +0000314// fa81dbde-588b-11ed-9b6a-0242ac120002
315static const AudioUuid kExtensionEffectTypeUUID = {static_cast<int32_t>(0xfa81dbde),
316 0x588b,
317 0x11ed,
318 0x9b6a,
319 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
320// fa81dd00-588b-11ed-9b6a-0242ac120002
321static const AudioUuid kExtensionEffectImplUUID = {static_cast<int32_t>(0xfa81dd00),
322 0x588b,
323 0x11ed,
324 0x9b6a,
325 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shunkai Yao52abf0a2022-11-08 02:44:03 +0000326/**
327 * @brief A map between effect name and effect type UUID.
328 * All <name> attribution in effect/effectProxy of audio_effects.xml should be listed in this map.
329 * We need this map is because existing audio_effects.xml don't have a type UUID defined.
330 */
331static const std::map<const std::string /* effect type */, const AudioUuid&> kUuidNameTypeMap = {
Shunkai Yaobd862b82022-12-20 00:11:41 +0000332 {"acoustic_echo_canceler", kAcousticEchoCancelerTypeUUID},
Shraddha Basantwanicac2e682023-02-15 18:03:58 +0530333 {"automatic_gain_control_v1", kAutomaticGainControlV1TypeUUID},
Shraddha Basantwani84ea32e2023-02-01 16:22:37 +0530334 {"automatic_gain_control_v2", kAutomaticGainControlV2TypeUUID},
Shunkai Yao812d5b42022-11-16 18:08:50 +0000335 {"bassboost", kBassBoostTypeUUID},
336 {"downmix", kDownmixTypeUUID},
337 {"dynamics_processing", kDynamicsProcessingTypeUUID},
338 {"equalizer", kEqualizerTypeUUID},
Shunkai Yao85b01692023-02-15 22:04:57 +0000339 {"extensioneffect", kExtensionEffectTypeUUID},
Shunkai Yao812d5b42022-11-16 18:08:50 +0000340 {"haptic_generator", kHapticGeneratorTypeUUID},
341 {"loudness_enhancer", kLoudnessEnhancerTypeUUID},
342 {"env_reverb", kEnvReverbTypeUUID},
Shunkai Yaobd862b82022-12-20 00:11:41 +0000343 {"noise_suppression", kNoiseSuppressionTypeUUID},
Shunkai Yao812d5b42022-11-16 18:08:50 +0000344 {"preset_reverb", kPresetReverbTypeUUID},
345 {"reverb_env_aux", kEnvReverbTypeUUID},
346 {"reverb_env_ins", kEnvReverbTypeUUID},
347 {"reverb_pre_aux", kPresetReverbTypeUUID},
348 {"reverb_pre_ins", kPresetReverbTypeUUID},
349 {"virtualizer", kVirtualizerTypeUUID},
350 {"visualizer", kVisualizerTypeUUID},
351 {"volume", kVolumeTypeUUID},
Shunkai Yao52abf0a2022-11-08 02:44:03 +0000352};
353
Shunkai Yaoea24c1a2022-09-28 17:39:23 +0000354} // namespace aidl::android::hardware::audio::effect