1 #ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_TYPES_H
2 #define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_TYPES_H
3 
4 #include <android/hardware/audio/common/7.0/types.h>
5 #include <android/hidl/safe_union/1.0/types.h>
6 
7 #include <hidl/HidlSupport.h>
8 #include <hidl/MQDescriptor.h>
9 #include <utils/NativeHandle.h>
10 #include <utils/misc.h>
11 
12 namespace android {
13 namespace hardware {
14 namespace audio {
15 namespace effect {
16 namespace V7_0 {
17 
18 // Forward declaration for forward reference support:
19 enum class Result : int32_t;
20 enum class EffectFlags : int32_t;
21 struct EffectDescriptor;
22 struct AudioBuffer;
23 enum class EffectBufferAccess : int32_t;
24 struct EffectBufferConfig;
25 struct EffectConfig;
26 enum class EffectFeature : int32_t;
27 struct EffectAuxChannelsConfig;
28 struct EffectOffloadParameter;
29 enum class MessageQueueFlagBits : uint32_t;
30 
31 enum class Result : int32_t {
32     OK = 0,
33     NOT_INITIALIZED = 1 /* ::android::hardware::audio::effect::V7_0::Result.OK implicitly + 1 */,
34     INVALID_ARGUMENTS = 2 /* ::android::hardware::audio::effect::V7_0::Result.NOT_INITIALIZED implicitly + 1 */,
35     INVALID_STATE = 3 /* ::android::hardware::audio::effect::V7_0::Result.INVALID_ARGUMENTS implicitly + 1 */,
36     NOT_SUPPORTED = 4 /* ::android::hardware::audio::effect::V7_0::Result.INVALID_STATE implicitly + 1 */,
37     RESULT_TOO_BIG = 5 /* ::android::hardware::audio::effect::V7_0::Result.NOT_SUPPORTED implicitly + 1 */,
38 };
39 
40 /**
41  * Effect engine capabilities/requirements flags.
42  *
43  * Definitions for flags field of effect descriptor.
44  *
45  * +----------------+--------+--------------------------------------------------
46  * | description    | bits   | values
47  * +----------------+--------+--------------------------------------------------
48  * | connection     | 0..2   | 0 insert: after track process
49  * | mode           |        | 1 auxiliary: connect to track auxiliary
50  * |                |        |  output and use send level
51  * |                |        | 2 replace: replaces track process function;
52  * |                |        |   must implement SRC, volume and mono to stereo.
53  * |                |        | 3 pre processing: applied below audio HAL on in
54  * |                |        | 4 post processing: applied below audio HAL on out
55  * |                |        | 5 - 7 reserved
56  * +----------------+--------+--------------------------------------------------
57  * | insertion      | 3..5   | 0 none
58  * | preference     |        | 1 first of the chain
59  * |                |        | 2 last of the chain
60  * |                |        | 3 exclusive (only effect in the insert chain)
61  * |                |        | 4..7 reserved
62  * +----------------+--------+--------------------------------------------------
63  * | Volume         | 6..8   | 0 none
64  * | management     |        | 1 implements volume control
65  * |                |        | 2 requires volume indication
66  * |                |        | 3 monitors requested volume
67  * |                |        | 4 reserved
68  * +----------------+--------+--------------------------------------------------
69  * | Device         | 9..11  | 0 none
70  * | indication     |        | 1 requires device updates
71  * |                |        | 2, 4 reserved
72  * +----------------+--------+--------------------------------------------------
73  * | Sample input   | 12..13 | 1 direct: process() function or
74  * | mode           |        |   EFFECT_CMD_SET_CONFIG command must specify
75  * |                |        |   a buffer descriptor
76  * |                |        | 2 provider: process() function uses the
77  * |                |        |   bufferProvider indicated by the
78  * |                |        |   EFFECT_CMD_SET_CONFIG command to request input.
79  * |                |        |   buffers.
80  * |                |        | 3 both: both input modes are supported
81  * +----------------+--------+--------------------------------------------------
82  * | Sample output  | 14..15 | 1 direct: process() function or
83  * | mode           |        |   EFFECT_CMD_SET_CONFIG command must specify
84  * |                |        |   a buffer descriptor
85  * |                |        | 2 provider: process() function uses the
86  * |                |        |   bufferProvider indicated by the
87  * |                |        |   EFFECT_CMD_SET_CONFIG command to request output
88  * |                |        |   buffers.
89  * |                |        | 3 both: both output modes are supported
90  * +----------------+--------+--------------------------------------------------
91  * | Hardware       | 16..17 | 0 No hardware acceleration
92  * | acceleration   |        | 1 non tunneled hw acceleration: the process()
93  * |                |        |   function reads the samples, send them to HW
94  * |                |        |   accelerated effect processor, reads back
95  * |                |        |   the processed samples and returns them
96  * |                |        |   to the output buffer.
97  * |                |        | 2 tunneled hw acceleration: the process()
98  * |                |        |   function is transparent. The effect interface
99  * |                |        |   is only used to control the effect engine.
100  * |                |        |   This mode is relevant for global effects
101  * |                |        |   actually applied by the audio hardware on
102  * |                |        |   the output stream.
103  * +----------------+--------+--------------------------------------------------
104  * | Audio Mode     | 18..19 | 0 none
105  * | indication     |        | 1 requires audio mode updates
106  * |                |        | 2..3 reserved
107  * +----------------+--------+--------------------------------------------------
108  * | Audio source   | 20..21 | 0 none
109  * | indication     |        | 1 requires audio source updates
110  * |                |        | 2..3 reserved
111  * +----------------+--------+--------------------------------------------------
112  * | Effect offload | 22     | 0 The effect cannot be offloaded to an audio DSP
113  * | supported      |        | 1 The effect can be offloaded to an audio DSP
114  * +----------------+--------+--------------------------------------------------
115  * | Process        | 23     | 0 The effect implements a process function.
116  * | function       |        | 1 The effect does not implement a process
117  * | not            |        |   function: enabling the effect has no impact
118  * | implemented    |        |   on latency or CPU load.
119  * |                |        |   Effect implementations setting this flag do not
120  * |                |        |   have to implement a process function.
121  * +----------------+--------+--------------------------------------------------
122  */
123 enum class EffectFlags : int32_t {
124     TYPE_SHIFT = 0,
125     TYPE_SIZE = 3,
126     TYPE_MASK = 7 /* ((1 << TYPE_SIZE) - 1) << TYPE_SHIFT */,
127     TYPE_INSERT = 0 /* 0 << TYPE_SHIFT */,
128     TYPE_AUXILIARY = 1 /* 1 << TYPE_SHIFT */,
129     TYPE_REPLACE = 2 /* 2 << TYPE_SHIFT */,
130     TYPE_PRE_PROC = 3 /* 3 << TYPE_SHIFT */,
131     TYPE_POST_PROC = 4 /* 4 << TYPE_SHIFT */,
132     INSERT_SHIFT = 3 /* TYPE_SHIFT + TYPE_SIZE */,
133     INSERT_SIZE = 3,
134     INSERT_MASK = 56 /* ((1 << INSERT_SIZE) - 1) << INSERT_SHIFT */,
135     INSERT_ANY = 0 /* 0 << INSERT_SHIFT */,
136     INSERT_FIRST = 8 /* 1 << INSERT_SHIFT */,
137     INSERT_LAST = 16 /* 2 << INSERT_SHIFT */,
138     INSERT_EXCLUSIVE = 24 /* 3 << INSERT_SHIFT */,
139     VOLUME_SHIFT = 6 /* INSERT_SHIFT + INSERT_SIZE */,
140     VOLUME_SIZE = 3,
141     VOLUME_MASK = 448 /* ((1 << VOLUME_SIZE) - 1) << VOLUME_SHIFT */,
142     VOLUME_CTRL = 64 /* 1 << VOLUME_SHIFT */,
143     VOLUME_IND = 128 /* 2 << VOLUME_SHIFT */,
144     VOLUME_MONITOR = 192 /* 3 << VOLUME_SHIFT */,
145     VOLUME_NONE = 0 /* 0 << VOLUME_SHIFT */,
146     DEVICE_SHIFT = 9 /* VOLUME_SHIFT + VOLUME_SIZE */,
147     DEVICE_SIZE = 3,
148     DEVICE_MASK = 3584 /* ((1 << DEVICE_SIZE) - 1) << DEVICE_SHIFT */,
149     DEVICE_IND = 512 /* 1 << DEVICE_SHIFT */,
150     DEVICE_NONE = 0 /* 0 << DEVICE_SHIFT */,
151     INPUT_SHIFT = 12 /* DEVICE_SHIFT + DEVICE_SIZE */,
152     INPUT_SIZE = 2,
153     INPUT_MASK = 12288 /* ((1 << INPUT_SIZE) - 1) << INPUT_SHIFT */,
154     INPUT_DIRECT = 4096 /* 1 << INPUT_SHIFT */,
155     INPUT_PROVIDER = 8192 /* 2 << INPUT_SHIFT */,
156     INPUT_BOTH = 12288 /* 3 << INPUT_SHIFT */,
157     OUTPUT_SHIFT = 14 /* INPUT_SHIFT + INPUT_SIZE */,
158     OUTPUT_SIZE = 2,
159     OUTPUT_MASK = 49152 /* ((1 << OUTPUT_SIZE) - 1) << OUTPUT_SHIFT */,
160     OUTPUT_DIRECT = 16384 /* 1 << OUTPUT_SHIFT */,
161     OUTPUT_PROVIDER = 32768 /* 2 << OUTPUT_SHIFT */,
162     OUTPUT_BOTH = 49152 /* 3 << OUTPUT_SHIFT */,
163     HW_ACC_SHIFT = 16 /* OUTPUT_SHIFT + OUTPUT_SIZE */,
164     HW_ACC_SIZE = 2,
165     HW_ACC_MASK = 196608 /* ((1 << HW_ACC_SIZE) - 1) << HW_ACC_SHIFT */,
166     HW_ACC_SIMPLE = 65536 /* 1 << HW_ACC_SHIFT */,
167     HW_ACC_TUNNEL = 131072 /* 2 << HW_ACC_SHIFT */,
168     AUDIO_MODE_SHIFT = 18 /* HW_ACC_SHIFT + HW_ACC_SIZE */,
169     AUDIO_MODE_SIZE = 2,
170     AUDIO_MODE_MASK = 786432 /* ((1 << AUDIO_MODE_SIZE) - 1) << AUDIO_MODE_SHIFT */,
171     AUDIO_MODE_IND = 262144 /* 1 << AUDIO_MODE_SHIFT */,
172     AUDIO_MODE_NONE = 0 /* 0 << AUDIO_MODE_SHIFT */,
173     AUDIO_SOURCE_SHIFT = 20 /* AUDIO_MODE_SHIFT + AUDIO_MODE_SIZE */,
174     AUDIO_SOURCE_SIZE = 2,
175     AUDIO_SOURCE_MASK = 3145728 /* ((1 << AUDIO_SOURCE_SIZE) - 1) << AUDIO_SOURCE_SHIFT */,
176     AUDIO_SOURCE_IND = 1048576 /* 1 << AUDIO_SOURCE_SHIFT */,
177     AUDIO_SOURCE_NONE = 0 /* 0 << AUDIO_SOURCE_SHIFT */,
178     OFFLOAD_SHIFT = 22 /* AUDIO_SOURCE_SHIFT + AUDIO_SOURCE_SIZE */,
179     OFFLOAD_SIZE = 1,
180     OFFLOAD_MASK = 4194304 /* ((1 << OFFLOAD_SIZE) - 1) << OFFLOAD_SHIFT */,
181     OFFLOAD_SUPPORTED = 4194304 /* 1 << OFFLOAD_SHIFT */,
182     NO_PROCESS_SHIFT = 23 /* OFFLOAD_SHIFT + OFFLOAD_SIZE */,
183     NO_PROCESS_SIZE = 1,
184     NO_PROCESS_MASK = 8388608 /* ((1 << NO_PROCESS_SIZE) - 1) << NO_PROCESS_SHIFT */,
185     NO_PROCESS = 8388608 /* 1 << NO_PROCESS_SHIFT */,
186 };
187 
188 /**
189  * The effect descriptor contains necessary information to facilitate the
190  * enumeration of the effect engines present in a library.
191  */
192 struct EffectDescriptor final {
193     /**
194      * UUID of to the OpenSL ES interface implemented by this effect.
195      */
196     ::android::hardware::audio::common::V7_0::Uuid type __attribute__ ((aligned(4)));
197     /**
198      * UUID for this particular implementation.
199      */
200     ::android::hardware::audio::common::V7_0::Uuid uuid __attribute__ ((aligned(4)));
201     /**
202      * Effect engine capabilities/requirements flags.
203      */
204     ::android::hardware::hidl_bitfield<::android::hardware::audio::effect::V7_0::EffectFlags> flags __attribute__ ((aligned(4)));
205     /**
206      * CPU load indication expressed in 0.1 MIPS units as estimated on
207      * an ARM9E core (ARMv5TE) with 0 WS.
208      */
209     uint16_t cpuLoad __attribute__ ((aligned(2)));
210     /**
211      * Data memory usage expressed in KB and includes only dynamically
212      * allocated memory.
213      */
214     uint16_t memoryUsage __attribute__ ((aligned(2)));
215     /**
216      * Human readable effect name.
217      */
218     ::android::hardware::hidl_string name __attribute__ ((aligned(8)));
219     /**
220      * Human readable effect implementor name.
221      */
222     ::android::hardware::hidl_string implementor __attribute__ ((aligned(8)));
223 };
224 
225 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectDescriptor, type) == 0, "wrong offset");
226 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectDescriptor, uuid) == 16, "wrong offset");
227 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectDescriptor, flags) == 32, "wrong offset");
228 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectDescriptor, cpuLoad) == 36, "wrong offset");
229 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectDescriptor, memoryUsage) == 38, "wrong offset");
230 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectDescriptor, name) == 40, "wrong offset");
231 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectDescriptor, implementor) == 56, "wrong offset");
232 static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectDescriptor) == 72, "wrong size");
233 static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectDescriptor) == 8, "wrong alignment");
234 
235 /**
236  * A buffer is a chunk of audio data for processing.  Multi-channel audio is
237  * always interleaved. The channel order is from LSB to MSB with regard to the
238  * channel mask definition in audio.h, audio_channel_mask_t, e.g.:
239  * Stereo: L, R; 5.1: FL, FR, FC, LFE, BL, BR.
240  *
241  * The buffer size is expressed in frame count, a frame being composed of
242  * samples for all channels at a given time. Frame size for unspecified format
243  * (AUDIO_FORMAT_OTHER) is 8 bit by definition.
244  */
245 struct AudioBuffer final {
246     uint64_t id __attribute__ ((aligned(8)));
247     uint32_t frameCount __attribute__ ((aligned(4)));
248     ::android::hardware::hidl_memory data __attribute__ ((aligned(8)));
249 };
250 
251 static_assert(offsetof(::android::hardware::audio::effect::V7_0::AudioBuffer, id) == 0, "wrong offset");
252 static_assert(offsetof(::android::hardware::audio::effect::V7_0::AudioBuffer, frameCount) == 8, "wrong offset");
253 static_assert(offsetof(::android::hardware::audio::effect::V7_0::AudioBuffer, data) == 16, "wrong offset");
254 static_assert(sizeof(::android::hardware::audio::effect::V7_0::AudioBuffer) == 56, "wrong size");
255 static_assert(__alignof(::android::hardware::audio::effect::V7_0::AudioBuffer) == 8, "wrong alignment");
256 
257 enum class EffectBufferAccess : int32_t {
258     ACCESS_WRITE = 0,
259     ACCESS_READ = 1 /* ::android::hardware::audio::effect::V7_0::EffectBufferAccess.ACCESS_WRITE implicitly + 1 */,
260     ACCESS_ACCUMULATE = 2 /* ::android::hardware::audio::effect::V7_0::EffectBufferAccess.ACCESS_READ implicitly + 1 */,
261 };
262 
263 /**
264  * The buffer config structure specifies the input or output audio format
265  * to be used by the effect engine.
266  */
267 struct EffectBufferConfig final {
268     // Forward declaration for forward reference support:
269     struct OptionalBuffer;
270     struct OptionalAccessMode;
271 
272     struct OptionalBuffer final {
273         enum class hidl_discriminator : uint8_t {
274             unspecified = 0,  // ::android::hidl::safe_union::V1_0::Monostate
275             buf = 1,  // ::android::hardware::audio::effect::V7_0::AudioBuffer
276         };
277 
278         OptionalBuffer();
279         ~OptionalBuffer();
280         OptionalBuffer(OptionalBuffer&&);
281         OptionalBuffer(const OptionalBuffer&);
282         OptionalBuffer& operator=(OptionalBuffer&&);
283         OptionalBuffer& operator=(const OptionalBuffer&);
284 
285         void unspecified(const ::android::hidl::safe_union::V1_0::Monostate&);
286         void unspecified(::android::hidl::safe_union::V1_0::Monostate&&);
287         ::android::hidl::safe_union::V1_0::Monostate& unspecified();
288         const ::android::hidl::safe_union::V1_0::Monostate& unspecified() const;
289 
290         void buf(const ::android::hardware::audio::effect::V7_0::AudioBuffer&);
291         void buf(::android::hardware::audio::effect::V7_0::AudioBuffer&&);
292         ::android::hardware::audio::effect::V7_0::AudioBuffer& buf();
293         const ::android::hardware::audio::effect::V7_0::AudioBuffer& buf() const;
294 
295         // Utility methods
296         hidl_discriminator getDiscriminator() const;
297 
hidl_getUnionOffsetfinal::final298         constexpr size_t hidl_getUnionOffset() const {
299             return offsetof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer, hidl_u);
300         }
301 
302     private:
303         void hidl_destructUnion();
304 
305         hidl_discriminator hidl_d __attribute__ ((aligned(1))) ;
306         union hidl_union final {
307             ::android::hidl::safe_union::V1_0::Monostate unspecified __attribute__ ((aligned(1)));
308             ::android::hardware::audio::effect::V7_0::AudioBuffer buf __attribute__ ((aligned(8)));
309 
310             hidl_union();
311             ~hidl_union();
312         } hidl_u;
313 
314         static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer::hidl_union) == 56, "wrong size");
315         static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer::hidl_union) == 8, "wrong alignment");
316         static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer::hidl_discriminator) == 1, "wrong size");
317         static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer::hidl_discriminator) == 1, "wrong alignment");
318     };
319 
320     static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer) == 64, "wrong size");
321     static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer) == 8, "wrong alignment");
322 
323     struct OptionalAccessMode final {
324         enum class hidl_discriminator : uint8_t {
325             unspecified = 0,  // ::android::hidl::safe_union::V1_0::Monostate
326             value = 1,  // ::android::hardware::audio::effect::V7_0::EffectBufferAccess
327         };
328 
329         OptionalAccessMode();
330         ~OptionalAccessMode();
331         OptionalAccessMode(OptionalAccessMode&&);
332         OptionalAccessMode(const OptionalAccessMode&);
333         OptionalAccessMode& operator=(OptionalAccessMode&&);
334         OptionalAccessMode& operator=(const OptionalAccessMode&);
335 
336         void unspecified(const ::android::hidl::safe_union::V1_0::Monostate&);
337         void unspecified(::android::hidl::safe_union::V1_0::Monostate&&);
338         ::android::hidl::safe_union::V1_0::Monostate& unspecified();
339         const ::android::hidl::safe_union::V1_0::Monostate& unspecified() const;
340 
341         void value(::android::hardware::audio::effect::V7_0::EffectBufferAccess);
342         ::android::hardware::audio::effect::V7_0::EffectBufferAccess& value();
343         ::android::hardware::audio::effect::V7_0::EffectBufferAccess value() const;
344 
345         // Utility methods
346         hidl_discriminator getDiscriminator() const;
347 
hidl_getUnionOffsetfinal::final348         constexpr size_t hidl_getUnionOffset() const {
349             return offsetof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode, hidl_u);
350         }
351 
352     private:
353         void hidl_destructUnion();
354 
355         hidl_discriminator hidl_d __attribute__ ((aligned(1))) ;
356         union hidl_union final {
357             ::android::hidl::safe_union::V1_0::Monostate unspecified __attribute__ ((aligned(1)));
358             ::android::hardware::audio::effect::V7_0::EffectBufferAccess value __attribute__ ((aligned(4)));
359 
360             hidl_union();
361             ~hidl_union();
362         } hidl_u;
363 
364         static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode::hidl_union) == 4, "wrong size");
365         static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode::hidl_union) == 4, "wrong alignment");
366         static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode::hidl_discriminator) == 1, "wrong size");
367         static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode::hidl_discriminator) == 1, "wrong alignment");
368     };
369 
370     static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode) == 8, "wrong size");
371     static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode) == 4, "wrong alignment");
372 
373     ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer buffer __attribute__ ((aligned(8)));
374     ::android::hardware::audio::common::V7_0::AudioConfigBaseOptional base __attribute__ ((aligned(8)));
375     ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode accessMode __attribute__ ((aligned(4)));
376 };
377 
378 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectBufferConfig, buffer) == 0, "wrong offset");
379 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectBufferConfig, base) == 64, "wrong offset");
380 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectBufferConfig, accessMode) == 120, "wrong offset");
381 static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectBufferConfig) == 128, "wrong size");
382 static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectBufferConfig) == 8, "wrong alignment");
383 
384 struct EffectConfig final {
385     ::android::hardware::audio::effect::V7_0::EffectBufferConfig inputCfg __attribute__ ((aligned(8)));
386     ::android::hardware::audio::effect::V7_0::EffectBufferConfig outputCfg __attribute__ ((aligned(8)));
387 };
388 
389 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectConfig, inputCfg) == 0, "wrong offset");
390 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectConfig, outputCfg) == 128, "wrong offset");
391 static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectConfig) == 256, "wrong size");
392 static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectConfig) == 8, "wrong alignment");
393 
394 enum class EffectFeature : int32_t {
395     /**
396      * Supports auxiliary channels (e.g. dual mic noise suppressor).
397      */
398     AUX_CHANNELS = 0,
399     CNT = 1 /* ::android::hardware::audio::effect::V7_0::EffectFeature.AUX_CHANNELS implicitly + 1 */,
400 };
401 
402 struct EffectAuxChannelsConfig final {
403     /**
404      * Channel mask for main channels.
405      */
406     ::android::hardware::hidl_string mainChannels __attribute__ ((aligned(8)));
407     /**
408      * Channel mask for auxiliary channels.
409      */
410     ::android::hardware::hidl_string auxChannels __attribute__ ((aligned(8)));
411 };
412 
413 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig, mainChannels) == 0, "wrong offset");
414 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig, auxChannels) == 16, "wrong offset");
415 static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig) == 32, "wrong size");
416 static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig) == 8, "wrong alignment");
417 
418 struct EffectOffloadParameter final {
419     /**
420      * True if the playback thread the effect is attached to is offloaded.
421      */
422     bool isOffload __attribute__ ((aligned(1)));
423     /**
424      * I/O handle of the playback thread the effect is attached to.
425      */
426     int32_t ioHandle __attribute__ ((aligned(4)));
427 };
428 
429 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectOffloadParameter, isOffload) == 0, "wrong offset");
430 static_assert(offsetof(::android::hardware::audio::effect::V7_0::EffectOffloadParameter, ioHandle) == 4, "wrong offset");
431 static_assert(sizeof(::android::hardware::audio::effect::V7_0::EffectOffloadParameter) == 8, "wrong size");
432 static_assert(__alignof(::android::hardware::audio::effect::V7_0::EffectOffloadParameter) == 4, "wrong alignment");
433 
434 /**
435  * The message queue flags used to synchronize reads and writes from
436  * the status message queue used by effects.
437  */
438 enum class MessageQueueFlagBits : uint32_t {
439     DONE_PROCESSING = 1u /* 1 << 0 */,
440     REQUEST_PROCESS = 2u /* 1 << 1 */,
441     REQUEST_PROCESS_REVERSE = 4u /* 1 << 2 */,
442     REQUEST_QUIT = 8u /* 1 << 3 */,
443     REQUEST_PROCESS_ALL = 14u /* REQUEST_PROCESS | REQUEST_PROCESS_REVERSE | REQUEST_QUIT */,
444 };
445 
446 //
447 // type declarations for package
448 //
449 
450 template<typename>
451 static inline std::string toString(int32_t o);
452 static inline std::string toString(::android::hardware::audio::effect::V7_0::Result o);
453 static inline void PrintTo(::android::hardware::audio::effect::V7_0::Result o, ::std::ostream* os);
454 constexpr int32_t operator|(const ::android::hardware::audio::effect::V7_0::Result lhs, const ::android::hardware::audio::effect::V7_0::Result rhs) {
455     return static_cast<int32_t>(static_cast<int32_t>(lhs) | static_cast<int32_t>(rhs));
456 }
457 constexpr int32_t operator|(const int32_t lhs, const ::android::hardware::audio::effect::V7_0::Result rhs) {
458     return static_cast<int32_t>(lhs | static_cast<int32_t>(rhs));
459 }
460 constexpr int32_t operator|(const ::android::hardware::audio::effect::V7_0::Result lhs, const int32_t rhs) {
461     return static_cast<int32_t>(static_cast<int32_t>(lhs) | rhs);
462 }
463 constexpr int32_t operator&(const ::android::hardware::audio::effect::V7_0::Result lhs, const ::android::hardware::audio::effect::V7_0::Result rhs) {
464     return static_cast<int32_t>(static_cast<int32_t>(lhs) & static_cast<int32_t>(rhs));
465 }
466 constexpr int32_t operator&(const int32_t lhs, const ::android::hardware::audio::effect::V7_0::Result rhs) {
467     return static_cast<int32_t>(lhs & static_cast<int32_t>(rhs));
468 }
469 constexpr int32_t operator&(const ::android::hardware::audio::effect::V7_0::Result lhs, const int32_t rhs) {
470     return static_cast<int32_t>(static_cast<int32_t>(lhs) & rhs);
471 }
472 constexpr int32_t &operator|=(int32_t& v, const ::android::hardware::audio::effect::V7_0::Result e) {
473     v |= static_cast<int32_t>(e);
474     return v;
475 }
476 constexpr int32_t &operator&=(int32_t& v, const ::android::hardware::audio::effect::V7_0::Result e) {
477     v &= static_cast<int32_t>(e);
478     return v;
479 }
480 
481 template<typename>
482 static inline std::string toString(int32_t o);
483 static inline std::string toString(::android::hardware::audio::effect::V7_0::EffectFlags o);
484 static inline void PrintTo(::android::hardware::audio::effect::V7_0::EffectFlags o, ::std::ostream* os);
485 constexpr int32_t operator|(const ::android::hardware::audio::effect::V7_0::EffectFlags lhs, const ::android::hardware::audio::effect::V7_0::EffectFlags rhs) {
486     return static_cast<int32_t>(static_cast<int32_t>(lhs) | static_cast<int32_t>(rhs));
487 }
488 constexpr int32_t operator|(const int32_t lhs, const ::android::hardware::audio::effect::V7_0::EffectFlags rhs) {
489     return static_cast<int32_t>(lhs | static_cast<int32_t>(rhs));
490 }
491 constexpr int32_t operator|(const ::android::hardware::audio::effect::V7_0::EffectFlags lhs, const int32_t rhs) {
492     return static_cast<int32_t>(static_cast<int32_t>(lhs) | rhs);
493 }
494 constexpr int32_t operator&(const ::android::hardware::audio::effect::V7_0::EffectFlags lhs, const ::android::hardware::audio::effect::V7_0::EffectFlags rhs) {
495     return static_cast<int32_t>(static_cast<int32_t>(lhs) & static_cast<int32_t>(rhs));
496 }
497 constexpr int32_t operator&(const int32_t lhs, const ::android::hardware::audio::effect::V7_0::EffectFlags rhs) {
498     return static_cast<int32_t>(lhs & static_cast<int32_t>(rhs));
499 }
500 constexpr int32_t operator&(const ::android::hardware::audio::effect::V7_0::EffectFlags lhs, const int32_t rhs) {
501     return static_cast<int32_t>(static_cast<int32_t>(lhs) & rhs);
502 }
503 constexpr int32_t &operator|=(int32_t& v, const ::android::hardware::audio::effect::V7_0::EffectFlags e) {
504     v |= static_cast<int32_t>(e);
505     return v;
506 }
507 constexpr int32_t &operator&=(int32_t& v, const ::android::hardware::audio::effect::V7_0::EffectFlags e) {
508     v &= static_cast<int32_t>(e);
509     return v;
510 }
511 
512 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectDescriptor& o);
513 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectDescriptor& o, ::std::ostream*);
514 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::EffectDescriptor& lhs, const ::android::hardware::audio::effect::V7_0::EffectDescriptor& rhs);
515 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::EffectDescriptor& lhs, const ::android::hardware::audio::effect::V7_0::EffectDescriptor& rhs);
516 
517 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::AudioBuffer& o);
518 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::AudioBuffer& o, ::std::ostream*);
519 // operator== and operator!= are not generated for AudioBuffer
520 
521 template<typename>
522 static inline std::string toString(int32_t o);
523 static inline std::string toString(::android::hardware::audio::effect::V7_0::EffectBufferAccess o);
524 static inline void PrintTo(::android::hardware::audio::effect::V7_0::EffectBufferAccess o, ::std::ostream* os);
525 constexpr int32_t operator|(const ::android::hardware::audio::effect::V7_0::EffectBufferAccess lhs, const ::android::hardware::audio::effect::V7_0::EffectBufferAccess rhs) {
526     return static_cast<int32_t>(static_cast<int32_t>(lhs) | static_cast<int32_t>(rhs));
527 }
528 constexpr int32_t operator|(const int32_t lhs, const ::android::hardware::audio::effect::V7_0::EffectBufferAccess rhs) {
529     return static_cast<int32_t>(lhs | static_cast<int32_t>(rhs));
530 }
531 constexpr int32_t operator|(const ::android::hardware::audio::effect::V7_0::EffectBufferAccess lhs, const int32_t rhs) {
532     return static_cast<int32_t>(static_cast<int32_t>(lhs) | rhs);
533 }
534 constexpr int32_t operator&(const ::android::hardware::audio::effect::V7_0::EffectBufferAccess lhs, const ::android::hardware::audio::effect::V7_0::EffectBufferAccess rhs) {
535     return static_cast<int32_t>(static_cast<int32_t>(lhs) & static_cast<int32_t>(rhs));
536 }
537 constexpr int32_t operator&(const int32_t lhs, const ::android::hardware::audio::effect::V7_0::EffectBufferAccess rhs) {
538     return static_cast<int32_t>(lhs & static_cast<int32_t>(rhs));
539 }
540 constexpr int32_t operator&(const ::android::hardware::audio::effect::V7_0::EffectBufferAccess lhs, const int32_t rhs) {
541     return static_cast<int32_t>(static_cast<int32_t>(lhs) & rhs);
542 }
543 constexpr int32_t &operator|=(int32_t& v, const ::android::hardware::audio::effect::V7_0::EffectBufferAccess e) {
544     v |= static_cast<int32_t>(e);
545     return v;
546 }
547 constexpr int32_t &operator&=(int32_t& v, const ::android::hardware::audio::effect::V7_0::EffectBufferAccess e) {
548     v &= static_cast<int32_t>(e);
549     return v;
550 }
551 
552 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer& o);
553 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer& o, ::std::ostream*);
554 // operator== and operator!= are not generated for OptionalBuffer
555 
556 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& o);
557 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& o, ::std::ostream*);
558 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& lhs, const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& rhs);
559 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& lhs, const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& rhs);
560 
561 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig& o);
562 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig& o, ::std::ostream*);
563 // operator== and operator!= are not generated for EffectBufferConfig
564 
565 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectConfig& o);
566 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectConfig& o, ::std::ostream*);
567 // operator== and operator!= are not generated for EffectConfig
568 
569 template<typename>
570 static inline std::string toString(int32_t o);
571 static inline std::string toString(::android::hardware::audio::effect::V7_0::EffectFeature o);
572 static inline void PrintTo(::android::hardware::audio::effect::V7_0::EffectFeature o, ::std::ostream* os);
573 constexpr int32_t operator|(const ::android::hardware::audio::effect::V7_0::EffectFeature lhs, const ::android::hardware::audio::effect::V7_0::EffectFeature rhs) {
574     return static_cast<int32_t>(static_cast<int32_t>(lhs) | static_cast<int32_t>(rhs));
575 }
576 constexpr int32_t operator|(const int32_t lhs, const ::android::hardware::audio::effect::V7_0::EffectFeature rhs) {
577     return static_cast<int32_t>(lhs | static_cast<int32_t>(rhs));
578 }
579 constexpr int32_t operator|(const ::android::hardware::audio::effect::V7_0::EffectFeature lhs, const int32_t rhs) {
580     return static_cast<int32_t>(static_cast<int32_t>(lhs) | rhs);
581 }
582 constexpr int32_t operator&(const ::android::hardware::audio::effect::V7_0::EffectFeature lhs, const ::android::hardware::audio::effect::V7_0::EffectFeature rhs) {
583     return static_cast<int32_t>(static_cast<int32_t>(lhs) & static_cast<int32_t>(rhs));
584 }
585 constexpr int32_t operator&(const int32_t lhs, const ::android::hardware::audio::effect::V7_0::EffectFeature rhs) {
586     return static_cast<int32_t>(lhs & static_cast<int32_t>(rhs));
587 }
588 constexpr int32_t operator&(const ::android::hardware::audio::effect::V7_0::EffectFeature lhs, const int32_t rhs) {
589     return static_cast<int32_t>(static_cast<int32_t>(lhs) & rhs);
590 }
591 constexpr int32_t &operator|=(int32_t& v, const ::android::hardware::audio::effect::V7_0::EffectFeature e) {
592     v |= static_cast<int32_t>(e);
593     return v;
594 }
595 constexpr int32_t &operator&=(int32_t& v, const ::android::hardware::audio::effect::V7_0::EffectFeature e) {
596     v &= static_cast<int32_t>(e);
597     return v;
598 }
599 
600 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& o);
601 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& o, ::std::ostream*);
602 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& lhs, const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& rhs);
603 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& lhs, const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& rhs);
604 
605 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& o);
606 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& o, ::std::ostream*);
607 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& lhs, const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& rhs);
608 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& lhs, const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& rhs);
609 
610 template<typename>
611 static inline std::string toString(uint32_t o);
612 static inline std::string toString(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits o);
613 static inline void PrintTo(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits o, ::std::ostream* os);
614 constexpr uint32_t operator|(const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits lhs, const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits rhs) {
615     return static_cast<uint32_t>(static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs));
616 }
617 constexpr uint32_t operator|(const uint32_t lhs, const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits rhs) {
618     return static_cast<uint32_t>(lhs | static_cast<uint32_t>(rhs));
619 }
620 constexpr uint32_t operator|(const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits lhs, const uint32_t rhs) {
621     return static_cast<uint32_t>(static_cast<uint32_t>(lhs) | rhs);
622 }
623 constexpr uint32_t operator&(const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits lhs, const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits rhs) {
624     return static_cast<uint32_t>(static_cast<uint32_t>(lhs) & static_cast<uint32_t>(rhs));
625 }
626 constexpr uint32_t operator&(const uint32_t lhs, const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits rhs) {
627     return static_cast<uint32_t>(lhs & static_cast<uint32_t>(rhs));
628 }
629 constexpr uint32_t operator&(const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits lhs, const uint32_t rhs) {
630     return static_cast<uint32_t>(static_cast<uint32_t>(lhs) & rhs);
631 }
632 constexpr uint32_t &operator|=(uint32_t& v, const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits e) {
633     v |= static_cast<uint32_t>(e);
634     return v;
635 }
636 constexpr uint32_t &operator&=(uint32_t& v, const ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits e) {
637     v &= static_cast<uint32_t>(e);
638     return v;
639 }
640 
641 //
642 // type header definitions for package
643 //
644 
645 template<>
646 inline std::string toString<::android::hardware::audio::effect::V7_0::Result>(int32_t o) {
647     using ::android::hardware::details::toHexString;
648     std::string os;
649     ::android::hardware::hidl_bitfield<::android::hardware::audio::effect::V7_0::Result> flipped = 0;
650     bool first = true;
651     if ((o & ::android::hardware::audio::effect::V7_0::Result::OK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::Result::OK)) {
652         os += (first ? "" : " | ");
653         os += "OK";
654         first = false;
655         flipped |= ::android::hardware::audio::effect::V7_0::Result::OK;
656     }
657     if ((o & ::android::hardware::audio::effect::V7_0::Result::NOT_INITIALIZED) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::Result::NOT_INITIALIZED)) {
658         os += (first ? "" : " | ");
659         os += "NOT_INITIALIZED";
660         first = false;
661         flipped |= ::android::hardware::audio::effect::V7_0::Result::NOT_INITIALIZED;
662     }
663     if ((o & ::android::hardware::audio::effect::V7_0::Result::INVALID_ARGUMENTS) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::Result::INVALID_ARGUMENTS)) {
664         os += (first ? "" : " | ");
665         os += "INVALID_ARGUMENTS";
666         first = false;
667         flipped |= ::android::hardware::audio::effect::V7_0::Result::INVALID_ARGUMENTS;
668     }
669     if ((o & ::android::hardware::audio::effect::V7_0::Result::INVALID_STATE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::Result::INVALID_STATE)) {
670         os += (first ? "" : " | ");
671         os += "INVALID_STATE";
672         first = false;
673         flipped |= ::android::hardware::audio::effect::V7_0::Result::INVALID_STATE;
674     }
675     if ((o & ::android::hardware::audio::effect::V7_0::Result::NOT_SUPPORTED) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::Result::NOT_SUPPORTED)) {
676         os += (first ? "" : " | ");
677         os += "NOT_SUPPORTED";
678         first = false;
679         flipped |= ::android::hardware::audio::effect::V7_0::Result::NOT_SUPPORTED;
680     }
681     if ((o & ::android::hardware::audio::effect::V7_0::Result::RESULT_TOO_BIG) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::Result::RESULT_TOO_BIG)) {
682         os += (first ? "" : " | ");
683         os += "RESULT_TOO_BIG";
684         first = false;
685         flipped |= ::android::hardware::audio::effect::V7_0::Result::RESULT_TOO_BIG;
686     }
687     if (o != flipped) {
688         os += (first ? "" : " | ");
689         os += toHexString(o & (~flipped));
690     }os += " (";
691     os += toHexString(o);
692     os += ")";
693     return os;
694 }
695 
toString(::android::hardware::audio::effect::V7_0::Result o)696 static inline std::string toString(::android::hardware::audio::effect::V7_0::Result o) {
697     using ::android::hardware::details::toHexString;
698     if (o == ::android::hardware::audio::effect::V7_0::Result::OK) {
699         return "OK";
700     }
701     if (o == ::android::hardware::audio::effect::V7_0::Result::NOT_INITIALIZED) {
702         return "NOT_INITIALIZED";
703     }
704     if (o == ::android::hardware::audio::effect::V7_0::Result::INVALID_ARGUMENTS) {
705         return "INVALID_ARGUMENTS";
706     }
707     if (o == ::android::hardware::audio::effect::V7_0::Result::INVALID_STATE) {
708         return "INVALID_STATE";
709     }
710     if (o == ::android::hardware::audio::effect::V7_0::Result::NOT_SUPPORTED) {
711         return "NOT_SUPPORTED";
712     }
713     if (o == ::android::hardware::audio::effect::V7_0::Result::RESULT_TOO_BIG) {
714         return "RESULT_TOO_BIG";
715     }
716     std::string os;
717     os += toHexString(static_cast<int32_t>(o));
718     return os;
719 }
720 
PrintTo(::android::hardware::audio::effect::V7_0::Result o,::std::ostream * os)721 static inline void PrintTo(::android::hardware::audio::effect::V7_0::Result o, ::std::ostream* os) {
722     *os << toString(o);
723 }
724 
725 template<>
726 inline std::string toString<::android::hardware::audio::effect::V7_0::EffectFlags>(int32_t o) {
727     using ::android::hardware::details::toHexString;
728     std::string os;
729     ::android::hardware::hidl_bitfield<::android::hardware::audio::effect::V7_0::EffectFlags> flipped = 0;
730     bool first = true;
731     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SHIFT)) {
732         os += (first ? "" : " | ");
733         os += "TYPE_SHIFT";
734         first = false;
735         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SHIFT;
736     }
737     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SIZE)) {
738         os += (first ? "" : " | ");
739         os += "TYPE_SIZE";
740         first = false;
741         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SIZE;
742     }
743     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_MASK)) {
744         os += (first ? "" : " | ");
745         os += "TYPE_MASK";
746         first = false;
747         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_MASK;
748     }
749     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_INSERT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_INSERT)) {
750         os += (first ? "" : " | ");
751         os += "TYPE_INSERT";
752         first = false;
753         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_INSERT;
754     }
755     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_AUXILIARY) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_AUXILIARY)) {
756         os += (first ? "" : " | ");
757         os += "TYPE_AUXILIARY";
758         first = false;
759         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_AUXILIARY;
760     }
761     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_REPLACE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_REPLACE)) {
762         os += (first ? "" : " | ");
763         os += "TYPE_REPLACE";
764         first = false;
765         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_REPLACE;
766     }
767     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_PRE_PROC) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_PRE_PROC)) {
768         os += (first ? "" : " | ");
769         os += "TYPE_PRE_PROC";
770         first = false;
771         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_PRE_PROC;
772     }
773     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_POST_PROC) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_POST_PROC)) {
774         os += (first ? "" : " | ");
775         os += "TYPE_POST_PROC";
776         first = false;
777         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_POST_PROC;
778     }
779     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SHIFT)) {
780         os += (first ? "" : " | ");
781         os += "INSERT_SHIFT";
782         first = false;
783         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SHIFT;
784     }
785     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SIZE)) {
786         os += (first ? "" : " | ");
787         os += "INSERT_SIZE";
788         first = false;
789         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SIZE;
790     }
791     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_MASK)) {
792         os += (first ? "" : " | ");
793         os += "INSERT_MASK";
794         first = false;
795         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_MASK;
796     }
797     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_ANY) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_ANY)) {
798         os += (first ? "" : " | ");
799         os += "INSERT_ANY";
800         first = false;
801         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_ANY;
802     }
803     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_FIRST) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_FIRST)) {
804         os += (first ? "" : " | ");
805         os += "INSERT_FIRST";
806         first = false;
807         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_FIRST;
808     }
809     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_LAST) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_LAST)) {
810         os += (first ? "" : " | ");
811         os += "INSERT_LAST";
812         first = false;
813         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_LAST;
814     }
815     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_EXCLUSIVE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_EXCLUSIVE)) {
816         os += (first ? "" : " | ");
817         os += "INSERT_EXCLUSIVE";
818         first = false;
819         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_EXCLUSIVE;
820     }
821     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SHIFT)) {
822         os += (first ? "" : " | ");
823         os += "VOLUME_SHIFT";
824         first = false;
825         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SHIFT;
826     }
827     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SIZE)) {
828         os += (first ? "" : " | ");
829         os += "VOLUME_SIZE";
830         first = false;
831         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SIZE;
832     }
833     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MASK)) {
834         os += (first ? "" : " | ");
835         os += "VOLUME_MASK";
836         first = false;
837         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MASK;
838     }
839     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_CTRL) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_CTRL)) {
840         os += (first ? "" : " | ");
841         os += "VOLUME_CTRL";
842         first = false;
843         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_CTRL;
844     }
845     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_IND) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_IND)) {
846         os += (first ? "" : " | ");
847         os += "VOLUME_IND";
848         first = false;
849         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_IND;
850     }
851     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MONITOR) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MONITOR)) {
852         os += (first ? "" : " | ");
853         os += "VOLUME_MONITOR";
854         first = false;
855         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MONITOR;
856     }
857     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_NONE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_NONE)) {
858         os += (first ? "" : " | ");
859         os += "VOLUME_NONE";
860         first = false;
861         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_NONE;
862     }
863     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SHIFT)) {
864         os += (first ? "" : " | ");
865         os += "DEVICE_SHIFT";
866         first = false;
867         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SHIFT;
868     }
869     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SIZE)) {
870         os += (first ? "" : " | ");
871         os += "DEVICE_SIZE";
872         first = false;
873         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SIZE;
874     }
875     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_MASK)) {
876         os += (first ? "" : " | ");
877         os += "DEVICE_MASK";
878         first = false;
879         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_MASK;
880     }
881     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_IND) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_IND)) {
882         os += (first ? "" : " | ");
883         os += "DEVICE_IND";
884         first = false;
885         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_IND;
886     }
887     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_NONE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_NONE)) {
888         os += (first ? "" : " | ");
889         os += "DEVICE_NONE";
890         first = false;
891         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_NONE;
892     }
893     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SHIFT)) {
894         os += (first ? "" : " | ");
895         os += "INPUT_SHIFT";
896         first = false;
897         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SHIFT;
898     }
899     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SIZE)) {
900         os += (first ? "" : " | ");
901         os += "INPUT_SIZE";
902         first = false;
903         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SIZE;
904     }
905     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_MASK)) {
906         os += (first ? "" : " | ");
907         os += "INPUT_MASK";
908         first = false;
909         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_MASK;
910     }
911     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_DIRECT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_DIRECT)) {
912         os += (first ? "" : " | ");
913         os += "INPUT_DIRECT";
914         first = false;
915         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_DIRECT;
916     }
917     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_PROVIDER) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_PROVIDER)) {
918         os += (first ? "" : " | ");
919         os += "INPUT_PROVIDER";
920         first = false;
921         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_PROVIDER;
922     }
923     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_BOTH) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_BOTH)) {
924         os += (first ? "" : " | ");
925         os += "INPUT_BOTH";
926         first = false;
927         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_BOTH;
928     }
929     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SHIFT)) {
930         os += (first ? "" : " | ");
931         os += "OUTPUT_SHIFT";
932         first = false;
933         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SHIFT;
934     }
935     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SIZE)) {
936         os += (first ? "" : " | ");
937         os += "OUTPUT_SIZE";
938         first = false;
939         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SIZE;
940     }
941     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_MASK)) {
942         os += (first ? "" : " | ");
943         os += "OUTPUT_MASK";
944         first = false;
945         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_MASK;
946     }
947     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_DIRECT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_DIRECT)) {
948         os += (first ? "" : " | ");
949         os += "OUTPUT_DIRECT";
950         first = false;
951         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_DIRECT;
952     }
953     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_PROVIDER) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_PROVIDER)) {
954         os += (first ? "" : " | ");
955         os += "OUTPUT_PROVIDER";
956         first = false;
957         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_PROVIDER;
958     }
959     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_BOTH) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_BOTH)) {
960         os += (first ? "" : " | ");
961         os += "OUTPUT_BOTH";
962         first = false;
963         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_BOTH;
964     }
965     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SHIFT)) {
966         os += (first ? "" : " | ");
967         os += "HW_ACC_SHIFT";
968         first = false;
969         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SHIFT;
970     }
971     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIZE)) {
972         os += (first ? "" : " | ");
973         os += "HW_ACC_SIZE";
974         first = false;
975         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIZE;
976     }
977     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_MASK)) {
978         os += (first ? "" : " | ");
979         os += "HW_ACC_MASK";
980         first = false;
981         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_MASK;
982     }
983     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIMPLE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIMPLE)) {
984         os += (first ? "" : " | ");
985         os += "HW_ACC_SIMPLE";
986         first = false;
987         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIMPLE;
988     }
989     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_TUNNEL) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_TUNNEL)) {
990         os += (first ? "" : " | ");
991         os += "HW_ACC_TUNNEL";
992         first = false;
993         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_TUNNEL;
994     }
995     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SHIFT)) {
996         os += (first ? "" : " | ");
997         os += "AUDIO_MODE_SHIFT";
998         first = false;
999         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SHIFT;
1000     }
1001     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SIZE)) {
1002         os += (first ? "" : " | ");
1003         os += "AUDIO_MODE_SIZE";
1004         first = false;
1005         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SIZE;
1006     }
1007     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_MASK)) {
1008         os += (first ? "" : " | ");
1009         os += "AUDIO_MODE_MASK";
1010         first = false;
1011         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_MASK;
1012     }
1013     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_IND) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_IND)) {
1014         os += (first ? "" : " | ");
1015         os += "AUDIO_MODE_IND";
1016         first = false;
1017         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_IND;
1018     }
1019     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_NONE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_NONE)) {
1020         os += (first ? "" : " | ");
1021         os += "AUDIO_MODE_NONE";
1022         first = false;
1023         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_NONE;
1024     }
1025     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SHIFT)) {
1026         os += (first ? "" : " | ");
1027         os += "AUDIO_SOURCE_SHIFT";
1028         first = false;
1029         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SHIFT;
1030     }
1031     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SIZE)) {
1032         os += (first ? "" : " | ");
1033         os += "AUDIO_SOURCE_SIZE";
1034         first = false;
1035         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SIZE;
1036     }
1037     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_MASK)) {
1038         os += (first ? "" : " | ");
1039         os += "AUDIO_SOURCE_MASK";
1040         first = false;
1041         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_MASK;
1042     }
1043     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_IND) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_IND)) {
1044         os += (first ? "" : " | ");
1045         os += "AUDIO_SOURCE_IND";
1046         first = false;
1047         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_IND;
1048     }
1049     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_NONE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_NONE)) {
1050         os += (first ? "" : " | ");
1051         os += "AUDIO_SOURCE_NONE";
1052         first = false;
1053         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_NONE;
1054     }
1055     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SHIFT)) {
1056         os += (first ? "" : " | ");
1057         os += "OFFLOAD_SHIFT";
1058         first = false;
1059         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SHIFT;
1060     }
1061     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SIZE)) {
1062         os += (first ? "" : " | ");
1063         os += "OFFLOAD_SIZE";
1064         first = false;
1065         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SIZE;
1066     }
1067     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_MASK)) {
1068         os += (first ? "" : " | ");
1069         os += "OFFLOAD_MASK";
1070         first = false;
1071         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_MASK;
1072     }
1073     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SUPPORTED) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SUPPORTED)) {
1074         os += (first ? "" : " | ");
1075         os += "OFFLOAD_SUPPORTED";
1076         first = false;
1077         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SUPPORTED;
1078     }
1079     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SHIFT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SHIFT)) {
1080         os += (first ? "" : " | ");
1081         os += "NO_PROCESS_SHIFT";
1082         first = false;
1083         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SHIFT;
1084     }
1085     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SIZE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SIZE)) {
1086         os += (first ? "" : " | ");
1087         os += "NO_PROCESS_SIZE";
1088         first = false;
1089         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SIZE;
1090     }
1091     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_MASK) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_MASK)) {
1092         os += (first ? "" : " | ");
1093         os += "NO_PROCESS_MASK";
1094         first = false;
1095         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_MASK;
1096     }
1097     if ((o & ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS)) {
1098         os += (first ? "" : " | ");
1099         os += "NO_PROCESS";
1100         first = false;
1101         flipped |= ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS;
1102     }
1103     if (o != flipped) {
1104         os += (first ? "" : " | ");
1105         os += toHexString(o & (~flipped));
1106     }os += " (";
1107     os += toHexString(o);
1108     os += ")";
1109     return os;
1110 }
1111 
toString(::android::hardware::audio::effect::V7_0::EffectFlags o)1112 static inline std::string toString(::android::hardware::audio::effect::V7_0::EffectFlags o) {
1113     using ::android::hardware::details::toHexString;
1114     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SHIFT) {
1115         return "TYPE_SHIFT";
1116     }
1117     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SIZE) {
1118         return "TYPE_SIZE";
1119     }
1120     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_MASK) {
1121         return "TYPE_MASK";
1122     }
1123     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_INSERT) {
1124         return "TYPE_INSERT";
1125     }
1126     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_AUXILIARY) {
1127         return "TYPE_AUXILIARY";
1128     }
1129     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_REPLACE) {
1130         return "TYPE_REPLACE";
1131     }
1132     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_PRE_PROC) {
1133         return "TYPE_PRE_PROC";
1134     }
1135     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_POST_PROC) {
1136         return "TYPE_POST_PROC";
1137     }
1138     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SHIFT) {
1139         return "INSERT_SHIFT";
1140     }
1141     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SIZE) {
1142         return "INSERT_SIZE";
1143     }
1144     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_MASK) {
1145         return "INSERT_MASK";
1146     }
1147     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_ANY) {
1148         return "INSERT_ANY";
1149     }
1150     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_FIRST) {
1151         return "INSERT_FIRST";
1152     }
1153     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_LAST) {
1154         return "INSERT_LAST";
1155     }
1156     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_EXCLUSIVE) {
1157         return "INSERT_EXCLUSIVE";
1158     }
1159     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SHIFT) {
1160         return "VOLUME_SHIFT";
1161     }
1162     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SIZE) {
1163         return "VOLUME_SIZE";
1164     }
1165     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MASK) {
1166         return "VOLUME_MASK";
1167     }
1168     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_CTRL) {
1169         return "VOLUME_CTRL";
1170     }
1171     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_IND) {
1172         return "VOLUME_IND";
1173     }
1174     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MONITOR) {
1175         return "VOLUME_MONITOR";
1176     }
1177     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_NONE) {
1178         return "VOLUME_NONE";
1179     }
1180     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SHIFT) {
1181         return "DEVICE_SHIFT";
1182     }
1183     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SIZE) {
1184         return "DEVICE_SIZE";
1185     }
1186     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_MASK) {
1187         return "DEVICE_MASK";
1188     }
1189     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_IND) {
1190         return "DEVICE_IND";
1191     }
1192     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_NONE) {
1193         return "DEVICE_NONE";
1194     }
1195     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SHIFT) {
1196         return "INPUT_SHIFT";
1197     }
1198     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SIZE) {
1199         return "INPUT_SIZE";
1200     }
1201     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_MASK) {
1202         return "INPUT_MASK";
1203     }
1204     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_DIRECT) {
1205         return "INPUT_DIRECT";
1206     }
1207     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_PROVIDER) {
1208         return "INPUT_PROVIDER";
1209     }
1210     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_BOTH) {
1211         return "INPUT_BOTH";
1212     }
1213     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SHIFT) {
1214         return "OUTPUT_SHIFT";
1215     }
1216     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SIZE) {
1217         return "OUTPUT_SIZE";
1218     }
1219     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_MASK) {
1220         return "OUTPUT_MASK";
1221     }
1222     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_DIRECT) {
1223         return "OUTPUT_DIRECT";
1224     }
1225     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_PROVIDER) {
1226         return "OUTPUT_PROVIDER";
1227     }
1228     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_BOTH) {
1229         return "OUTPUT_BOTH";
1230     }
1231     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SHIFT) {
1232         return "HW_ACC_SHIFT";
1233     }
1234     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIZE) {
1235         return "HW_ACC_SIZE";
1236     }
1237     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_MASK) {
1238         return "HW_ACC_MASK";
1239     }
1240     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIMPLE) {
1241         return "HW_ACC_SIMPLE";
1242     }
1243     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_TUNNEL) {
1244         return "HW_ACC_TUNNEL";
1245     }
1246     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SHIFT) {
1247         return "AUDIO_MODE_SHIFT";
1248     }
1249     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SIZE) {
1250         return "AUDIO_MODE_SIZE";
1251     }
1252     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_MASK) {
1253         return "AUDIO_MODE_MASK";
1254     }
1255     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_IND) {
1256         return "AUDIO_MODE_IND";
1257     }
1258     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_NONE) {
1259         return "AUDIO_MODE_NONE";
1260     }
1261     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SHIFT) {
1262         return "AUDIO_SOURCE_SHIFT";
1263     }
1264     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SIZE) {
1265         return "AUDIO_SOURCE_SIZE";
1266     }
1267     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_MASK) {
1268         return "AUDIO_SOURCE_MASK";
1269     }
1270     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_IND) {
1271         return "AUDIO_SOURCE_IND";
1272     }
1273     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_NONE) {
1274         return "AUDIO_SOURCE_NONE";
1275     }
1276     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SHIFT) {
1277         return "OFFLOAD_SHIFT";
1278     }
1279     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SIZE) {
1280         return "OFFLOAD_SIZE";
1281     }
1282     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_MASK) {
1283         return "OFFLOAD_MASK";
1284     }
1285     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SUPPORTED) {
1286         return "OFFLOAD_SUPPORTED";
1287     }
1288     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SHIFT) {
1289         return "NO_PROCESS_SHIFT";
1290     }
1291     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SIZE) {
1292         return "NO_PROCESS_SIZE";
1293     }
1294     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_MASK) {
1295         return "NO_PROCESS_MASK";
1296     }
1297     if (o == ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS) {
1298         return "NO_PROCESS";
1299     }
1300     std::string os;
1301     os += toHexString(static_cast<int32_t>(o));
1302     return os;
1303 }
1304 
PrintTo(::android::hardware::audio::effect::V7_0::EffectFlags o,::std::ostream * os)1305 static inline void PrintTo(::android::hardware::audio::effect::V7_0::EffectFlags o, ::std::ostream* os) {
1306     *os << toString(o);
1307 }
1308 
toString(const::android::hardware::audio::effect::V7_0::EffectDescriptor & o)1309 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectDescriptor& o) {
1310     using ::android::hardware::toString;
1311     std::string os;
1312     os += "{";
1313     os += ".type = ";
1314     os += ::android::hardware::audio::common::V7_0::toString(o.type);
1315     os += ", .uuid = ";
1316     os += ::android::hardware::audio::common::V7_0::toString(o.uuid);
1317     os += ", .flags = ";
1318     os += ::android::hardware::audio::effect::V7_0::toString<::android::hardware::audio::effect::V7_0::EffectFlags>(o.flags);
1319     os += ", .cpuLoad = ";
1320     os += ::android::hardware::toString(o.cpuLoad);
1321     os += ", .memoryUsage = ";
1322     os += ::android::hardware::toString(o.memoryUsage);
1323     os += ", .name = ";
1324     os += ::android::hardware::toString(o.name);
1325     os += ", .implementor = ";
1326     os += ::android::hardware::toString(o.implementor);
1327     os += "}"; return os;
1328 }
1329 
PrintTo(const::android::hardware::audio::effect::V7_0::EffectDescriptor & o,::std::ostream * os)1330 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectDescriptor& o, ::std::ostream* os) {
1331     *os << toString(o);
1332 }
1333 
1334 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::EffectDescriptor& lhs, const ::android::hardware::audio::effect::V7_0::EffectDescriptor& rhs) {
1335     if (lhs.type != rhs.type) {
1336         return false;
1337     }
1338     if (lhs.uuid != rhs.uuid) {
1339         return false;
1340     }
1341     if (lhs.flags != rhs.flags) {
1342         return false;
1343     }
1344     if (lhs.cpuLoad != rhs.cpuLoad) {
1345         return false;
1346     }
1347     if (lhs.memoryUsage != rhs.memoryUsage) {
1348         return false;
1349     }
1350     if (lhs.name != rhs.name) {
1351         return false;
1352     }
1353     if (lhs.implementor != rhs.implementor) {
1354         return false;
1355     }
1356     return true;
1357 }
1358 
1359 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::EffectDescriptor& lhs, const ::android::hardware::audio::effect::V7_0::EffectDescriptor& rhs){
1360     return !(lhs == rhs);
1361 }
1362 
toString(const::android::hardware::audio::effect::V7_0::AudioBuffer & o)1363 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::AudioBuffer& o) {
1364     using ::android::hardware::toString;
1365     std::string os;
1366     os += "{";
1367     os += ".id = ";
1368     os += ::android::hardware::toString(o.id);
1369     os += ", .frameCount = ";
1370     os += ::android::hardware::toString(o.frameCount);
1371     os += ", .data = ";
1372     os += ::android::hardware::toString(o.data);
1373     os += "}"; return os;
1374 }
1375 
PrintTo(const::android::hardware::audio::effect::V7_0::AudioBuffer & o,::std::ostream * os)1376 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::AudioBuffer& o, ::std::ostream* os) {
1377     *os << toString(o);
1378 }
1379 
1380 // operator== and operator!= are not generated for AudioBuffer
1381 
1382 template<>
1383 inline std::string toString<::android::hardware::audio::effect::V7_0::EffectBufferAccess>(int32_t o) {
1384     using ::android::hardware::details::toHexString;
1385     std::string os;
1386     ::android::hardware::hidl_bitfield<::android::hardware::audio::effect::V7_0::EffectBufferAccess> flipped = 0;
1387     bool first = true;
1388     if ((o & ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_WRITE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_WRITE)) {
1389         os += (first ? "" : " | ");
1390         os += "ACCESS_WRITE";
1391         first = false;
1392         flipped |= ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_WRITE;
1393     }
1394     if ((o & ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_READ) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_READ)) {
1395         os += (first ? "" : " | ");
1396         os += "ACCESS_READ";
1397         first = false;
1398         flipped |= ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_READ;
1399     }
1400     if ((o & ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_ACCUMULATE) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_ACCUMULATE)) {
1401         os += (first ? "" : " | ");
1402         os += "ACCESS_ACCUMULATE";
1403         first = false;
1404         flipped |= ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_ACCUMULATE;
1405     }
1406     if (o != flipped) {
1407         os += (first ? "" : " | ");
1408         os += toHexString(o & (~flipped));
1409     }os += " (";
1410     os += toHexString(o);
1411     os += ")";
1412     return os;
1413 }
1414 
toString(::android::hardware::audio::effect::V7_0::EffectBufferAccess o)1415 static inline std::string toString(::android::hardware::audio::effect::V7_0::EffectBufferAccess o) {
1416     using ::android::hardware::details::toHexString;
1417     if (o == ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_WRITE) {
1418         return "ACCESS_WRITE";
1419     }
1420     if (o == ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_READ) {
1421         return "ACCESS_READ";
1422     }
1423     if (o == ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_ACCUMULATE) {
1424         return "ACCESS_ACCUMULATE";
1425     }
1426     std::string os;
1427     os += toHexString(static_cast<int32_t>(o));
1428     return os;
1429 }
1430 
PrintTo(::android::hardware::audio::effect::V7_0::EffectBufferAccess o,::std::ostream * os)1431 static inline void PrintTo(::android::hardware::audio::effect::V7_0::EffectBufferAccess o, ::std::ostream* os) {
1432     *os << toString(o);
1433 }
1434 
toString(const::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer & o)1435 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer& o) {
1436     using ::android::hardware::toString;
1437     std::string os;
1438     os += "{";
1439 
1440     switch (o.getDiscriminator()) {
1441         case ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer::hidl_discriminator::unspecified: {
1442             os += ".unspecified = ";
1443             os += toString(o.unspecified());
1444             break;
1445         }
1446         case ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer::hidl_discriminator::buf: {
1447             os += ".buf = ";
1448             os += toString(o.buf());
1449             break;
1450         }
1451         default: {
1452             ::android::hardware::details::logAlwaysFatal((
1453                     "Unknown union discriminator (value: " +
1454                     std::to_string(static_cast<uint8_t>(o.getDiscriminator())) + ").").c_str());
1455         }
1456     }
1457     os += "}"; return os;
1458 }
1459 
PrintTo(const::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer & o,::std::ostream * os)1460 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalBuffer& o, ::std::ostream* os) {
1461     *os << toString(o);
1462 }
1463 
1464 // operator== and operator!= are not generated for OptionalBuffer
1465 
toString(const::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode & o)1466 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& o) {
1467     using ::android::hardware::toString;
1468     std::string os;
1469     os += "{";
1470 
1471     switch (o.getDiscriminator()) {
1472         case ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode::hidl_discriminator::unspecified: {
1473             os += ".unspecified = ";
1474             os += toString(o.unspecified());
1475             break;
1476         }
1477         case ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode::hidl_discriminator::value: {
1478             os += ".value = ";
1479             os += toString(o.value());
1480             break;
1481         }
1482         default: {
1483             ::android::hardware::details::logAlwaysFatal((
1484                     "Unknown union discriminator (value: " +
1485                     std::to_string(static_cast<uint8_t>(o.getDiscriminator())) + ").").c_str());
1486         }
1487     }
1488     os += "}"; return os;
1489 }
1490 
PrintTo(const::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode & o,::std::ostream * os)1491 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& o, ::std::ostream* os) {
1492     *os << toString(o);
1493 }
1494 
1495 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& lhs, const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& rhs) {
1496     if (lhs.getDiscriminator() != rhs.getDiscriminator()) {
1497         return false;
1498     }
1499     switch (lhs.getDiscriminator()) {
1500         case ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode::hidl_discriminator::unspecified: {
1501             return (lhs.unspecified() == rhs.unspecified());
1502         }
1503         case ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode::hidl_discriminator::value: {
1504             return (lhs.value() == rhs.value());
1505         }
1506         default: {
1507             ::android::hardware::details::logAlwaysFatal((
1508                     "Unknown union discriminator (value: " +
1509                     std::to_string(static_cast<uint8_t>(lhs.getDiscriminator())) + ").").c_str());
1510         }
1511     }
1512     return true;
1513 }
1514 
1515 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& lhs, const ::android::hardware::audio::effect::V7_0::EffectBufferConfig::OptionalAccessMode& rhs){
1516     return !(lhs == rhs);
1517 }
1518 
toString(const::android::hardware::audio::effect::V7_0::EffectBufferConfig & o)1519 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig& o) {
1520     using ::android::hardware::toString;
1521     std::string os;
1522     os += "{";
1523     os += ".buffer = ";
1524     os += ::android::hardware::audio::effect::V7_0::toString(o.buffer);
1525     os += ", .base = ";
1526     os += ::android::hardware::audio::common::V7_0::toString(o.base);
1527     os += ", .accessMode = ";
1528     os += ::android::hardware::audio::effect::V7_0::toString(o.accessMode);
1529     os += "}"; return os;
1530 }
1531 
PrintTo(const::android::hardware::audio::effect::V7_0::EffectBufferConfig & o,::std::ostream * os)1532 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectBufferConfig& o, ::std::ostream* os) {
1533     *os << toString(o);
1534 }
1535 
1536 // operator== and operator!= are not generated for EffectBufferConfig
1537 
toString(const::android::hardware::audio::effect::V7_0::EffectConfig & o)1538 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectConfig& o) {
1539     using ::android::hardware::toString;
1540     std::string os;
1541     os += "{";
1542     os += ".inputCfg = ";
1543     os += ::android::hardware::audio::effect::V7_0::toString(o.inputCfg);
1544     os += ", .outputCfg = ";
1545     os += ::android::hardware::audio::effect::V7_0::toString(o.outputCfg);
1546     os += "}"; return os;
1547 }
1548 
PrintTo(const::android::hardware::audio::effect::V7_0::EffectConfig & o,::std::ostream * os)1549 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectConfig& o, ::std::ostream* os) {
1550     *os << toString(o);
1551 }
1552 
1553 // operator== and operator!= are not generated for EffectConfig
1554 
1555 template<>
1556 inline std::string toString<::android::hardware::audio::effect::V7_0::EffectFeature>(int32_t o) {
1557     using ::android::hardware::details::toHexString;
1558     std::string os;
1559     ::android::hardware::hidl_bitfield<::android::hardware::audio::effect::V7_0::EffectFeature> flipped = 0;
1560     bool first = true;
1561     if ((o & ::android::hardware::audio::effect::V7_0::EffectFeature::AUX_CHANNELS) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFeature::AUX_CHANNELS)) {
1562         os += (first ? "" : " | ");
1563         os += "AUX_CHANNELS";
1564         first = false;
1565         flipped |= ::android::hardware::audio::effect::V7_0::EffectFeature::AUX_CHANNELS;
1566     }
1567     if ((o & ::android::hardware::audio::effect::V7_0::EffectFeature::CNT) == static_cast<int32_t>(::android::hardware::audio::effect::V7_0::EffectFeature::CNT)) {
1568         os += (first ? "" : " | ");
1569         os += "CNT";
1570         first = false;
1571         flipped |= ::android::hardware::audio::effect::V7_0::EffectFeature::CNT;
1572     }
1573     if (o != flipped) {
1574         os += (first ? "" : " | ");
1575         os += toHexString(o & (~flipped));
1576     }os += " (";
1577     os += toHexString(o);
1578     os += ")";
1579     return os;
1580 }
1581 
toString(::android::hardware::audio::effect::V7_0::EffectFeature o)1582 static inline std::string toString(::android::hardware::audio::effect::V7_0::EffectFeature o) {
1583     using ::android::hardware::details::toHexString;
1584     if (o == ::android::hardware::audio::effect::V7_0::EffectFeature::AUX_CHANNELS) {
1585         return "AUX_CHANNELS";
1586     }
1587     if (o == ::android::hardware::audio::effect::V7_0::EffectFeature::CNT) {
1588         return "CNT";
1589     }
1590     std::string os;
1591     os += toHexString(static_cast<int32_t>(o));
1592     return os;
1593 }
1594 
PrintTo(::android::hardware::audio::effect::V7_0::EffectFeature o,::std::ostream * os)1595 static inline void PrintTo(::android::hardware::audio::effect::V7_0::EffectFeature o, ::std::ostream* os) {
1596     *os << toString(o);
1597 }
1598 
toString(const::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig & o)1599 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& o) {
1600     using ::android::hardware::toString;
1601     std::string os;
1602     os += "{";
1603     os += ".mainChannels = ";
1604     os += ::android::hardware::toString(o.mainChannels);
1605     os += ", .auxChannels = ";
1606     os += ::android::hardware::toString(o.auxChannels);
1607     os += "}"; return os;
1608 }
1609 
PrintTo(const::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig & o,::std::ostream * os)1610 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& o, ::std::ostream* os) {
1611     *os << toString(o);
1612 }
1613 
1614 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& lhs, const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& rhs) {
1615     if (lhs.mainChannels != rhs.mainChannels) {
1616         return false;
1617     }
1618     if (lhs.auxChannels != rhs.auxChannels) {
1619         return false;
1620     }
1621     return true;
1622 }
1623 
1624 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& lhs, const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& rhs){
1625     return !(lhs == rhs);
1626 }
1627 
toString(const::android::hardware::audio::effect::V7_0::EffectOffloadParameter & o)1628 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& o) {
1629     using ::android::hardware::toString;
1630     std::string os;
1631     os += "{";
1632     os += ".isOffload = ";
1633     os += ::android::hardware::toString(o.isOffload);
1634     os += ", .ioHandle = ";
1635     os += ::android::hardware::toString(o.ioHandle);
1636     os += "}"; return os;
1637 }
1638 
PrintTo(const::android::hardware::audio::effect::V7_0::EffectOffloadParameter & o,::std::ostream * os)1639 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& o, ::std::ostream* os) {
1640     *os << toString(o);
1641 }
1642 
1643 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& lhs, const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& rhs) {
1644     if (lhs.isOffload != rhs.isOffload) {
1645         return false;
1646     }
1647     if (lhs.ioHandle != rhs.ioHandle) {
1648         return false;
1649     }
1650     return true;
1651 }
1652 
1653 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& lhs, const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& rhs){
1654     return !(lhs == rhs);
1655 }
1656 
1657 template<>
1658 inline std::string toString<::android::hardware::audio::effect::V7_0::MessageQueueFlagBits>(uint32_t o) {
1659     using ::android::hardware::details::toHexString;
1660     std::string os;
1661     ::android::hardware::hidl_bitfield<::android::hardware::audio::effect::V7_0::MessageQueueFlagBits> flipped = 0;
1662     bool first = true;
1663     if ((o & ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::DONE_PROCESSING) == static_cast<uint32_t>(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::DONE_PROCESSING)) {
1664         os += (first ? "" : " | ");
1665         os += "DONE_PROCESSING";
1666         first = false;
1667         flipped |= ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::DONE_PROCESSING;
1668     }
1669     if ((o & ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS) == static_cast<uint32_t>(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS)) {
1670         os += (first ? "" : " | ");
1671         os += "REQUEST_PROCESS";
1672         first = false;
1673         flipped |= ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS;
1674     }
1675     if ((o & ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_REVERSE) == static_cast<uint32_t>(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_REVERSE)) {
1676         os += (first ? "" : " | ");
1677         os += "REQUEST_PROCESS_REVERSE";
1678         first = false;
1679         flipped |= ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_REVERSE;
1680     }
1681     if ((o & ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_QUIT) == static_cast<uint32_t>(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_QUIT)) {
1682         os += (first ? "" : " | ");
1683         os += "REQUEST_QUIT";
1684         first = false;
1685         flipped |= ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_QUIT;
1686     }
1687     if ((o & ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_ALL) == static_cast<uint32_t>(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_ALL)) {
1688         os += (first ? "" : " | ");
1689         os += "REQUEST_PROCESS_ALL";
1690         first = false;
1691         flipped |= ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_ALL;
1692     }
1693     if (o != flipped) {
1694         os += (first ? "" : " | ");
1695         os += toHexString(o & (~flipped));
1696     }os += " (";
1697     os += toHexString(o);
1698     os += ")";
1699     return os;
1700 }
1701 
toString(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits o)1702 static inline std::string toString(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits o) {
1703     using ::android::hardware::details::toHexString;
1704     if (o == ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::DONE_PROCESSING) {
1705         return "DONE_PROCESSING";
1706     }
1707     if (o == ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS) {
1708         return "REQUEST_PROCESS";
1709     }
1710     if (o == ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_REVERSE) {
1711         return "REQUEST_PROCESS_REVERSE";
1712     }
1713     if (o == ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_QUIT) {
1714         return "REQUEST_QUIT";
1715     }
1716     if (o == ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_ALL) {
1717         return "REQUEST_PROCESS_ALL";
1718     }
1719     std::string os;
1720     os += toHexString(static_cast<uint32_t>(o));
1721     return os;
1722 }
1723 
PrintTo(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits o,::std::ostream * os)1724 static inline void PrintTo(::android::hardware::audio::effect::V7_0::MessageQueueFlagBits o, ::std::ostream* os) {
1725     *os << toString(o);
1726 }
1727 
1728 
1729 }  // namespace V7_0
1730 }  // namespace effect
1731 }  // namespace audio
1732 }  // namespace hardware
1733 }  // namespace android
1734 
1735 //
1736 // global type declarations for package
1737 //
1738 
1739 namespace android {
1740 namespace hardware {
1741 namespace details {
1742 #pragma clang diagnostic push
1743 #pragma clang diagnostic ignored "-Wc++17-extensions"
1744 template<> inline constexpr std::array<::android::hardware::audio::effect::V7_0::Result, 6> hidl_enum_values<::android::hardware::audio::effect::V7_0::Result> = {
1745     ::android::hardware::audio::effect::V7_0::Result::OK,
1746     ::android::hardware::audio::effect::V7_0::Result::NOT_INITIALIZED,
1747     ::android::hardware::audio::effect::V7_0::Result::INVALID_ARGUMENTS,
1748     ::android::hardware::audio::effect::V7_0::Result::INVALID_STATE,
1749     ::android::hardware::audio::effect::V7_0::Result::NOT_SUPPORTED,
1750     ::android::hardware::audio::effect::V7_0::Result::RESULT_TOO_BIG,
1751 };
1752 #pragma clang diagnostic pop
1753 }  // namespace details
1754 }  // namespace hardware
1755 }  // namespace android
1756 
1757 namespace android {
1758 namespace hardware {
1759 namespace details {
1760 #pragma clang diagnostic push
1761 #pragma clang diagnostic ignored "-Wc++17-extensions"
1762 template<> inline constexpr std::array<::android::hardware::audio::effect::V7_0::EffectFlags, 62> hidl_enum_values<::android::hardware::audio::effect::V7_0::EffectFlags> = {
1763     ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SHIFT,
1764     ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_SIZE,
1765     ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_MASK,
1766     ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_INSERT,
1767     ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_AUXILIARY,
1768     ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_REPLACE,
1769     ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_PRE_PROC,
1770     ::android::hardware::audio::effect::V7_0::EffectFlags::TYPE_POST_PROC,
1771     ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SHIFT,
1772     ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_SIZE,
1773     ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_MASK,
1774     ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_ANY,
1775     ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_FIRST,
1776     ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_LAST,
1777     ::android::hardware::audio::effect::V7_0::EffectFlags::INSERT_EXCLUSIVE,
1778     ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SHIFT,
1779     ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_SIZE,
1780     ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MASK,
1781     ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_CTRL,
1782     ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_IND,
1783     ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_MONITOR,
1784     ::android::hardware::audio::effect::V7_0::EffectFlags::VOLUME_NONE,
1785     ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SHIFT,
1786     ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_SIZE,
1787     ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_MASK,
1788     ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_IND,
1789     ::android::hardware::audio::effect::V7_0::EffectFlags::DEVICE_NONE,
1790     ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SHIFT,
1791     ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_SIZE,
1792     ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_MASK,
1793     ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_DIRECT,
1794     ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_PROVIDER,
1795     ::android::hardware::audio::effect::V7_0::EffectFlags::INPUT_BOTH,
1796     ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SHIFT,
1797     ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_SIZE,
1798     ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_MASK,
1799     ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_DIRECT,
1800     ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_PROVIDER,
1801     ::android::hardware::audio::effect::V7_0::EffectFlags::OUTPUT_BOTH,
1802     ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SHIFT,
1803     ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIZE,
1804     ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_MASK,
1805     ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_SIMPLE,
1806     ::android::hardware::audio::effect::V7_0::EffectFlags::HW_ACC_TUNNEL,
1807     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SHIFT,
1808     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_SIZE,
1809     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_MASK,
1810     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_IND,
1811     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_MODE_NONE,
1812     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SHIFT,
1813     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_SIZE,
1814     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_MASK,
1815     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_IND,
1816     ::android::hardware::audio::effect::V7_0::EffectFlags::AUDIO_SOURCE_NONE,
1817     ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SHIFT,
1818     ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SIZE,
1819     ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_MASK,
1820     ::android::hardware::audio::effect::V7_0::EffectFlags::OFFLOAD_SUPPORTED,
1821     ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SHIFT,
1822     ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_SIZE,
1823     ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS_MASK,
1824     ::android::hardware::audio::effect::V7_0::EffectFlags::NO_PROCESS,
1825 };
1826 #pragma clang diagnostic pop
1827 }  // namespace details
1828 }  // namespace hardware
1829 }  // namespace android
1830 
1831 namespace android {
1832 namespace hardware {
1833 namespace details {
1834 #pragma clang diagnostic push
1835 #pragma clang diagnostic ignored "-Wc++17-extensions"
1836 template<> inline constexpr std::array<::android::hardware::audio::effect::V7_0::EffectBufferAccess, 3> hidl_enum_values<::android::hardware::audio::effect::V7_0::EffectBufferAccess> = {
1837     ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_WRITE,
1838     ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_READ,
1839     ::android::hardware::audio::effect::V7_0::EffectBufferAccess::ACCESS_ACCUMULATE,
1840 };
1841 #pragma clang diagnostic pop
1842 }  // namespace details
1843 }  // namespace hardware
1844 }  // namespace android
1845 
1846 namespace android {
1847 namespace hardware {
1848 namespace details {
1849 #pragma clang diagnostic push
1850 #pragma clang diagnostic ignored "-Wc++17-extensions"
1851 template<> inline constexpr std::array<::android::hardware::audio::effect::V7_0::EffectFeature, 2> hidl_enum_values<::android::hardware::audio::effect::V7_0::EffectFeature> = {
1852     ::android::hardware::audio::effect::V7_0::EffectFeature::AUX_CHANNELS,
1853     ::android::hardware::audio::effect::V7_0::EffectFeature::CNT,
1854 };
1855 #pragma clang diagnostic pop
1856 }  // namespace details
1857 }  // namespace hardware
1858 }  // namespace android
1859 
1860 namespace android {
1861 namespace hardware {
1862 namespace details {
1863 #pragma clang diagnostic push
1864 #pragma clang diagnostic ignored "-Wc++17-extensions"
1865 template<> inline constexpr std::array<::android::hardware::audio::effect::V7_0::MessageQueueFlagBits, 5> hidl_enum_values<::android::hardware::audio::effect::V7_0::MessageQueueFlagBits> = {
1866     ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::DONE_PROCESSING,
1867     ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS,
1868     ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_REVERSE,
1869     ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_QUIT,
1870     ::android::hardware::audio::effect::V7_0::MessageQueueFlagBits::REQUEST_PROCESS_ALL,
1871 };
1872 #pragma clang diagnostic pop
1873 }  // namespace details
1874 }  // namespace hardware
1875 }  // namespace android
1876 
1877 
1878 #endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_TYPES_H
1879