1 #ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_V7_0_IPRIMARYDEVICE_H
2 #define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_V7_0_IPRIMARYDEVICE_H
3 
4 #include <android/hardware/audio/common/7.0/types.h>
5 #include <android/hardware/audio/7.0/IDevice.h>
6 #include <android/hardware/audio/7.0/types.h>
7 
8 #include <android/hidl/manager/1.0/IServiceNotification.h>
9 
10 #include <hidl/HidlSupport.h>
11 #include <hidl/MQDescriptor.h>
12 #include <hidl/Status.h>
13 #include <utils/NativeHandle.h>
14 #include <utils/misc.h>
15 
16 namespace android {
17 namespace hardware {
18 namespace audio {
19 namespace V7_0 {
20 
21 struct IPrimaryDevice : public ::android::hardware::audio::V7_0::IDevice {
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]::IPrimaryDevice"
29      */
30     static const char* descriptor;
31 
32     // Forward declaration for forward reference support:
33     enum class TtyMode : int32_t;
34     enum class Rotation : int32_t;
35 
36     enum class TtyMode : int32_t {
37         OFF = 0,
38         VCO = 1 /* ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode.OFF implicitly + 1 */,
39         HCO = 2 /* ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode.VCO implicitly + 1 */,
40         FULL = 3 /* ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode.HCO implicitly + 1 */,
41     };
42 
43     enum class Rotation : int32_t {
44         DEG_0 = 0,
45         DEG_90 = 1 /* ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation.DEG_0 implicitly + 1 */,
46         DEG_180 = 2 /* ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation.DEG_90 implicitly + 1 */,
47         DEG_270 = 3 /* ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation.DEG_180 implicitly + 1 */,
48     };
49 
50     /**
51      * Returns whether this object's implementation is outside of the current process.
52      */
isRemoteIPrimaryDevice53     virtual bool isRemote() const override { return false; }
54 
55     /**
56      * Returns whether the audio hardware interface has been initialized.
57      *
58      * @return retval OK on success, NOT_INITIALIZED on failure.
59      */
60     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> initCheck() override = 0;
61 
62     /**
63      * Sets the audio volume for all audio activities other than voice call. If
64      * NOT_SUPPORTED is returned, the software mixer will emulate this
65      * capability.
66      *
67      * @param volume 1.0f means unity, 0.0f is zero.
68      * @return retval operation completion status.
69      */
70     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setMasterVolume(float volume) override = 0;
71 
72     /**
73      * Return callback for getMasterVolume
74      */
75     using getMasterVolume_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, float volume)>;
76     /**
77      * Get the current master volume value for the HAL, if the HAL supports
78      * master volume control. For example, AudioFlinger will query this value
79      * from the primary audio HAL when the service starts and use the value for
80      * setting the initial master volume across all HALs. HALs which do not
81      * support this method must return NOT_SUPPORTED in 'retval'.
82      *
83      * @return retval operation completion status.
84      * @return volume 1.0f means unity, 0.0f is zero.
85      */
86     virtual ::android::hardware::Return<void> getMasterVolume(getMasterVolume_cb _hidl_cb) override = 0;
87 
88     /**
89      * Sets microphone muting state.
90      *
91      * @param mute whether microphone is muted.
92      * @return retval operation completion status.
93      */
94     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setMicMute(bool mute) override = 0;
95 
96     /**
97      * Return callback for getMicMute
98      */
99     using getMicMute_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, bool mute)>;
100     /**
101      * Gets whether microphone is muted.
102      *
103      * @return retval operation completion status.
104      * @return mute whether microphone is muted.
105      */
106     virtual ::android::hardware::Return<void> getMicMute(getMicMute_cb _hidl_cb) override = 0;
107 
108     /**
109      * Set the audio mute status for all audio activities. If the return value
110      * is NOT_SUPPORTED, the software mixer will emulate this capability.
111      *
112      * @param mute whether audio is muted.
113      * @return retval operation completion status.
114      */
115     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setMasterMute(bool mute) override = 0;
116 
117     /**
118      * Return callback for getMasterMute
119      */
120     using getMasterMute_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, bool mute)>;
121     /**
122      * Get the current master mute status for the HAL, if the HAL supports
123      * master mute control. AudioFlinger will query this value from the primary
124      * audio HAL when the service starts and use the value for setting the
125      * initial master mute across all HALs. HAL must indicate that the feature
126      * is not supported by returning NOT_SUPPORTED status.
127      *
128      * @return retval operation completion status.
129      * @return mute whether audio is muted.
130      */
131     virtual ::android::hardware::Return<void> getMasterMute(getMasterMute_cb _hidl_cb) override = 0;
132 
133     /**
134      * Return callback for getInputBufferSize
135      */
136     using getInputBufferSize_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, uint64_t bufferSize)>;
137     /**
138      * Returns audio input buffer size according to parameters passed or
139      * INVALID_ARGUMENTS if one of the parameters is not supported.
140      *
141      * @param config audio configuration.
142      * @return retval operation completion status.
143      * @return bufferSize input buffer size in bytes.
144      */
145     virtual ::android::hardware::Return<void> getInputBufferSize(const ::android::hardware::audio::common::V7_0::AudioConfig& config, getInputBufferSize_cb _hidl_cb) override = 0;
146 
147     /**
148      * Return callback for openOutputStream
149      */
150     using openOutputStream_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, const ::android::sp<::android::hardware::audio::V7_0::IStreamOut>& outStream, const ::android::hardware::audio::common::V7_0::AudioConfig& suggestedConfig)>;
151     /**
152      * This method creates and opens the audio hardware output stream.
153      * If the stream can not be opened with the proposed audio config,
154      * HAL must provide suggested values for the audio config.
155      *
156      * Note: INVALID_ARGUMENTS is returned both in the case when the
157      * HAL can not use the provided config and in the case when
158      * the value of any argument is invalid. In the latter case the
159      * HAL must provide a default initialized suggested config.
160      *
161      * @param ioHandle handle assigned by AudioFlinger.
162      * @param device device type and (if needed) address.
163      * @param config stream configuration.
164      * @param flags additional flags.
165      * @param sourceMetadata Description of the audio that will be played.
166      * May be used by implementations to configure hardware effects.
167      * @return retval operation completion status.
168      * @return outStream created output stream.
169      * @return suggestedConfig in the case of rejection of the proposed config,
170      *                         a config suggested by the HAL.
171      */
172     virtual ::android::hardware::Return<void> openOutputStream(int32_t ioHandle, const ::android::hardware::audio::common::V7_0::DeviceAddress& device, const ::android::hardware::audio::common::V7_0::AudioConfig& config, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& flags, const ::android::hardware::audio::common::V7_0::SourceMetadata& sourceMetadata, openOutputStream_cb _hidl_cb) override = 0;
173 
174     /**
175      * Return callback for openInputStream
176      */
177     using openInputStream_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, const ::android::sp<::android::hardware::audio::V7_0::IStreamIn>& inStream, const ::android::hardware::audio::common::V7_0::AudioConfig& suggestedConfig)>;
178     /**
179      * This method creates and opens the audio hardware input stream.
180      * If the stream can not be opened with the proposed audio config,
181      * HAL must provide suggested values for the audio config.
182      *
183      * Note: INVALID_ARGUMENTS is returned both in the case when the
184      * HAL can not use the provided config and in the case when
185      * the value of any argument is invalid. In the latter case the
186      * HAL must provide a default initialized suggested config.
187      *
188      * @param ioHandle handle assigned by AudioFlinger.
189      * @param device device type and (if needed) address.
190      * @param config stream configuration.
191      * @param flags additional flags.
192      * @param sinkMetadata Description of the audio that is suggested by the client.
193      *                     May be used by implementations to configure processing effects.
194      * @return retval operation completion status.
195      * @return inStream in case of success, created input stream.
196      * @return suggestedConfig in the case of rejection of the proposed config,
197      *                         a config suggested by the HAL.
198      */
199     virtual ::android::hardware::Return<void> openInputStream(int32_t ioHandle, const ::android::hardware::audio::common::V7_0::DeviceAddress& device, const ::android::hardware::audio::common::V7_0::AudioConfig& config, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& flags, const ::android::hardware::audio::common::V7_0::SinkMetadata& sinkMetadata, openInputStream_cb _hidl_cb) override = 0;
200 
201     /**
202      * Returns whether HAL supports audio patches. Patch represents a connection
203      * between signal source(s) and signal sink(s). If HAL doesn't support
204      * patches natively (in hardware) then audio system will need to establish
205      * them in software.
206      *
207      * @return supports true if audio patches are supported.
208      */
209     virtual ::android::hardware::Return<bool> supportsAudioPatches() override = 0;
210 
211     /**
212      * Return callback for createAudioPatch
213      */
214     using createAudioPatch_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, int32_t patch)>;
215     /**
216      * Creates an audio patch between several source and sink ports.  The handle
217      * is allocated by the HAL and must be unique for this audio HAL module.
218      *
219      * Optional method. HAL must support it if 'supportsAudioPatches' returns
220      * 'true'.
221      *
222      * @param sources patch sources.
223      * @param sinks patch sinks.
224      * @return retval operation completion status.
225      * @return patch created patch handle.
226      */
227     virtual ::android::hardware::Return<void> createAudioPatch(const ::android::hardware::hidl_vec<::android::hardware::audio::common::V7_0::AudioPortConfig>& sources, const ::android::hardware::hidl_vec<::android::hardware::audio::common::V7_0::AudioPortConfig>& sinks, createAudioPatch_cb _hidl_cb) override = 0;
228 
229     /**
230      * Return callback for updateAudioPatch
231      */
232     using updateAudioPatch_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, int32_t patch)>;
233     /**
234      * Updates an audio patch.
235      *
236      * Use of this function is preferred to releasing and re-creating a patch
237      * as the HAL module can figure out a way of switching the route without
238      * causing audio disruption.
239      *
240      * Optional method. HAL must support it if 'supportsAudioPatches' returns
241      * 'true'.
242      *
243      * @param previousPatch handle of the previous patch to update.
244      * @param sources new patch sources.
245      * @param sinks new patch sinks.
246      * @return retval operation completion status.
247      * @return patch updated patch handle.
248      */
249     virtual ::android::hardware::Return<void> updateAudioPatch(int32_t previousPatch, const ::android::hardware::hidl_vec<::android::hardware::audio::common::V7_0::AudioPortConfig>& sources, const ::android::hardware::hidl_vec<::android::hardware::audio::common::V7_0::AudioPortConfig>& sinks, updateAudioPatch_cb _hidl_cb) override = 0;
250 
251     /**
252      * Release an audio patch.
253      *
254      * Optional method. HAL must support it if 'supportsAudioPatches' returns
255      * 'true'.
256      *
257      * @param patch patch handle.
258      * @return retval operation completion status.
259      */
260     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> releaseAudioPatch(int32_t patch) override = 0;
261 
262     /**
263      * Return callback for getAudioPort
264      */
265     using getAudioPort_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, const ::android::hardware::audio::common::V7_0::AudioPort& resultPort)>;
266     /**
267      * Returns the list of supported attributes for a given audio port.
268      *
269      * As input, 'port' contains the information (type, role, address etc...)
270      * needed by the HAL to identify the port.
271      *
272      * As output, 'resultPort' contains possible attributes (sampling rates,
273      * formats, channel masks, gain controllers...) for this port.
274      *
275      * @param port port identifier.
276      * @return retval operation completion status.
277      * @return resultPort port descriptor with all parameters filled up.
278      */
279     virtual ::android::hardware::Return<void> getAudioPort(const ::android::hardware::audio::common::V7_0::AudioPort& port, getAudioPort_cb _hidl_cb) override = 0;
280 
281     /**
282      * Set audio port configuration.
283      *
284      * @param config audio port configuration.
285      * @return retval operation completion status.
286      */
287     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setAudioPortConfig(const ::android::hardware::audio::common::V7_0::AudioPortConfig& config) override = 0;
288 
289     /**
290      * Return callback for getHwAvSync
291      */
292     using getHwAvSync_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, uint32_t hwAvSync)>;
293     /**
294      * Gets the HW synchronization source of the device. Calling this method is
295      * equivalent to getting AUDIO_PARAMETER_HW_AV_SYNC on the legacy HAL.
296      *
297      * Optional method
298      *
299      * @return retval operation completion status: OK or NOT_SUPPORTED.
300      * @return hwAvSync HW synchronization source
301      */
302     virtual ::android::hardware::Return<void> getHwAvSync(getHwAvSync_cb _hidl_cb) override = 0;
303 
304     /**
305      * Sets whether the screen is on. Calling this method is equivalent to
306      * setting AUDIO_PARAMETER_KEY_SCREEN_STATE on the legacy HAL.
307      *
308      * Optional method
309      *
310      * @param turnedOn whether the screen is turned on.
311      * @return retval operation completion status.
312      */
313     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setScreenState(bool turnedOn) override = 0;
314 
315     /**
316      * Return callback for getParameters
317      */
318     using getParameters_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, const ::android::hardware::hidl_vec<::android::hardware::audio::V7_0::ParameterValue>& parameters)>;
319     /**
320      * Generic method for retrieving vendor-specific parameter values.
321      * The framework does not interpret the parameters, they are passed
322      * in an opaque manner between a vendor application and HAL.
323      *
324      * Multiple parameters can be retrieved at the same time.
325      * The implementation should return as many requested parameters
326      * as possible, even if one or more is not supported
327      *
328      * @param context provides more information about the request
329      * @param keys keys of the requested parameters
330      * @return retval operation completion status.
331      *         OK must be returned if keys is empty.
332      *         NOT_SUPPORTED must be returned if at least one key is unknown.
333      * @return parameters parameter key value pairs.
334      *         Must contain the value of all requested keys if retval == OK
335      */
336     virtual ::android::hardware::Return<void> getParameters(const ::android::hardware::hidl_vec<::android::hardware::audio::V7_0::ParameterValue>& context, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& keys, getParameters_cb _hidl_cb) override = 0;
337 
338     /**
339      * Generic method for setting vendor-specific parameter values.
340      * The framework does not interpret the parameters, they are passed
341      * in an opaque manner between a vendor application and HAL.
342      *
343      * Multiple parameters can be set at the same time though this is
344      * discouraged as it make failure analysis harder.
345      *
346      * If possible, a failed setParameters should not impact the platform state.
347      *
348      * @param context provides more information about the request
349      * @param parameters parameter key value pairs.
350      * @return retval operation completion status.
351      *         All parameters must be successfully set for OK to be returned
352      */
353     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setParameters(const ::android::hardware::hidl_vec<::android::hardware::audio::V7_0::ParameterValue>& context, const ::android::hardware::hidl_vec<::android::hardware::audio::V7_0::ParameterValue>& parameters) override = 0;
354 
355     /**
356      * Return callback for getMicrophones
357      */
358     using getMicrophones_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, const ::android::hardware::hidl_vec<::android::hardware::audio::V7_0::MicrophoneInfo>& microphones)>;
359     /**
360      * Returns an array with available microphones in device.
361      *
362      * @return retval NOT_SUPPORTED if there are no microphones on this device
363      *                INVALID_STATE if the call is not successful,
364      *                OK otherwise.
365      *
366      * @return microphones array with microphones info
367      */
368     virtual ::android::hardware::Return<void> getMicrophones(getMicrophones_cb _hidl_cb) override = 0;
369 
370     /**
371      * Notifies the device module about the connection state of an input/output
372      * device attached to it. Calling this method is equivalent to setting
373      * AUDIO_PARAMETER_DEVICE_[DIS]CONNECT on the legacy HAL.
374      *
375      * @param address audio device specification.
376      * @param connected whether the device is connected.
377      * @return retval operation completion status.
378      */
379     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setConnectedState(const ::android::hardware::audio::common::V7_0::DeviceAddress& address, bool connected) override = 0;
380 
381     /**
382      * Called by the framework to deinitialize the device and free up
383      * all currently allocated resources. It is recommended to close
384      * the device on the client side as soon as it is becomes unused.
385      *
386      * Note that all streams must be closed by the client before
387      * attempting to close the device they belong to.
388      *
389      * @return retval OK in case the success.
390      *                INVALID_STATE if the device was already closed
391      *                or there are streams currently opened.
392      */
393     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> close() override = 0;
394 
395     /**
396      * Applies an audio effect to an audio device. The effect is inserted
397      * according to its insertion preference specified by INSERT_... EffectFlags
398      * in the EffectDescriptor.
399      *
400      * @param device identifies the sink or source device this effect must be applied to.
401      *               "device" is the AudioPortHandle indicated for the device when the audio
402      *                patch connecting that device was created.
403      * @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
404      *                 the effect to add.
405      * @return retval operation completion status.
406      */
407     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> addDeviceEffect(int32_t device, uint64_t effectId) override = 0;
408 
409     /**
410      * Stops applying an audio effect to an audio device.
411      *
412      * @param device identifies the sink or source device this effect was applied to.
413      *               "device" is the AudioPortHandle indicated for the device when the audio
414      *               patch is created at the audio HAL.
415      * @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
416      *                 the effect.
417      * @return retval operation completion status.
418      */
419     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> removeDeviceEffect(int32_t device, uint64_t effectId) override = 0;
420 
421     /**
422      * Sets the audio volume of a voice call.
423      *
424      * @param volume 1.0f means unity, 0.0f is zero.
425      * @return retval operation completion status.
426      */
427     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setVoiceVolume(float volume) = 0;
428 
429     /**
430      * This method is used to notify the HAL about audio mode changes.
431      *
432      * @param mode new mode.
433      * @return retval operation completion status.
434      */
435     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setMode(::android::hardware::audio::common::V7_0::AudioMode mode) = 0;
436 
437     /**
438      * Sets the name of the current BT SCO headset. Calling this method
439      * is equivalent to setting legacy "bt_headset_name" parameter.
440      * The BT SCO headset name must only be used for debugging purposes.
441      * Optional method
442      *
443      * @param name the name of the current BT SCO headset (can be empty).
444      * @return retval operation completion status.
445      */
446     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setBtScoHeadsetDebugName(const ::android::hardware::hidl_string& name) = 0;
447 
448     /**
449      * Return callback for getBtScoNrecEnabled
450      */
451     using getBtScoNrecEnabled_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, bool enabled)>;
452     /**
453      * Gets whether BT SCO Noise Reduction and Echo Cancellation are enabled.
454      * Calling this method is equivalent to getting AUDIO_PARAMETER_KEY_BT_NREC
455      * on the legacy HAL.
456      *
457      * @return retval operation completion status.
458      * @return enabled whether BT SCO NR + EC are enabled.
459      */
460     virtual ::android::hardware::Return<void> getBtScoNrecEnabled(getBtScoNrecEnabled_cb _hidl_cb) = 0;
461 
462     /**
463      * Sets whether BT SCO Noise Reduction and Echo Cancellation are enabled.
464      * Calling this method is equivalent to setting AUDIO_PARAMETER_KEY_BT_NREC
465      * on the legacy HAL.
466      * Optional method
467      *
468      * @param enabled whether BT SCO NR + EC are enabled.
469      * @return retval operation completion status.
470      */
471     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setBtScoNrecEnabled(bool enabled) = 0;
472 
473     /**
474      * Return callback for getBtScoWidebandEnabled
475      */
476     using getBtScoWidebandEnabled_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, bool enabled)>;
477     /**
478      * Gets whether BT SCO Wideband mode is enabled. Calling this method is
479      * equivalent to getting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.
480      *
481      * @return retval operation completion status.
482      * @return enabled whether BT Wideband is enabled.
483      */
484     virtual ::android::hardware::Return<void> getBtScoWidebandEnabled(getBtScoWidebandEnabled_cb _hidl_cb) = 0;
485 
486     /**
487      * Sets whether BT SCO Wideband mode is enabled. Calling this method is
488      * equivalent to setting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.
489      * Optional method
490      *
491      * @param enabled whether BT Wideband is enabled.
492      * @return retval operation completion status.
493      */
494     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setBtScoWidebandEnabled(bool enabled) = 0;
495 
496     /**
497      * Return callback for getBtHfpEnabled
498      */
499     using getBtHfpEnabled_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, bool enabled)>;
500     /**
501      * Gets whether BT HFP (Hands-Free Profile) is enabled. Calling this method
502      * is equivalent to getting "hfp_enable" parameter value on the legacy HAL.
503      *
504      * @return retval operation completion status.
505      * @return enabled whether BT HFP is enabled.
506      */
507     virtual ::android::hardware::Return<void> getBtHfpEnabled(getBtHfpEnabled_cb _hidl_cb) = 0;
508 
509     /**
510      * Sets whether BT HFP (Hands-Free Profile) is enabled. Calling this method
511      * is equivalent to setting "hfp_enable" parameter on the legacy HAL.
512      * Optional method
513      *
514      * @param enabled whether BT HFP is enabled.
515      * @return retval operation completion status.
516      */
517     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setBtHfpEnabled(bool enabled) = 0;
518 
519     /**
520      * Sets the sampling rate of BT HFP (Hands-Free Profile). Calling this
521      * method is equivalent to setting "hfp_set_sampling_rate" parameter
522      * on the legacy HAL.
523      * Optional method
524      *
525      * @param sampleRateHz sample rate in Hz.
526      * @return retval operation completion status.
527      */
528     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setBtHfpSampleRate(uint32_t sampleRateHz) = 0;
529 
530     /**
531      * Sets the current output volume Hz for BT HFP (Hands-Free Profile).
532      * Calling this method is equivalent to setting "hfp_volume" parameter value
533      * on the legacy HAL (except that legacy HAL implementations expect
534      * an integer value in the range from 0 to 15.)
535      * Optional method
536      *
537      * @param volume 1.0f means unity, 0.0f is zero.
538      * @return retval operation completion status.
539      */
540     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setBtHfpVolume(float volume) = 0;
541 
542     /**
543      * Return callback for getTtyMode
544      */
545     using getTtyMode_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode mode)>;
546     /**
547      * Gets current TTY mode selection. Calling this method is equivalent to
548      * getting AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.
549      *
550      * @return retval operation completion status.
551      * @return mode TTY mode.
552      */
553     virtual ::android::hardware::Return<void> getTtyMode(getTtyMode_cb _hidl_cb) = 0;
554 
555     /**
556      * Sets current TTY mode. Calling this method is equivalent to setting
557      * AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.
558      *
559      * @param mode TTY mode.
560      * @return retval operation completion status.
561      */
562     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setTtyMode(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode mode) = 0;
563 
564     /**
565      * Return callback for getHacEnabled
566      */
567     using getHacEnabled_cb = std::function<void(::android::hardware::audio::V7_0::Result retval, bool enabled)>;
568     /**
569      * Gets whether Hearing Aid Compatibility - Telecoil (HAC-T) mode is
570      * enabled. Calling this method is equivalent to getting
571      * AUDIO_PARAMETER_KEY_HAC on the legacy HAL.
572      *
573      * @return retval operation completion status.
574      * @return enabled whether HAC mode is enabled.
575      */
576     virtual ::android::hardware::Return<void> getHacEnabled(getHacEnabled_cb _hidl_cb) = 0;
577 
578     /**
579      * Sets whether Hearing Aid Compatibility - Telecoil (HAC-T) mode is
580      * enabled. Calling this method is equivalent to setting
581      * AUDIO_PARAMETER_KEY_HAC on the legacy HAL.
582      * Optional method
583      *
584      * @param enabled whether HAC mode is enabled.
585      * @return retval operation completion status.
586      */
587     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> setHacEnabled(bool enabled) = 0;
588 
589     /**
590      * Updates HAL on the current rotation of the device relative to natural
591      * orientation. Calling this method is equivalent to setting legacy
592      * parameter "rotation".
593      *
594      * @param rotation rotation in degrees relative to natural device
595      *     orientation.
596      * @return retval operation completion status.
597      */
598     virtual ::android::hardware::Return<::android::hardware::audio::V7_0::Result> updateRotation(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation rotation) = 0;
599 
600     /**
601      * Return callback for interfaceChain
602      */
603     using interfaceChain_cb = std::function<void(const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& descriptors)>;
604     /*
605      * Provides run-time type information for this object.
606      * For example, for the following interface definition:
607      *     package [email protected];
608      *     interface IParent {};
609      *     interface IChild extends IParent {};
610      * Calling interfaceChain on an IChild object must yield the following:
611      *     ["[email protected]::IChild",
612      *      "[email protected]::IParent"
613      *      "[email protected]::IBase"]
614      *
615      * @return descriptors a vector of descriptors of the run-time type of the
616      *         object.
617      */
618     virtual ::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override;
619 
620     /*
621      * Emit diagnostic information to the given file.
622      *
623      * Optionally overriden.
624      *
625      * @param fd      File descriptor to dump data to.
626      *                Must only be used for the duration of this call.
627      * @param options Arguments for debugging.
628      *                Must support empty for default debug information.
629      */
630     virtual ::android::hardware::Return<void> debug(const ::android::hardware::hidl_handle& fd, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& options) override;
631 
632     /**
633      * Return callback for interfaceDescriptor
634      */
635     using interfaceDescriptor_cb = std::function<void(const ::android::hardware::hidl_string& descriptor)>;
636     /*
637      * Provides run-time type information for this object.
638      * For example, for the following interface definition:
639      *     package [email protected];
640      *     interface IParent {};
641      *     interface IChild extends IParent {};
642      * Calling interfaceDescriptor on an IChild object must yield
643      *     "[email protected]::IChild"
644      *
645      * @return descriptor a descriptor of the run-time type of the
646      *         object (the first element of the vector returned by
647      *         interfaceChain())
648      */
649     virtual ::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override;
650 
651     /**
652      * Return callback for getHashChain
653      */
654     using getHashChain_cb = std::function<void(const ::android::hardware::hidl_vec<::android::hardware::hidl_array<uint8_t, 32>>& hashchain)>;
655     /*
656      * Returns hashes of the source HAL files that define the interfaces of the
657      * runtime type information on the object.
658      * For example, for the following interface definition:
659      *     package [email protected];
660      *     interface IParent {};
661      *     interface IChild extends IParent {};
662      * Calling interfaceChain on an IChild object must yield the following:
663      *     [(hash of IChild.hal),
664      *      (hash of IParent.hal)
665      *      (hash of IBase.hal)].
666      *
667      * SHA-256 is used as the hashing algorithm. Each hash has 32 bytes
668      * according to SHA-256 standard.
669      *
670      * @return hashchain a vector of SHA-1 digests
671      */
672     virtual ::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override;
673 
674     /*
675      * This method trigger the interface to enable/disable instrumentation based
676      * on system property hal.instrumentation.enable.
677      */
678     virtual ::android::hardware::Return<void> setHALInstrumentation() override;
679 
680     /*
681      * Registers a death recipient, to be called when the process hosting this
682      * interface dies.
683      *
684      * @param recipient a hidl_death_recipient callback object
685      * @param cookie a cookie that must be returned with the callback
686      * @return success whether the death recipient was registered successfully.
687      */
688     virtual ::android::hardware::Return<bool> linkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override;
689 
690     /*
691      * Provides way to determine if interface is running without requesting
692      * any functionality.
693      */
694     virtual ::android::hardware::Return<void> ping() override;
695 
696     /**
697      * Return callback for getDebugInfo
698      */
699     using getDebugInfo_cb = std::function<void(const ::android::hidl::base::V1_0::DebugInfo& info)>;
700     /*
701      * Get debug information on references on this interface.
702      * @return info debugging information. See comments of DebugInfo.
703      */
704     virtual ::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override;
705 
706     /*
707      * This method notifies the interface that one or more system properties
708      * have changed. The default implementation calls
709      * (C++)  report_sysprop_change() in libcutils or
710      * (Java) android.os.SystemProperties.reportSyspropChanged,
711      * which in turn calls a set of registered callbacks (eg to update trace
712      * tags).
713      */
714     virtual ::android::hardware::Return<void> notifySyspropsChanged() override;
715 
716     /*
717      * Unregisters the registered death recipient. If this service was registered
718      * multiple times with the same exact death recipient, this unlinks the most
719      * recently registered one.
720      *
721      * @param recipient a previously registered hidl_death_recipient callback
722      * @return success whether the death recipient was unregistered successfully.
723      */
724     virtual ::android::hardware::Return<bool> unlinkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient) override;
725 
726     // cast static functions
727     /**
728      * This performs a checked cast based on what the underlying implementation actually is.
729      */
730     static ::android::hardware::Return<::android::sp<::android::hardware::audio::V7_0::IPrimaryDevice>> castFrom(const ::android::sp<::android::hardware::audio::V7_0::IPrimaryDevice>& parent, bool emitError = false);
731     /**
732      * This performs a checked cast based on what the underlying implementation actually is.
733      */
734     static ::android::hardware::Return<::android::sp<::android::hardware::audio::V7_0::IPrimaryDevice>> castFrom(const ::android::sp<::android::hardware::audio::V7_0::IDevice>& parent, bool emitError = false);
735     /**
736      * This performs a checked cast based on what the underlying implementation actually is.
737      */
738     static ::android::hardware::Return<::android::sp<::android::hardware::audio::V7_0::IPrimaryDevice>> castFrom(const ::android::sp<::android::hidl::base::V1_0::IBase>& parent, bool emitError = false);
739 
740     // helper methods for interactions with the hwservicemanager
741     /**
742      * This gets the service of this type with the specified instance name. If the
743      * service is currently not available or not in the VINTF manifest on a Trebilized
744      * device, this will return nullptr. This is useful when you don't want to block
745      * during device boot. If getStub is true, this will try to return an unwrapped
746      * passthrough implementation in the same process. This is useful when getting an
747      * implementation from the same partition/compilation group.
748      *
749      * In general, prefer getService(std::string,bool)
750      */
751     static ::android::sp<IPrimaryDevice> tryGetService(const std::string &serviceName="default", bool getStub=false);
752     /**
753      * Deprecated. See tryGetService(std::string, bool)
754      */
755     static ::android::sp<IPrimaryDevice> tryGetService(const char serviceName[], bool getStub=false)  { std::string str(serviceName ? serviceName : "");      return tryGetService(str, getStub); }
756     /**
757      * Deprecated. See tryGetService(std::string, bool)
758      */
759     static ::android::sp<IPrimaryDevice> tryGetService(const ::android::hardware::hidl_string& serviceName, bool getStub=false)  { std::string str(serviceName.c_str());      return tryGetService(str, getStub); }
760     /**
761      * Calls tryGetService("default", bool). This is the recommended instance name for singleton services.
762      */
tryGetServiceIPrimaryDevice763     static ::android::sp<IPrimaryDevice> tryGetService(bool getStub) { return tryGetService("default", getStub); }
764     /**
765      * This gets the service of this type with the specified instance name. If the
766      * service is not in the VINTF manifest on a Trebilized device, this will return
767      * nullptr. If the service is not available, this will wait for the service to
768      * become available. If the service is a lazy service, this will start the service
769      * and return when it becomes available. If getStub is true, this will try to
770      * return an unwrapped passthrough implementation in the same process. This is
771      * useful when getting an implementation from the same partition/compilation group.
772      */
773     static ::android::sp<IPrimaryDevice> getService(const std::string &serviceName="default", bool getStub=false);
774     /**
775      * Deprecated. See getService(std::string, bool)
776      */
777     static ::android::sp<IPrimaryDevice> getService(const char serviceName[], bool getStub=false)  { std::string str(serviceName ? serviceName : "");      return getService(str, getStub); }
778     /**
779      * Deprecated. See getService(std::string, bool)
780      */
781     static ::android::sp<IPrimaryDevice> getService(const ::android::hardware::hidl_string& serviceName, bool getStub=false)  { std::string str(serviceName.c_str());      return getService(str, getStub); }
782     /**
783      * Calls getService("default", bool). This is the recommended instance name for singleton services.
784      */
getServiceIPrimaryDevice785     static ::android::sp<IPrimaryDevice> getService(bool getStub) { return getService("default", getStub); }
786     /**
787      * Registers a service with the service manager. For Trebilized devices, the service
788      * must also be in the VINTF manifest.
789      */
790     __attribute__ ((warn_unused_result))::android::status_t registerAsService(const std::string &serviceName="default");
791     /**
792      * Registers for notifications for when a service is registered.
793      */
794     static bool registerForNotifications(
795             const std::string &serviceName,
796             const ::android::sp<::android::hidl::manager::V1_0::IServiceNotification> &notification);
797 };
798 
799 //
800 // type declarations for package
801 //
802 
803 template<typename>
804 static inline std::string toString(int32_t o);
805 static inline std::string toString(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode o);
806 static inline void PrintTo(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode o, ::std::ostream* os);
807 constexpr int32_t operator|(const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode lhs, const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode rhs) {
808     return static_cast<int32_t>(static_cast<int32_t>(lhs) | static_cast<int32_t>(rhs));
809 }
810 constexpr int32_t operator|(const int32_t lhs, const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode rhs) {
811     return static_cast<int32_t>(lhs | static_cast<int32_t>(rhs));
812 }
813 constexpr int32_t operator|(const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode lhs, const int32_t rhs) {
814     return static_cast<int32_t>(static_cast<int32_t>(lhs) | rhs);
815 }
816 constexpr int32_t operator&(const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode lhs, const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode rhs) {
817     return static_cast<int32_t>(static_cast<int32_t>(lhs) & static_cast<int32_t>(rhs));
818 }
819 constexpr int32_t operator&(const int32_t lhs, const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode rhs) {
820     return static_cast<int32_t>(lhs & static_cast<int32_t>(rhs));
821 }
822 constexpr int32_t operator&(const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode lhs, const int32_t rhs) {
823     return static_cast<int32_t>(static_cast<int32_t>(lhs) & rhs);
824 }
825 constexpr int32_t &operator|=(int32_t& v, const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode e) {
826     v |= static_cast<int32_t>(e);
827     return v;
828 }
829 constexpr int32_t &operator&=(int32_t& v, const ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode e) {
830     v &= static_cast<int32_t>(e);
831     return v;
832 }
833 
834 template<typename>
835 static inline std::string toString(int32_t o);
836 static inline std::string toString(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation o);
837 static inline void PrintTo(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation o, ::std::ostream* os);
838 constexpr int32_t operator|(const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation lhs, const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation rhs) {
839     return static_cast<int32_t>(static_cast<int32_t>(lhs) | static_cast<int32_t>(rhs));
840 }
841 constexpr int32_t operator|(const int32_t lhs, const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation rhs) {
842     return static_cast<int32_t>(lhs | static_cast<int32_t>(rhs));
843 }
844 constexpr int32_t operator|(const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation lhs, const int32_t rhs) {
845     return static_cast<int32_t>(static_cast<int32_t>(lhs) | rhs);
846 }
847 constexpr int32_t operator&(const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation lhs, const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation rhs) {
848     return static_cast<int32_t>(static_cast<int32_t>(lhs) & static_cast<int32_t>(rhs));
849 }
850 constexpr int32_t operator&(const int32_t lhs, const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation rhs) {
851     return static_cast<int32_t>(lhs & static_cast<int32_t>(rhs));
852 }
853 constexpr int32_t operator&(const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation lhs, const int32_t rhs) {
854     return static_cast<int32_t>(static_cast<int32_t>(lhs) & rhs);
855 }
856 constexpr int32_t &operator|=(int32_t& v, const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation e) {
857     v |= static_cast<int32_t>(e);
858     return v;
859 }
860 constexpr int32_t &operator&=(int32_t& v, const ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation e) {
861     v &= static_cast<int32_t>(e);
862     return v;
863 }
864 
865 static inline std::string toString(const ::android::sp<::android::hardware::audio::V7_0::IPrimaryDevice>& o);
866 
867 //
868 // type header definitions for package
869 //
870 
871 template<>
872 inline std::string toString<::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode>(int32_t o) {
873     using ::android::hardware::details::toHexString;
874     std::string os;
875     ::android::hardware::hidl_bitfield<::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode> flipped = 0;
876     bool first = true;
877     if ((o & ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::OFF) == static_cast<int32_t>(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::OFF)) {
878         os += (first ? "" : " | ");
879         os += "OFF";
880         first = false;
881         flipped |= ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::OFF;
882     }
883     if ((o & ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::VCO) == static_cast<int32_t>(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::VCO)) {
884         os += (first ? "" : " | ");
885         os += "VCO";
886         first = false;
887         flipped |= ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::VCO;
888     }
889     if ((o & ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::HCO) == static_cast<int32_t>(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::HCO)) {
890         os += (first ? "" : " | ");
891         os += "HCO";
892         first = false;
893         flipped |= ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::HCO;
894     }
895     if ((o & ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::FULL) == static_cast<int32_t>(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::FULL)) {
896         os += (first ? "" : " | ");
897         os += "FULL";
898         first = false;
899         flipped |= ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::FULL;
900     }
901     if (o != flipped) {
902         os += (first ? "" : " | ");
903         os += toHexString(o & (~flipped));
904     }os += " (";
905     os += toHexString(o);
906     os += ")";
907     return os;
908 }
909 
toString(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode o)910 static inline std::string toString(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode o) {
911     using ::android::hardware::details::toHexString;
912     if (o == ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::OFF) {
913         return "OFF";
914     }
915     if (o == ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::VCO) {
916         return "VCO";
917     }
918     if (o == ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::HCO) {
919         return "HCO";
920     }
921     if (o == ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::FULL) {
922         return "FULL";
923     }
924     std::string os;
925     os += toHexString(static_cast<int32_t>(o));
926     return os;
927 }
928 
PrintTo(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode o,::std::ostream * os)929 static inline void PrintTo(::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode o, ::std::ostream* os) {
930     *os << toString(o);
931 }
932 
933 template<>
934 inline std::string toString<::android::hardware::audio::V7_0::IPrimaryDevice::Rotation>(int32_t o) {
935     using ::android::hardware::details::toHexString;
936     std::string os;
937     ::android::hardware::hidl_bitfield<::android::hardware::audio::V7_0::IPrimaryDevice::Rotation> flipped = 0;
938     bool first = true;
939     if ((o & ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_0) == static_cast<int32_t>(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_0)) {
940         os += (first ? "" : " | ");
941         os += "DEG_0";
942         first = false;
943         flipped |= ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_0;
944     }
945     if ((o & ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_90) == static_cast<int32_t>(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_90)) {
946         os += (first ? "" : " | ");
947         os += "DEG_90";
948         first = false;
949         flipped |= ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_90;
950     }
951     if ((o & ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_180) == static_cast<int32_t>(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_180)) {
952         os += (first ? "" : " | ");
953         os += "DEG_180";
954         first = false;
955         flipped |= ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_180;
956     }
957     if ((o & ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_270) == static_cast<int32_t>(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_270)) {
958         os += (first ? "" : " | ");
959         os += "DEG_270";
960         first = false;
961         flipped |= ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_270;
962     }
963     if (o != flipped) {
964         os += (first ? "" : " | ");
965         os += toHexString(o & (~flipped));
966     }os += " (";
967     os += toHexString(o);
968     os += ")";
969     return os;
970 }
971 
toString(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation o)972 static inline std::string toString(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation o) {
973     using ::android::hardware::details::toHexString;
974     if (o == ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_0) {
975         return "DEG_0";
976     }
977     if (o == ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_90) {
978         return "DEG_90";
979     }
980     if (o == ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_180) {
981         return "DEG_180";
982     }
983     if (o == ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_270) {
984         return "DEG_270";
985     }
986     std::string os;
987     os += toHexString(static_cast<int32_t>(o));
988     return os;
989 }
990 
PrintTo(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation o,::std::ostream * os)991 static inline void PrintTo(::android::hardware::audio::V7_0::IPrimaryDevice::Rotation o, ::std::ostream* os) {
992     *os << toString(o);
993 }
994 
toString(const::android::sp<::android::hardware::audio::V7_0::IPrimaryDevice> & o)995 static inline std::string toString(const ::android::sp<::android::hardware::audio::V7_0::IPrimaryDevice>& o) {
996     std::string os = "[class or subclass of ";
997     os += ::android::hardware::audio::V7_0::IPrimaryDevice::descriptor;
998     os += "]";
999     os += o->isRemote() ? "@remote" : "@local";
1000     return os;
1001 }
1002 
1003 
1004 }  // namespace V7_0
1005 }  // namespace audio
1006 }  // namespace hardware
1007 }  // namespace android
1008 
1009 //
1010 // global type declarations for package
1011 //
1012 
1013 namespace android {
1014 namespace hardware {
1015 namespace details {
1016 #pragma clang diagnostic push
1017 #pragma clang diagnostic ignored "-Wc++17-extensions"
1018 template<> inline constexpr std::array<::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode, 4> hidl_enum_values<::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode> = {
1019     ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::OFF,
1020     ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::VCO,
1021     ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::HCO,
1022     ::android::hardware::audio::V7_0::IPrimaryDevice::TtyMode::FULL,
1023 };
1024 #pragma clang diagnostic pop
1025 }  // namespace details
1026 }  // namespace hardware
1027 }  // namespace android
1028 
1029 namespace android {
1030 namespace hardware {
1031 namespace details {
1032 #pragma clang diagnostic push
1033 #pragma clang diagnostic ignored "-Wc++17-extensions"
1034 template<> inline constexpr std::array<::android::hardware::audio::V7_0::IPrimaryDevice::Rotation, 4> hidl_enum_values<::android::hardware::audio::V7_0::IPrimaryDevice::Rotation> = {
1035     ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_0,
1036     ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_90,
1037     ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_180,
1038     ::android::hardware::audio::V7_0::IPrimaryDevice::Rotation::DEG_270,
1039 };
1040 #pragma clang diagnostic pop
1041 }  // namespace details
1042 }  // namespace hardware
1043 }  // namespace android
1044 
1045 
1046 #endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_V7_0_IPRIMARYDEVICE_H
1047