1 #ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_IEQUALIZEREFFECT_H
2 #define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_IEQUALIZEREFFECT_H
3
4 #include <android/hardware/audio/effect/7.0/IEffect.h>
5 #include <android/hardware/audio/effect/7.0/types.h>
6
7 #include <android/hidl/manager/1.0/IServiceNotification.h>
8
9 #include <hidl/HidlSupport.h>
10 #include <hidl/MQDescriptor.h>
11 #include <hidl/Status.h>
12 #include <utils/NativeHandle.h>
13 #include <utils/misc.h>
14
15 namespace android {
16 namespace hardware {
17 namespace audio {
18 namespace effect {
19 namespace V7_0 {
20
21 struct IEqualizerEffect : public ::android::hardware::audio::effect::V7_0::IEffect {
22 /**
23 * Type tag for use in template logic that indicates this is a 'pure' class.
24 */
25 typedef ::android::hardware::details::i_tag _hidl_tag;
26
27 /**
28 * Fully qualified interface name: "[email protected]::IEqualizerEffect"
29 */
30 static const char* descriptor;
31
32 // Forward declaration for forward reference support:
33 struct AllProperties;
34
35 struct AllProperties final {
36 uint16_t curPreset __attribute__ ((aligned(2)));
37 ::android::hardware::hidl_vec<int16_t> bandLevels __attribute__ ((aligned(8)));
38 };
39
40 static_assert(offsetof(::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties, curPreset) == 0, "wrong offset");
41 static_assert(offsetof(::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties, bandLevels) == 8, "wrong offset");
42 static_assert(sizeof(::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties) == 24, "wrong size");
43 static_assert(__alignof(::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties) == 8, "wrong alignment");
44
45 /**
46 * Returns whether this object's implementation is outside of the current process.
47 */
isRemoteIEqualizerEffect48 virtual bool isRemote() const override { return false; }
49
50 /**
51 * Initialize effect engine--all configurations return to default.
52 *
53 * @return retval operation completion status.
54 */
55 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> init() override = 0;
56
57 /**
58 * Apply new audio parameters configurations for input and output buffers.
59 * The provider callbacks may be empty, but in this case the buffer
60 * must be provided in the EffectConfig structure.
61 *
62 * @param config configuration descriptor.
63 * @param inputBufferProvider optional buffer provider reference.
64 * @param outputBufferProvider optional buffer provider reference.
65 * @return retval operation completion status.
66 */
67 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setConfig(const ::android::hardware::audio::effect::V7_0::EffectConfig& config, const ::android::sp<::android::hardware::audio::effect::V7_0::IEffectBufferProviderCallback>& inputBufferProvider, const ::android::sp<::android::hardware::audio::effect::V7_0::IEffectBufferProviderCallback>& outputBufferProvider) override = 0;
68
69 /**
70 * Reset the effect engine. Keep configuration but resets state and buffer
71 * content.
72 *
73 * @return retval operation completion status.
74 */
75 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> reset() override = 0;
76
77 /**
78 * Enable processing.
79 *
80 * @return retval operation completion status.
81 */
82 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> enable() override = 0;
83
84 /**
85 * Disable processing.
86 *
87 * @return retval operation completion status.
88 */
89 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> disable() override = 0;
90
91 /**
92 * Set the rendering device the audio output path is connected to. The
93 * effect implementation must set EFFECT_FLAG_DEVICE_IND flag in its
94 * descriptor to receive this command when the device changes.
95 *
96 * Note: this method is only supported for effects inserted into
97 * the output chain.
98 *
99 * @param device output device specification.
100 * @return retval operation completion status.
101 */
102 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setDevice(const ::android::hardware::audio::common::V7_0::DeviceAddress& device) override = 0;
103
104 /**
105 * Return callback for setAndGetVolume
106 */
107 using setAndGetVolume_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::hidl_vec<uint32_t>& result)>;
108 /**
109 * Set and get volume. Used by audio framework to delegate volume control to
110 * effect engine. The effect implementation must set EFFECT_FLAG_VOLUME_CTRL
111 * flag in its descriptor to receive this command. The effect engine must
112 * return the volume that should be applied before the effect is
113 * processed. The overall volume (the volume actually applied by the effect
114 * engine multiplied by the returned value) should match the value indicated
115 * in the command.
116 *
117 * @param volumes vector containing volume for each channel defined in
118 * EffectConfig for output buffer expressed in 8.24 fixed
119 * point format.
120 * @return result updated volume values.
121 * @return retval operation completion status.
122 */
123 virtual ::android::hardware::Return<void> setAndGetVolume(const ::android::hardware::hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb) override = 0;
124
125 /**
126 * Notify the effect of the volume change. The effect implementation must
127 * set EFFECT_FLAG_VOLUME_IND flag in its descriptor to receive this
128 * command.
129 *
130 * @param volumes vector containing volume for each channel defined in
131 * EffectConfig for output buffer expressed in 8.24 fixed
132 * point format.
133 * @return retval operation completion status.
134 */
135 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> volumeChangeNotification(const ::android::hardware::hidl_vec<uint32_t>& volumes) override = 0;
136
137 /**
138 * Set the audio mode. The effect implementation must set
139 * EFFECT_FLAG_AUDIO_MODE_IND flag in its descriptor to receive this command
140 * when the audio mode changes.
141 *
142 * @param mode desired audio mode.
143 * @return retval operation completion status.
144 */
145 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setAudioMode(::android::hardware::audio::common::V7_0::AudioMode mode) override = 0;
146
147 /**
148 * Apply new audio parameters configurations for input and output buffers of
149 * reverse stream. An example of reverse stream is the echo reference
150 * supplied to an Acoustic Echo Canceler.
151 *
152 * @param config configuration descriptor.
153 * @param inputBufferProvider optional buffer provider reference.
154 * @param outputBufferProvider optional buffer provider reference.
155 * @return retval operation completion status.
156 */
157 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setConfigReverse(const ::android::hardware::audio::effect::V7_0::EffectConfig& config, const ::android::sp<::android::hardware::audio::effect::V7_0::IEffectBufferProviderCallback>& inputBufferProvider, const ::android::sp<::android::hardware::audio::effect::V7_0::IEffectBufferProviderCallback>& outputBufferProvider) override = 0;
158
159 /**
160 * Set the capture device the audio input path is connected to. The effect
161 * implementation must set EFFECT_FLAG_DEVICE_IND flag in its descriptor to
162 * receive this command when the device changes.
163 *
164 * Note: this method is only supported for effects inserted into
165 * the input chain.
166 *
167 * @param device input device specification.
168 * @return retval operation completion status.
169 */
170 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setInputDevice(const ::android::hardware::audio::common::V7_0::DeviceAddress& device) override = 0;
171
172 /**
173 * Return callback for getConfig
174 */
175 using getConfig_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::audio::effect::V7_0::EffectConfig& config)>;
176 /**
177 * Read audio parameters configurations for input and output buffers.
178 *
179 * @return retval operation completion status.
180 * @return config configuration descriptor.
181 */
182 virtual ::android::hardware::Return<void> getConfig(getConfig_cb _hidl_cb) override = 0;
183
184 /**
185 * Return callback for getConfigReverse
186 */
187 using getConfigReverse_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::audio::effect::V7_0::EffectConfig& config)>;
188 /**
189 * Read audio parameters configurations for input and output buffers of
190 * reverse stream.
191 *
192 * @return retval operation completion status.
193 * @return config configuration descriptor.
194 */
195 virtual ::android::hardware::Return<void> getConfigReverse(getConfigReverse_cb _hidl_cb) override = 0;
196
197 /**
198 * Return callback for getSupportedAuxChannelsConfigs
199 */
200 using getSupportedAuxChannelsConfigs_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::hidl_vec<::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig>& result)>;
201 /**
202 * Queries for supported combinations of main and auxiliary channels
203 * (e.g. for a multi-microphone noise suppressor).
204 *
205 * @param maxConfigs maximum number of the combinations to return.
206 * @return retval absence of the feature support is indicated using
207 * NOT_SUPPORTED code. RESULT_TOO_BIG is returned if
208 * the number of supported combinations exceeds 'maxConfigs'.
209 * @return result list of configuration descriptors.
210 */
211 virtual ::android::hardware::Return<void> getSupportedAuxChannelsConfigs(uint32_t maxConfigs, getSupportedAuxChannelsConfigs_cb _hidl_cb) override = 0;
212
213 /**
214 * Return callback for getAuxChannelsConfig
215 */
216 using getAuxChannelsConfig_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& result)>;
217 /**
218 * Retrieves the current configuration of main and auxiliary channels.
219 *
220 * @return retval absence of the feature support is indicated using
221 * NOT_SUPPORTED code.
222 * @return result configuration descriptor.
223 */
224 virtual ::android::hardware::Return<void> getAuxChannelsConfig(getAuxChannelsConfig_cb _hidl_cb) override = 0;
225
226 /**
227 * Sets the current configuration of main and auxiliary channels.
228 *
229 * @return retval operation completion status; absence of the feature
230 * support is indicated using NOT_SUPPORTED code.
231 */
232 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setAuxChannelsConfig(const ::android::hardware::audio::effect::V7_0::EffectAuxChannelsConfig& config) override = 0;
233
234 /**
235 * Set the audio source the capture path is configured for (Camcorder, voice
236 * recognition...).
237 *
238 * Note: this method is only supported for effects inserted into
239 * the input chain.
240 *
241 * @param source source descriptor.
242 * @return retval operation completion status.
243 */
244 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setAudioSource(const ::android::hardware::hidl_string& source) override = 0;
245
246 /**
247 * This command indicates if the playback thread the effect is attached to
248 * is offloaded or not, and updates the I/O handle of the playback thread
249 * the effect is attached to.
250 *
251 * @param param effect offload descriptor.
252 * @return retval operation completion status.
253 */
254 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> offload(const ::android::hardware::audio::effect::V7_0::EffectOffloadParameter& param) override = 0;
255
256 /**
257 * Return callback for getDescriptor
258 */
259 using getDescriptor_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::audio::effect::V7_0::EffectDescriptor& descriptor)>;
260 /**
261 * Returns the effect descriptor.
262 *
263 * @return retval operation completion status.
264 * @return descriptor effect descriptor.
265 */
266 virtual ::android::hardware::Return<void> getDescriptor(getDescriptor_cb _hidl_cb) override = 0;
267
268 /**
269 * Return callback for prepareForProcessing
270 */
271 using prepareForProcessing_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::MQDescriptorSync<::android::hardware::audio::effect::V7_0::Result>& statusMQ)>;
272 /**
273 * Set up required transports for passing audio buffers to the effect.
274 *
275 * The transport consists of shared memory and a message queue for reporting
276 * effect processing operation status. The shared memory is set up
277 * separately using 'setProcessBuffers' method.
278 *
279 * Processing is requested by setting 'REQUEST_PROCESS' or
280 * 'REQUEST_PROCESS_REVERSE' EventFlags associated with the status message
281 * queue. The result of processing may be one of the following:
282 * OK if there were no errors during processing;
283 * INVALID_ARGUMENTS if audio buffers are invalid;
284 * INVALID_STATE if the engine has finished the disable phase;
285 * NOT_INITIALIZED if the audio buffers were not set;
286 * NOT_SUPPORTED if the requested processing type is not supported by
287 * the effect.
288 *
289 * @return retval OK if both message queues were created successfully.
290 * INVALID_STATE if the method was already called.
291 * INVALID_ARGUMENTS if there was a problem setting up
292 * the queue.
293 * @return statusMQ a message queue used for passing status from the effect.
294 */
295 virtual ::android::hardware::Return<void> prepareForProcessing(prepareForProcessing_cb _hidl_cb) override = 0;
296
297 /**
298 * Set up input and output buffers for processing audio data. The effect
299 * may modify both the input and the output buffer during the operation.
300 * Buffers may be set multiple times during effect lifetime.
301 *
302 * The input and the output buffer may be reused between different effects,
303 * and the input buffer may be used as an output buffer. Buffers are
304 * distinguished using 'AudioBuffer.id' field.
305 *
306 * @param inBuffer input audio buffer.
307 * @param outBuffer output audio buffer.
308 * @return retval OK if both buffers were mapped successfully.
309 * INVALID_ARGUMENTS if there was a problem with mapping
310 * any of the buffers.
311 */
312 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setProcessBuffers(const ::android::hardware::audio::effect::V7_0::AudioBuffer& inBuffer, const ::android::hardware::audio::effect::V7_0::AudioBuffer& outBuffer) override = 0;
313
314 /**
315 * Return callback for command
316 */
317 using command_cb = std::function<void(int32_t status, const ::android::hardware::hidl_vec<uint8_t>& result)>;
318 /**
319 * Execute a vendor specific command on the effect. The command code
320 * and data, as well as result data are not interpreted by Android
321 * Framework and are passed as-is between the application and the effect.
322 *
323 * The effect must use standard POSIX.1-2001 error codes for the operation
324 * completion status.
325 *
326 * Use this method only if the effect is provided by a third party, and
327 * there is no interface defined for it. This method only works for effects
328 * implemented in software.
329 *
330 * @param commandId the ID of the command.
331 * @param data command data.
332 * @param resultMaxSize maximum size in bytes of the result; can be 0.
333 * @return status command completion status.
334 * @return result result data.
335 */
336 virtual ::android::hardware::Return<void> command(uint32_t commandId, const ::android::hardware::hidl_vec<uint8_t>& data, uint32_t resultMaxSize, command_cb _hidl_cb) override = 0;
337
338 /**
339 * Set a vendor-specific parameter and apply it immediately. The parameter
340 * code and data are not interpreted by Android Framework and are passed
341 * as-is between the application and the effect.
342 *
343 * The effect must use INVALID_ARGUMENTS return code if the parameter ID is
344 * unknown or if provided parameter data is invalid. If the effect does not
345 * support setting vendor-specific parameters, it must return NOT_SUPPORTED.
346 *
347 * Use this method only if the effect is provided by a third party, and
348 * there is no interface defined for it. This method only works for effects
349 * implemented in software.
350 *
351 * @param parameter identifying data of the parameter.
352 * @param value the value of the parameter.
353 * @return retval operation completion status.
354 */
355 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setParameter(const ::android::hardware::hidl_vec<uint8_t>& parameter, const ::android::hardware::hidl_vec<uint8_t>& value) override = 0;
356
357 /**
358 * Return callback for getParameter
359 */
360 using getParameter_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::hidl_vec<uint8_t>& value)>;
361 /**
362 * Get a vendor-specific parameter value. The parameter code and returned
363 * data are not interpreted by Android Framework and are passed as-is
364 * between the application and the effect.
365 *
366 * The effect must use INVALID_ARGUMENTS return code if the parameter ID is
367 * unknown. If the effect does not support setting vendor-specific
368 * parameters, it must return NOT_SUPPORTED.
369 *
370 * Use this method only if the effect is provided by a third party, and
371 * there is no interface defined for it. This method only works for effects
372 * implemented in software.
373 *
374 * @param parameter identifying data of the parameter.
375 * @param valueMaxSize maximum size in bytes of the value.
376 * @return retval operation completion status.
377 * @return result the value of the parameter.
378 */
379 virtual ::android::hardware::Return<void> getParameter(const ::android::hardware::hidl_vec<uint8_t>& parameter, uint32_t valueMaxSize, getParameter_cb _hidl_cb) override = 0;
380
381 /**
382 * Return callback for getSupportedConfigsForFeature
383 */
384 using getSupportedConfigsForFeature_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, uint32_t configsCount, const ::android::hardware::hidl_vec<uint8_t>& configsData)>;
385 /**
386 * Get supported configs for a vendor-specific feature. The configs returned
387 * are not interpreted by Android Framework and are passed as-is between the
388 * application and the effect.
389 *
390 * The effect must use INVALID_ARGUMENTS return code if the feature ID is
391 * unknown. If the effect does not support getting vendor-specific feature
392 * configs, it must return NOT_SUPPORTED. If the feature is supported but
393 * the total number of supported configurations exceeds the maximum number
394 * indicated by the caller, the method must return RESULT_TOO_BIG.
395 *
396 * Use this method only if the effect is provided by a third party, and
397 * there is no interface defined for it. This method only works for effects
398 * implemented in software.
399 *
400 * @param featureId feature identifier.
401 * @param maxConfigs maximum number of configs to return.
402 * @param configSize size of each config in bytes.
403 * @return retval operation completion status.
404 * @return configsCount number of configs returned.
405 * @return configsData data for all the configs returned.
406 */
407 virtual ::android::hardware::Return<void> getSupportedConfigsForFeature(uint32_t featureId, uint32_t maxConfigs, uint32_t configSize, getSupportedConfigsForFeature_cb _hidl_cb) override = 0;
408
409 /**
410 * Return callback for getCurrentConfigForFeature
411 */
412 using getCurrentConfigForFeature_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::hidl_vec<uint8_t>& configData)>;
413 /**
414 * Get the current config for a vendor-specific feature. The config returned
415 * is not interpreted by Android Framework and is passed as-is between the
416 * application and the effect.
417 *
418 * The effect must use INVALID_ARGUMENTS return code if the feature ID is
419 * unknown. If the effect does not support getting vendor-specific
420 * feature configs, it must return NOT_SUPPORTED.
421 *
422 * Use this method only if the effect is provided by a third party, and
423 * there is no interface defined for it. This method only works for effects
424 * implemented in software.
425 *
426 * @param featureId feature identifier.
427 * @param configSize size of the config in bytes.
428 * @return retval operation completion status.
429 * @return configData config data.
430 */
431 virtual ::android::hardware::Return<void> getCurrentConfigForFeature(uint32_t featureId, uint32_t configSize, getCurrentConfigForFeature_cb _hidl_cb) override = 0;
432
433 /**
434 * Set the current config for a vendor-specific feature. The config data
435 * is not interpreted by Android Framework and is passed as-is between the
436 * application and the effect.
437 *
438 * The effect must use INVALID_ARGUMENTS return code if the feature ID is
439 * unknown. If the effect does not support getting vendor-specific
440 * feature configs, it must return NOT_SUPPORTED.
441 *
442 * Use this method only if the effect is provided by a third party, and
443 * there is no interface defined for it. This method only works for effects
444 * implemented in software.
445 *
446 * @param featureId feature identifier.
447 * @param configData config data.
448 * @return retval operation completion status.
449 */
450 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setCurrentConfigForFeature(uint32_t featureId, const ::android::hardware::hidl_vec<uint8_t>& configData) override = 0;
451
452 /**
453 * Called by the framework to deinitialize the effect and free up
454 * all currently allocated resources. It is recommended to close
455 * the effect on the client side as soon as it is becomes unused.
456 *
457 * The client must ensure that this function is not called while
458 * audio data is being transferred through the effect's message queues.
459 *
460 * @return retval OK in case the success.
461 * INVALID_STATE if the effect was already closed.
462 */
463 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> close() override = 0;
464
465 /**
466 * Return callback for getNumBands
467 */
468 using getNumBands_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, uint16_t numBands)>;
469 /**
470 * Gets the number of frequency bands that the equalizer supports.
471 */
472 virtual ::android::hardware::Return<void> getNumBands(getNumBands_cb _hidl_cb) = 0;
473
474 /**
475 * Return callback for getLevelRange
476 */
477 using getLevelRange_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, int16_t minLevel, int16_t maxLevel)>;
478 /**
479 * Returns the minimum and maximum band levels supported.
480 */
481 virtual ::android::hardware::Return<void> getLevelRange(getLevelRange_cb _hidl_cb) = 0;
482
483 /**
484 * Sets the gain for the given equalizer band.
485 */
486 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setBandLevel(uint16_t band, int16_t level) = 0;
487
488 /**
489 * Return callback for getBandLevel
490 */
491 using getBandLevel_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, int16_t level)>;
492 /**
493 * Gets the gain for the given equalizer band.
494 */
495 virtual ::android::hardware::Return<void> getBandLevel(uint16_t band, getBandLevel_cb _hidl_cb) = 0;
496
497 /**
498 * Return callback for getBandCenterFrequency
499 */
500 using getBandCenterFrequency_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, uint32_t centerFreqmHz)>;
501 /**
502 * Gets the center frequency of the given band, in milliHertz.
503 */
504 virtual ::android::hardware::Return<void> getBandCenterFrequency(uint16_t band, getBandCenterFrequency_cb _hidl_cb) = 0;
505
506 /**
507 * Return callback for getBandFrequencyRange
508 */
509 using getBandFrequencyRange_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, uint32_t minFreqmHz, uint32_t maxFreqmHz)>;
510 /**
511 * Gets the frequency range of the given frequency band, in milliHertz.
512 */
513 virtual ::android::hardware::Return<void> getBandFrequencyRange(uint16_t band, getBandFrequencyRange_cb _hidl_cb) = 0;
514
515 /**
516 * Return callback for getBandForFrequency
517 */
518 using getBandForFrequency_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, uint16_t band)>;
519 /**
520 * Gets the band that has the most effect on the given frequency
521 * in milliHertz.
522 */
523 virtual ::android::hardware::Return<void> getBandForFrequency(uint32_t freqmHz, getBandForFrequency_cb _hidl_cb) = 0;
524
525 /**
526 * Return callback for getPresetNames
527 */
528 using getPresetNames_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& names)>;
529 /**
530 * Gets the names of all presets the equalizer supports.
531 */
532 virtual ::android::hardware::Return<void> getPresetNames(getPresetNames_cb _hidl_cb) = 0;
533
534 /**
535 * Sets the current preset using the index of the preset in the names
536 * vector returned via 'getPresetNames'.
537 */
538 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setCurrentPreset(uint16_t preset) = 0;
539
540 /**
541 * Return callback for getCurrentPreset
542 */
543 using getCurrentPreset_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, uint16_t preset)>;
544 /**
545 * Gets the current preset.
546 */
547 virtual ::android::hardware::Return<void> getCurrentPreset(getCurrentPreset_cb _hidl_cb) = 0;
548
549 /**
550 * Sets all properties at once.
551 */
552 virtual ::android::hardware::Return<::android::hardware::audio::effect::V7_0::Result> setAllProperties(const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& properties) = 0;
553
554 /**
555 * Return callback for getAllProperties
556 */
557 using getAllProperties_cb = std::function<void(::android::hardware::audio::effect::V7_0::Result retval, const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& properties)>;
558 /**
559 * Gets all properties at once.
560 */
561 virtual ::android::hardware::Return<void> getAllProperties(getAllProperties_cb _hidl_cb) = 0;
562
563 /**
564 * Return callback for interfaceChain
565 */
566 using interfaceChain_cb = std::function<void(const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& descriptors)>;
567 /*
568 * Provides run-time type information for this object.
569 * For example, for the following interface definition:
570 * package [email protected];
571 * interface IParent {};
572 * interface IChild extends IParent {};
573 * Calling interfaceChain on an IChild object must yield the following:
574 * ["[email protected]::IChild",
575 * "[email protected]::IParent"
576 * "[email protected]::IBase"]
577 *
578 * @return descriptors a vector of descriptors of the run-time type of the
579 * object.
580 */
581 virtual ::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override;
582
583 /*
584 * Emit diagnostic information to the given file.
585 *
586 * Optionally overriden.
587 *
588 * @param fd File descriptor to dump data to.
589 * Must only be used for the duration of this call.
590 * @param options Arguments for debugging.
591 * Must support empty for default debug information.
592 */
593 virtual ::android::hardware::Return<void> debug(const ::android::hardware::hidl_handle& fd, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& options) override;
594
595 /**
596 * Return callback for interfaceDescriptor
597 */
598 using interfaceDescriptor_cb = std::function<void(const ::android::hardware::hidl_string& descriptor)>;
599 /*
600 * Provides run-time type information for this object.
601 * For example, for the following interface definition:
602 * package [email protected];
603 * interface IParent {};
604 * interface IChild extends IParent {};
605 * Calling interfaceDescriptor on an IChild object must yield
606 * "[email protected]::IChild"
607 *
608 * @return descriptor a descriptor of the run-time type of the
609 * object (the first element of the vector returned by
610 * interfaceChain())
611 */
612 virtual ::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override;
613
614 /**
615 * Return callback for getHashChain
616 */
617 using getHashChain_cb = std::function<void(const ::android::hardware::hidl_vec<::android::hardware::hidl_array<uint8_t, 32>>& hashchain)>;
618 /*
619 * Returns hashes of the source HAL files that define the interfaces of the
620 * runtime type information on the object.
621 * For example, for the following interface definition:
622 * package [email protected];
623 * interface IParent {};
624 * interface IChild extends IParent {};
625 * Calling interfaceChain on an IChild object must yield the following:
626 * [(hash of IChild.hal),
627 * (hash of IParent.hal)
628 * (hash of IBase.hal)].
629 *
630 * SHA-256 is used as the hashing algorithm. Each hash has 32 bytes
631 * according to SHA-256 standard.
632 *
633 * @return hashchain a vector of SHA-1 digests
634 */
635 virtual ::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override;
636
637 /*
638 * This method trigger the interface to enable/disable instrumentation based
639 * on system property hal.instrumentation.enable.
640 */
641 virtual ::android::hardware::Return<void> setHALInstrumentation() override;
642
643 /*
644 * Registers a death recipient, to be called when the process hosting this
645 * interface dies.
646 *
647 * @param recipient a hidl_death_recipient callback object
648 * @param cookie a cookie that must be returned with the callback
649 * @return success whether the death recipient was registered successfully.
650 */
651 virtual ::android::hardware::Return<bool> linkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override;
652
653 /*
654 * Provides way to determine if interface is running without requesting
655 * any functionality.
656 */
657 virtual ::android::hardware::Return<void> ping() override;
658
659 /**
660 * Return callback for getDebugInfo
661 */
662 using getDebugInfo_cb = std::function<void(const ::android::hidl::base::V1_0::DebugInfo& info)>;
663 /*
664 * Get debug information on references on this interface.
665 * @return info debugging information. See comments of DebugInfo.
666 */
667 virtual ::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override;
668
669 /*
670 * This method notifies the interface that one or more system properties
671 * have changed. The default implementation calls
672 * (C++) report_sysprop_change() in libcutils or
673 * (Java) android.os.SystemProperties.reportSyspropChanged,
674 * which in turn calls a set of registered callbacks (eg to update trace
675 * tags).
676 */
677 virtual ::android::hardware::Return<void> notifySyspropsChanged() override;
678
679 /*
680 * Unregisters the registered death recipient. If this service was registered
681 * multiple times with the same exact death recipient, this unlinks the most
682 * recently registered one.
683 *
684 * @param recipient a previously registered hidl_death_recipient callback
685 * @return success whether the death recipient was unregistered successfully.
686 */
687 virtual ::android::hardware::Return<bool> unlinkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient) override;
688
689 // cast static functions
690 /**
691 * This performs a checked cast based on what the underlying implementation actually is.
692 */
693 static ::android::hardware::Return<::android::sp<::android::hardware::audio::effect::V7_0::IEqualizerEffect>> castFrom(const ::android::sp<::android::hardware::audio::effect::V7_0::IEqualizerEffect>& parent, bool emitError = false);
694 /**
695 * This performs a checked cast based on what the underlying implementation actually is.
696 */
697 static ::android::hardware::Return<::android::sp<::android::hardware::audio::effect::V7_0::IEqualizerEffect>> castFrom(const ::android::sp<::android::hardware::audio::effect::V7_0::IEffect>& parent, bool emitError = false);
698 /**
699 * This performs a checked cast based on what the underlying implementation actually is.
700 */
701 static ::android::hardware::Return<::android::sp<::android::hardware::audio::effect::V7_0::IEqualizerEffect>> castFrom(const ::android::sp<::android::hidl::base::V1_0::IBase>& parent, bool emitError = false);
702
703 // helper methods for interactions with the hwservicemanager
704 /**
705 * This gets the service of this type with the specified instance name. If the
706 * service is currently not available or not in the VINTF manifest on a Trebilized
707 * device, this will return nullptr. This is useful when you don't want to block
708 * during device boot. If getStub is true, this will try to return an unwrapped
709 * passthrough implementation in the same process. This is useful when getting an
710 * implementation from the same partition/compilation group.
711 *
712 * In general, prefer getService(std::string,bool)
713 */
714 static ::android::sp<IEqualizerEffect> tryGetService(const std::string &serviceName="default", bool getStub=false);
715 /**
716 * Deprecated. See tryGetService(std::string, bool)
717 */
718 static ::android::sp<IEqualizerEffect> tryGetService(const char serviceName[], bool getStub=false) { std::string str(serviceName ? serviceName : ""); return tryGetService(str, getStub); }
719 /**
720 * Deprecated. See tryGetService(std::string, bool)
721 */
722 static ::android::sp<IEqualizerEffect> tryGetService(const ::android::hardware::hidl_string& serviceName, bool getStub=false) { std::string str(serviceName.c_str()); return tryGetService(str, getStub); }
723 /**
724 * Calls tryGetService("default", bool). This is the recommended instance name for singleton services.
725 */
tryGetServiceIEqualizerEffect726 static ::android::sp<IEqualizerEffect> tryGetService(bool getStub) { return tryGetService("default", getStub); }
727 /**
728 * This gets the service of this type with the specified instance name. If the
729 * service is not in the VINTF manifest on a Trebilized device, this will return
730 * nullptr. If the service is not available, this will wait for the service to
731 * become available. If the service is a lazy service, this will start the service
732 * and return when it becomes available. If getStub is true, this will try to
733 * return an unwrapped passthrough implementation in the same process. This is
734 * useful when getting an implementation from the same partition/compilation group.
735 */
736 static ::android::sp<IEqualizerEffect> getService(const std::string &serviceName="default", bool getStub=false);
737 /**
738 * Deprecated. See getService(std::string, bool)
739 */
740 static ::android::sp<IEqualizerEffect> getService(const char serviceName[], bool getStub=false) { std::string str(serviceName ? serviceName : ""); return getService(str, getStub); }
741 /**
742 * Deprecated. See getService(std::string, bool)
743 */
744 static ::android::sp<IEqualizerEffect> getService(const ::android::hardware::hidl_string& serviceName, bool getStub=false) { std::string str(serviceName.c_str()); return getService(str, getStub); }
745 /**
746 * Calls getService("default", bool). This is the recommended instance name for singleton services.
747 */
getServiceIEqualizerEffect748 static ::android::sp<IEqualizerEffect> getService(bool getStub) { return getService("default", getStub); }
749 /**
750 * Registers a service with the service manager. For Trebilized devices, the service
751 * must also be in the VINTF manifest.
752 */
753 __attribute__ ((warn_unused_result))::android::status_t registerAsService(const std::string &serviceName="default");
754 /**
755 * Registers for notifications for when a service is registered.
756 */
757 static bool registerForNotifications(
758 const std::string &serviceName,
759 const ::android::sp<::android::hidl::manager::V1_0::IServiceNotification> ¬ification);
760 };
761
762 //
763 // type declarations for package
764 //
765
766 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& o);
767 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& o, ::std::ostream*);
768 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& lhs, const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& rhs);
769 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& lhs, const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& rhs);
770
771 static inline std::string toString(const ::android::sp<::android::hardware::audio::effect::V7_0::IEqualizerEffect>& o);
772
773 //
774 // type header definitions for package
775 //
776
toString(const::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties & o)777 static inline std::string toString(const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& o) {
778 using ::android::hardware::toString;
779 std::string os;
780 os += "{";
781 os += ".curPreset = ";
782 os += ::android::hardware::toString(o.curPreset);
783 os += ", .bandLevels = ";
784 os += ::android::hardware::toString(o.bandLevels);
785 os += "}"; return os;
786 }
787
PrintTo(const::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties & o,::std::ostream * os)788 static inline void PrintTo(const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& o, ::std::ostream* os) {
789 *os << toString(o);
790 }
791
792 static inline bool operator==(const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& lhs, const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& rhs) {
793 if (lhs.curPreset != rhs.curPreset) {
794 return false;
795 }
796 if (lhs.bandLevels != rhs.bandLevels) {
797 return false;
798 }
799 return true;
800 }
801
802 static inline bool operator!=(const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& lhs, const ::android::hardware::audio::effect::V7_0::IEqualizerEffect::AllProperties& rhs){
803 return !(lhs == rhs);
804 }
805
toString(const::android::sp<::android::hardware::audio::effect::V7_0::IEqualizerEffect> & o)806 static inline std::string toString(const ::android::sp<::android::hardware::audio::effect::V7_0::IEqualizerEffect>& o) {
807 std::string os = "[class or subclass of ";
808 os += ::android::hardware::audio::effect::V7_0::IEqualizerEffect::descriptor;
809 os += "]";
810 os += o->isRemote() ? "@remote" : "@local";
811 return os;
812 }
813
814
815 } // namespace V7_0
816 } // namespace effect
817 } // namespace audio
818 } // namespace hardware
819 } // namespace android
820
821 //
822 // global type declarations for package
823 //
824
825
826 #endif // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_IEQUALIZEREFFECT_H
827