blob: 7709eabf78993fece5e8fc5e70af9bc45c0a2c52 [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 Yao812d5b42022-11-16 18:08:50 +000036// 0634f220-ddd4-11db-a0fc-0002a5d5c51b
37static const AudioUuid kBassBoostTypeUUID = {static_cast<int32_t>(0x0634f220),
38 0xddd4,
39 0x11db,
40 0xa0fc,
41 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
Shunkai Yao6afc8552022-10-26 22:47:20 +000042// fa8181f2-588b-11ed-9b6a-0242ac120002
Shunkai Yao812d5b42022-11-16 18:08:50 +000043static const AudioUuid kBassBoostSwImplUUID = {static_cast<int32_t>(0xfa8181f2),
Shunkai Yao6afc8552022-10-26 22:47:20 +000044 0x588b,
45 0x11ed,
46 0x9b6a,
47 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shunkai Yao812d5b42022-11-16 18:08:50 +000048// fa81862a-588b-11ed-9b6a-0242ac120002
49static const AudioUuid kDownmixTypeUUID = {static_cast<int32_t>(0xfa81862a),
Shunkai Yao6afc8552022-10-26 22:47:20 +000050 0x588b,
51 0x11ed,
52 0x9b6a,
53 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shunkai Yao812d5b42022-11-16 18:08:50 +000054// fa8187ba-588b-11ed-9b6a-0242ac120002
55static const AudioUuid kDownmixSwImplUUID = {static_cast<int32_t>(0xfa8187ba),
56 0x588b,
57 0x11ed,
58 0x9b6a,
59 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
60// 0bed4300-ddd6-11db-8f34-0002a5d5c51b.
61static const AudioUuid kEqualizerTypeUUID = {static_cast<int32_t>(0x0bed4300),
62 0xddd6,
63 0x11db,
64 0x8f34,
65 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
66// 0bed4300-847d-11df-bb17-0002a5d5c51b
67static const AudioUuid kEqualizerSwImplUUID = {static_cast<int32_t>(0x0bed4300),
68 0x847d,
69 0x11df,
70 0xbb17,
71 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
72// ce772f20-847d-11df-bb17-0002a5d5c51b
73static const AudioUuid kEqualizerBundleImplUUID = {static_cast<int32_t>(0xce772f20),
74 0x847d,
75 0x11df,
76 0xbb17,
77 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
78// c8e70ecd-48ca-456e-8a4f-0002a5d5c51b
79static const AudioUuid kEqualizerProxyUUID = {static_cast<int32_t>(0xc8e70ecd),
80 0x48ca,
81 0x456e,
82 0x8a4f,
83 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
84// 7261676f-6d75-7369-6364-28e2fd3ac39e
85static const AudioUuid kDynamicsProcessingTypeUUID = {static_cast<int32_t>(0x7261676f),
86 0x6d75,
87 0x7369,
88 0x6364,
89 {0x28, 0xe2, 0xfd, 0x3a, 0xc3, 0x9e}};
90// fa818d78-588b-11ed-9b6a-0242ac120002
91static const AudioUuid kDynamicsProcessingSwImplUUID = {static_cast<int32_t>(0xfa818d78),
92 0x588b,
93 0x11ed,
94 0x9b6a,
95 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
96// 1411e6d6-aecd-4021-a1cf-a6aceb0d71e5
97static const AudioUuid kHapticGeneratorTypeUUID = {static_cast<int32_t>(0x1411e6d6),
98 0xaecd,
99 0x4021,
100 0xa1cf,
101 {0xa6, 0xac, 0xeb, 0x0d, 0x71, 0xe5}};
102// fa819110-588b-11ed-9b6a-0242ac120002
103static const AudioUuid kHapticGeneratorSwImplUUID = {static_cast<int32_t>(0xfa819110),
104 0x588b,
105 0x11ed,
106 0x9b6a,
107 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
108// fe3199be-aed0-413f-87bb-11260eb63cf1
109static const AudioUuid kLoudnessEnhancerTypeUUID = {static_cast<int32_t>(0xfe3199be),
110 0xaed0,
111 0x413f,
112 0x87bb,
113 {0x11, 0x26, 0x0e, 0xb6, 0x3c, 0xf1}};
114// fa819610-588b-11ed-9b6a-0242ac120002
115static const AudioUuid kLoudnessEnhancerSwImplUUID = {static_cast<int32_t>(0xfa819610),
116 0x588b,
117 0x11ed,
118 0x9b6a,
119 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
120// c2e5d5f0-94bd-4763-9cac-4e234d06839e
121static const AudioUuid kEnvReverbTypeUUID = {static_cast<int32_t>(0xc2e5d5f0),
122 0x94bd,
123 0x4763,
124 0x9cac,
125 {0x4e, 0x23, 0x4d, 0x06, 0x83, 0x9e}};
126// fa819886-588b-11ed-9b6a-0242ac120002
127static const AudioUuid kEnvReverbSwImplUUID = {static_cast<int32_t>(0xfa819886),
128 0x588b,
129 0x11ed,
130 0x9b6a,
131 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
132// 47382d60-ddd8-11db-bf3a-0002a5d5c51b
133static const AudioUuid kPresetReverbTypeUUID = {static_cast<int32_t>(0x47382d60),
134 0xddd8,
135 0x11db,
136 0xbf3a,
137 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
138// fa8199c6-588b-11ed-9b6a-0242ac120002
139static const AudioUuid kPresetReverbSwImplUUID = {static_cast<int32_t>(0xfa8199c6),
140 0x588b,
141 0x11ed,
142 0x9b6a,
143 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
144// 37cc2c00-dddd-11db-8577-0002a5d5c51b
145static const AudioUuid kVirtualizerTypeUUID = {static_cast<int32_t>(0x37cc2c00),
146 0xdddd,
147 0x11db,
148 0x8577,
149 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
150// fa819d86-588b-11ed-9b6a-0242ac120002
151static const AudioUuid kVirtualizerSwImplUUID = {static_cast<int32_t>(0xfa819d86),
152 0x588b,
153 0x11ed,
154 0x9b6a,
155 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
156// fa819f3e-588b-11ed-9b6a-0242ac120002
157static const AudioUuid kVisualizerTypeUUID = {static_cast<int32_t>(0xfa819f3e),
158 0x588b,
159 0x11ed,
160 0x9b6a,
161 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
162// fa81a0f6-588b-11ed-9b6a-0242ac120002
163static const AudioUuid kVisualizerSwImplUUID = {static_cast<int32_t>(0xfa81a0f6),
164 0x588b,
165 0x11ed,
166 0x9b6a,
167 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
168// fa81a2b8-588b-11ed-9b6a-0242ac120002
169static const AudioUuid kVolumeTypeUUID = {static_cast<int32_t>(0xfa81a2b8),
170 0x588b,
171 0x11ed,
172 0x9b6a,
173 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
174// fa81a718-588b-11ed-9b6a-0242ac120002
175static const AudioUuid kVolumeSwImplUUID = {static_cast<int32_t>(0xfa81a718),
176 0x588b,
177 0x11ed,
178 0x9b6a,
179 {0x02, 0x42, 0xac, 0x12, 0x00, 0x02}};
Shunkai Yaoea24c1a2022-09-28 17:39:23 +0000180
Shunkai Yao52abf0a2022-11-08 02:44:03 +0000181/**
182 * @brief A map between effect name and effect type UUID.
183 * All <name> attribution in effect/effectProxy of audio_effects.xml should be listed in this map.
184 * We need this map is because existing audio_effects.xml don't have a type UUID defined.
185 */
186static const std::map<const std::string /* effect type */, const AudioUuid&> kUuidNameTypeMap = {
Shunkai Yao812d5b42022-11-16 18:08:50 +0000187 {"bassboost", kBassBoostTypeUUID},
188 {"downmix", kDownmixTypeUUID},
189 {"dynamics_processing", kDynamicsProcessingTypeUUID},
190 {"equalizer", kEqualizerTypeUUID},
191 {"haptic_generator", kHapticGeneratorTypeUUID},
192 {"loudness_enhancer", kLoudnessEnhancerTypeUUID},
193 {"env_reverb", kEnvReverbTypeUUID},
194 {"preset_reverb", kPresetReverbTypeUUID},
195 {"reverb_env_aux", kEnvReverbTypeUUID},
196 {"reverb_env_ins", kEnvReverbTypeUUID},
197 {"reverb_pre_aux", kPresetReverbTypeUUID},
198 {"reverb_pre_ins", kPresetReverbTypeUUID},
199 {"virtualizer", kVirtualizerTypeUUID},
200 {"visualizer", kVisualizerTypeUUID},
201 {"volume", kVolumeTypeUUID},
Shunkai Yao52abf0a2022-11-08 02:44:03 +0000202};
203
Shunkai Yaoea24c1a2022-09-28 17:39:23 +0000204} // namespace aidl::android::hardware::audio::effect