1 /*
2  * This file is auto-generated.  DO NOT MODIFY.
3  * Using: out/host/linux-x86/bin/aidl --lang=ndk -Weverything -Wno-missing-permission-annotation --structured --version 3 --hash notfrozen -t --stability vintf --min_sdk_version current -pout/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.common.types_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.effect_interface/3/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.core.sounddose_interface/3/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.common_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common_interface/2/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/common/fmq/aidl/android.hardware.common.fmq_interface/1/preprocessed.aidl --previous_api_dir=hardware/interfaces/audio/aidl/aidl_api/android.hardware.audio.core/2 --previous_hash 003735b3fd3c94c53b02a6eb5e099731f7062610 --ninja -d out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.core-V3-ndk-source/gen/staging/android/hardware/audio/core/IModule.cpp.d -h out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.core-V3-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.core-V3-ndk-source/gen/staging -Nhardware/interfaces/audio/aidl hardware/interfaces/audio/aidl/android/hardware/audio/core/IModule.aidl
4  *
5  * DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
6  * ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
7  * AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
8  */
9 #pragma once
10 
11 #include <array>
12 #include <cstdint>
13 #include <memory>
14 #include <optional>
15 #include <string>
16 #include <vector>
17 #include <android/binder_enums.h>
18 #include <android/binder_interface_utils.h>
19 #include <android/binder_parcelable_utils.h>
20 #include <android/binder_to_string.h>
21 #include <aidl/android/hardware/audio/common/SinkMetadata.h>
22 #include <aidl/android/hardware/audio/common/SourceMetadata.h>
23 #include <aidl/android/hardware/audio/core/AudioPatch.h>
24 #include <aidl/android/hardware/audio/core/AudioRoute.h>
25 #include <aidl/android/hardware/audio/core/IBluetooth.h>
26 #include <aidl/android/hardware/audio/core/IBluetoothA2dp.h>
27 #include <aidl/android/hardware/audio/core/IBluetoothLe.h>
28 #include <aidl/android/hardware/audio/core/IModule.h>
29 #include <aidl/android/hardware/audio/core/IStreamCallback.h>
30 #include <aidl/android/hardware/audio/core/IStreamIn.h>
31 #include <aidl/android/hardware/audio/core/IStreamOut.h>
32 #include <aidl/android/hardware/audio/core/IStreamOutEventCallback.h>
33 #include <aidl/android/hardware/audio/core/ITelephony.h>
34 #include <aidl/android/hardware/audio/core/ModuleDebug.h>
35 #include <aidl/android/hardware/audio/core/StreamDescriptor.h>
36 #include <aidl/android/hardware/audio/core/VendorParameter.h>
37 #include <aidl/android/hardware/audio/core/sounddose/ISoundDose.h>
38 #include <aidl/android/hardware/audio/effect/IEffect.h>
39 #include <aidl/android/media/audio/common/AudioMMapPolicyInfo.h>
40 #include <aidl/android/media/audio/common/AudioMMapPolicyType.h>
41 #include <aidl/android/media/audio/common/AudioMode.h>
42 #include <aidl/android/media/audio/common/AudioOffloadInfo.h>
43 #include <aidl/android/media/audio/common/AudioPort.h>
44 #include <aidl/android/media/audio/common/AudioPortConfig.h>
45 #include <aidl/android/media/audio/common/MicrophoneInfo.h>
46 #ifdef BINDER_STABILITY_SUPPORT
47 #include <android/binder_stability.h>
48 #endif  // BINDER_STABILITY_SUPPORT
49 
50 namespace aidl::android::hardware::audio::common {
51 class SinkMetadata;
52 class SourceMetadata;
53 }  // namespace aidl::android::hardware::audio::common
54 namespace aidl::android::hardware::audio::core {
55 class AudioPatch;
56 class AudioRoute;
57 class IBluetooth;
58 class IBluetoothA2dp;
59 class IBluetoothLe;
60 class IStreamCallback;
61 class IStreamIn;
62 class IStreamOut;
63 class IStreamOutEventCallback;
64 class ITelephony;
65 class ModuleDebug;
66 class StreamDescriptor;
67 class VendorParameter;
68 }  // namespace aidl::android::hardware::audio::core
69 namespace aidl::android::hardware::audio::core::sounddose {
70 class ISoundDose;
71 }  // namespace aidl::android::hardware::audio::core::sounddose
72 namespace aidl::android::hardware::audio::effect {
73 class IEffect;
74 }  // namespace aidl::android::hardware::audio::effect
75 namespace aidl::android::media::audio::common {
76 class AudioMMapPolicyInfo;
77 class AudioOffloadInfo;
78 class AudioPort;
79 class AudioPortConfig;
80 class MicrophoneInfo;
81 }  // namespace aidl::android::media::audio::common
82 namespace aidl {
83 namespace android {
84 namespace hardware {
85 namespace audio {
86 namespace core {
87 class IModuleDelegator;
88 
89 class IModule : public ::ndk::ICInterface {
90 public:
91   typedef IModuleDelegator DefaultDelegator;
92   static const char* descriptor;
93   IModule();
94   virtual ~IModule();
95 
96   class OpenInputStreamArguments {
97   public:
98     typedef std::false_type fixed_size;
99     static const char* descriptor;
100 
101     int32_t portConfigId = 0;
102     ::aidl::android::hardware::audio::common::SinkMetadata sinkMetadata;
103     int64_t bufferSizeFrames = 0L;
104 
105     binder_status_t readFromParcel(const AParcel* parcel);
106     binder_status_t writeToParcel(AParcel* parcel) const;
107 
108     inline bool operator==(const OpenInputStreamArguments& _rhs) const {
109       return std::tie(portConfigId, sinkMetadata, bufferSizeFrames) == std::tie(_rhs.portConfigId, _rhs.sinkMetadata, _rhs.bufferSizeFrames);
110     }
111     inline bool operator<(const OpenInputStreamArguments& _rhs) const {
112       return std::tie(portConfigId, sinkMetadata, bufferSizeFrames) < std::tie(_rhs.portConfigId, _rhs.sinkMetadata, _rhs.bufferSizeFrames);
113     }
114     inline bool operator!=(const OpenInputStreamArguments& _rhs) const {
115       return !(*this == _rhs);
116     }
117     inline bool operator>(const OpenInputStreamArguments& _rhs) const {
118       return _rhs < *this;
119     }
120     inline bool operator>=(const OpenInputStreamArguments& _rhs) const {
121       return !(*this < _rhs);
122     }
123     inline bool operator<=(const OpenInputStreamArguments& _rhs) const {
124       return !(_rhs < *this);
125     }
126 
127     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()128     inline std::string toString() const {
129       std::ostringstream _aidl_os;
130       _aidl_os << "OpenInputStreamArguments{";
131       _aidl_os << "portConfigId: " << ::android::internal::ToString(portConfigId);
132       _aidl_os << ", sinkMetadata: " << ::android::internal::ToString(sinkMetadata);
133       _aidl_os << ", bufferSizeFrames: " << ::android::internal::ToString(bufferSizeFrames);
134       _aidl_os << "}";
135       return _aidl_os.str();
136     }
137   };
138   class OpenInputStreamReturn {
139   public:
140     typedef std::false_type fixed_size;
141     static const char* descriptor;
142 
143     std::shared_ptr<::aidl::android::hardware::audio::core::IStreamIn> stream;
144     ::aidl::android::hardware::audio::core::StreamDescriptor desc;
145 
146     binder_status_t readFromParcel(const AParcel* parcel);
147     binder_status_t writeToParcel(AParcel* parcel) const;
148 
149     inline bool operator==(const OpenInputStreamReturn& _rhs) const {
150       return std::tie(stream, desc) == std::tie(_rhs.stream, _rhs.desc);
151     }
152     inline bool operator<(const OpenInputStreamReturn& _rhs) const {
153       return std::tie(stream, desc) < std::tie(_rhs.stream, _rhs.desc);
154     }
155     inline bool operator!=(const OpenInputStreamReturn& _rhs) const {
156       return !(*this == _rhs);
157     }
158     inline bool operator>(const OpenInputStreamReturn& _rhs) const {
159       return _rhs < *this;
160     }
161     inline bool operator>=(const OpenInputStreamReturn& _rhs) const {
162       return !(*this < _rhs);
163     }
164     inline bool operator<=(const OpenInputStreamReturn& _rhs) const {
165       return !(_rhs < *this);
166     }
167 
168     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()169     inline std::string toString() const {
170       std::ostringstream _aidl_os;
171       _aidl_os << "OpenInputStreamReturn{";
172       _aidl_os << "stream: " << ::android::internal::ToString(stream);
173       _aidl_os << ", desc: " << ::android::internal::ToString(desc);
174       _aidl_os << "}";
175       return _aidl_os.str();
176     }
177   };
178   class OpenOutputStreamArguments {
179   public:
180     typedef std::false_type fixed_size;
181     static const char* descriptor;
182 
183     int32_t portConfigId = 0;
184     ::aidl::android::hardware::audio::common::SourceMetadata sourceMetadata;
185     std::optional<::aidl::android::media::audio::common::AudioOffloadInfo> offloadInfo;
186     int64_t bufferSizeFrames = 0L;
187     std::shared_ptr<::aidl::android::hardware::audio::core::IStreamCallback> callback;
188     std::shared_ptr<::aidl::android::hardware::audio::core::IStreamOutEventCallback> eventCallback;
189 
190     binder_status_t readFromParcel(const AParcel* parcel);
191     binder_status_t writeToParcel(AParcel* parcel) const;
192 
193     inline bool operator==(const OpenOutputStreamArguments& _rhs) const {
194       return std::tie(portConfigId, sourceMetadata, offloadInfo, bufferSizeFrames, callback, eventCallback) == std::tie(_rhs.portConfigId, _rhs.sourceMetadata, _rhs.offloadInfo, _rhs.bufferSizeFrames, _rhs.callback, _rhs.eventCallback);
195     }
196     inline bool operator<(const OpenOutputStreamArguments& _rhs) const {
197       return std::tie(portConfigId, sourceMetadata, offloadInfo, bufferSizeFrames, callback, eventCallback) < std::tie(_rhs.portConfigId, _rhs.sourceMetadata, _rhs.offloadInfo, _rhs.bufferSizeFrames, _rhs.callback, _rhs.eventCallback);
198     }
199     inline bool operator!=(const OpenOutputStreamArguments& _rhs) const {
200       return !(*this == _rhs);
201     }
202     inline bool operator>(const OpenOutputStreamArguments& _rhs) const {
203       return _rhs < *this;
204     }
205     inline bool operator>=(const OpenOutputStreamArguments& _rhs) const {
206       return !(*this < _rhs);
207     }
208     inline bool operator<=(const OpenOutputStreamArguments& _rhs) const {
209       return !(_rhs < *this);
210     }
211 
212     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()213     inline std::string toString() const {
214       std::ostringstream _aidl_os;
215       _aidl_os << "OpenOutputStreamArguments{";
216       _aidl_os << "portConfigId: " << ::android::internal::ToString(portConfigId);
217       _aidl_os << ", sourceMetadata: " << ::android::internal::ToString(sourceMetadata);
218       _aidl_os << ", offloadInfo: " << ::android::internal::ToString(offloadInfo);
219       _aidl_os << ", bufferSizeFrames: " << ::android::internal::ToString(bufferSizeFrames);
220       _aidl_os << ", callback: " << ::android::internal::ToString(callback);
221       _aidl_os << ", eventCallback: " << ::android::internal::ToString(eventCallback);
222       _aidl_os << "}";
223       return _aidl_os.str();
224     }
225   };
226   class OpenOutputStreamReturn {
227   public:
228     typedef std::false_type fixed_size;
229     static const char* descriptor;
230 
231     std::shared_ptr<::aidl::android::hardware::audio::core::IStreamOut> stream;
232     ::aidl::android::hardware::audio::core::StreamDescriptor desc;
233 
234     binder_status_t readFromParcel(const AParcel* parcel);
235     binder_status_t writeToParcel(AParcel* parcel) const;
236 
237     inline bool operator==(const OpenOutputStreamReturn& _rhs) const {
238       return std::tie(stream, desc) == std::tie(_rhs.stream, _rhs.desc);
239     }
240     inline bool operator<(const OpenOutputStreamReturn& _rhs) const {
241       return std::tie(stream, desc) < std::tie(_rhs.stream, _rhs.desc);
242     }
243     inline bool operator!=(const OpenOutputStreamReturn& _rhs) const {
244       return !(*this == _rhs);
245     }
246     inline bool operator>(const OpenOutputStreamReturn& _rhs) const {
247       return _rhs < *this;
248     }
249     inline bool operator>=(const OpenOutputStreamReturn& _rhs) const {
250       return !(*this < _rhs);
251     }
252     inline bool operator<=(const OpenOutputStreamReturn& _rhs) const {
253       return !(_rhs < *this);
254     }
255 
256     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()257     inline std::string toString() const {
258       std::ostringstream _aidl_os;
259       _aidl_os << "OpenOutputStreamReturn{";
260       _aidl_os << "stream: " << ::android::internal::ToString(stream);
261       _aidl_os << ", desc: " << ::android::internal::ToString(desc);
262       _aidl_os << "}";
263       return _aidl_os.str();
264     }
265   };
266   class SupportedPlaybackRateFactors {
267   public:
268     typedef std::false_type fixed_size;
269     static const char* descriptor;
270 
271     float minSpeed = 0.000000f;
272     float maxSpeed = 0.000000f;
273     float minPitch = 0.000000f;
274     float maxPitch = 0.000000f;
275 
276     binder_status_t readFromParcel(const AParcel* parcel);
277     binder_status_t writeToParcel(AParcel* parcel) const;
278 
279     inline bool operator==(const SupportedPlaybackRateFactors& _rhs) const {
280       return std::tie(minSpeed, maxSpeed, minPitch, maxPitch) == std::tie(_rhs.minSpeed, _rhs.maxSpeed, _rhs.minPitch, _rhs.maxPitch);
281     }
282     inline bool operator<(const SupportedPlaybackRateFactors& _rhs) const {
283       return std::tie(minSpeed, maxSpeed, minPitch, maxPitch) < std::tie(_rhs.minSpeed, _rhs.maxSpeed, _rhs.minPitch, _rhs.maxPitch);
284     }
285     inline bool operator!=(const SupportedPlaybackRateFactors& _rhs) const {
286       return !(*this == _rhs);
287     }
288     inline bool operator>(const SupportedPlaybackRateFactors& _rhs) const {
289       return _rhs < *this;
290     }
291     inline bool operator>=(const SupportedPlaybackRateFactors& _rhs) const {
292       return !(*this < _rhs);
293     }
294     inline bool operator<=(const SupportedPlaybackRateFactors& _rhs) const {
295       return !(_rhs < *this);
296     }
297 
298     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()299     inline std::string toString() const {
300       std::ostringstream _aidl_os;
301       _aidl_os << "SupportedPlaybackRateFactors{";
302       _aidl_os << "minSpeed: " << ::android::internal::ToString(minSpeed);
303       _aidl_os << ", maxSpeed: " << ::android::internal::ToString(maxSpeed);
304       _aidl_os << ", minPitch: " << ::android::internal::ToString(minPitch);
305       _aidl_os << ", maxPitch: " << ::android::internal::ToString(maxPitch);
306       _aidl_os << "}";
307       return _aidl_os.str();
308     }
309   };
310   enum class ScreenRotation : int32_t {
311     DEG_0 = 0,
312     DEG_90 = 1,
313     DEG_180 = 2,
314     DEG_270 = 3,
315   };
316 
317   enum : int32_t { DEFAULT_AAUDIO_MIXER_BURST_COUNT = 2 };
318   enum : int32_t { DEFAULT_AAUDIO_HARDWARE_BURST_MIN_DURATION_US = 1000 };
319   static inline const int32_t version = true ? 2 : 3;
320   static inline const std::string hash = true ? "003735b3fd3c94c53b02a6eb5e099731f7062610" : "notfrozen";
321   static constexpr uint32_t TRANSACTION_setModuleDebug = FIRST_CALL_TRANSACTION + 0;
322   static constexpr uint32_t TRANSACTION_getTelephony = FIRST_CALL_TRANSACTION + 1;
323   static constexpr uint32_t TRANSACTION_getBluetooth = FIRST_CALL_TRANSACTION + 2;
324   static constexpr uint32_t TRANSACTION_getBluetoothA2dp = FIRST_CALL_TRANSACTION + 3;
325   static constexpr uint32_t TRANSACTION_getBluetoothLe = FIRST_CALL_TRANSACTION + 4;
326   static constexpr uint32_t TRANSACTION_connectExternalDevice = FIRST_CALL_TRANSACTION + 5;
327   static constexpr uint32_t TRANSACTION_disconnectExternalDevice = FIRST_CALL_TRANSACTION + 6;
328   static constexpr uint32_t TRANSACTION_getAudioPatches = FIRST_CALL_TRANSACTION + 7;
329   static constexpr uint32_t TRANSACTION_getAudioPort = FIRST_CALL_TRANSACTION + 8;
330   static constexpr uint32_t TRANSACTION_getAudioPortConfigs = FIRST_CALL_TRANSACTION + 9;
331   static constexpr uint32_t TRANSACTION_getAudioPorts = FIRST_CALL_TRANSACTION + 10;
332   static constexpr uint32_t TRANSACTION_getAudioRoutes = FIRST_CALL_TRANSACTION + 11;
333   static constexpr uint32_t TRANSACTION_getAudioRoutesForAudioPort = FIRST_CALL_TRANSACTION + 12;
334   static constexpr uint32_t TRANSACTION_openInputStream = FIRST_CALL_TRANSACTION + 13;
335   static constexpr uint32_t TRANSACTION_openOutputStream = FIRST_CALL_TRANSACTION + 14;
336   static constexpr uint32_t TRANSACTION_getSupportedPlaybackRateFactors = FIRST_CALL_TRANSACTION + 15;
337   static constexpr uint32_t TRANSACTION_setAudioPatch = FIRST_CALL_TRANSACTION + 16;
338   static constexpr uint32_t TRANSACTION_setAudioPortConfig = FIRST_CALL_TRANSACTION + 17;
339   static constexpr uint32_t TRANSACTION_resetAudioPatch = FIRST_CALL_TRANSACTION + 18;
340   static constexpr uint32_t TRANSACTION_resetAudioPortConfig = FIRST_CALL_TRANSACTION + 19;
341   static constexpr uint32_t TRANSACTION_getMasterMute = FIRST_CALL_TRANSACTION + 20;
342   static constexpr uint32_t TRANSACTION_setMasterMute = FIRST_CALL_TRANSACTION + 21;
343   static constexpr uint32_t TRANSACTION_getMasterVolume = FIRST_CALL_TRANSACTION + 22;
344   static constexpr uint32_t TRANSACTION_setMasterVolume = FIRST_CALL_TRANSACTION + 23;
345   static constexpr uint32_t TRANSACTION_getMicMute = FIRST_CALL_TRANSACTION + 24;
346   static constexpr uint32_t TRANSACTION_setMicMute = FIRST_CALL_TRANSACTION + 25;
347   static constexpr uint32_t TRANSACTION_getMicrophones = FIRST_CALL_TRANSACTION + 26;
348   static constexpr uint32_t TRANSACTION_updateAudioMode = FIRST_CALL_TRANSACTION + 27;
349   static constexpr uint32_t TRANSACTION_updateScreenRotation = FIRST_CALL_TRANSACTION + 28;
350   static constexpr uint32_t TRANSACTION_updateScreenState = FIRST_CALL_TRANSACTION + 29;
351   static constexpr uint32_t TRANSACTION_getSoundDose = FIRST_CALL_TRANSACTION + 30;
352   static constexpr uint32_t TRANSACTION_generateHwAvSyncId = FIRST_CALL_TRANSACTION + 31;
353   static constexpr uint32_t TRANSACTION_getVendorParameters = FIRST_CALL_TRANSACTION + 32;
354   static constexpr uint32_t TRANSACTION_setVendorParameters = FIRST_CALL_TRANSACTION + 33;
355   static constexpr uint32_t TRANSACTION_addDeviceEffect = FIRST_CALL_TRANSACTION + 34;
356   static constexpr uint32_t TRANSACTION_removeDeviceEffect = FIRST_CALL_TRANSACTION + 35;
357   static constexpr uint32_t TRANSACTION_getMmapPolicyInfos = FIRST_CALL_TRANSACTION + 36;
358   static constexpr uint32_t TRANSACTION_supportsVariableLatency = FIRST_CALL_TRANSACTION + 37;
359   static constexpr uint32_t TRANSACTION_getAAudioMixerBurstCount = FIRST_CALL_TRANSACTION + 38;
360   static constexpr uint32_t TRANSACTION_getAAudioHardwareBurstMinUsec = FIRST_CALL_TRANSACTION + 39;
361   static constexpr uint32_t TRANSACTION_prepareToDisconnectExternalDevice = FIRST_CALL_TRANSACTION + 40;
362 
363   static std::shared_ptr<IModule> fromBinder(const ::ndk::SpAIBinder& binder);
364   static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IModule>& instance);
365   static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IModule>* instance);
366   static bool setDefaultImpl(const std::shared_ptr<IModule>& impl);
367   static const std::shared_ptr<IModule>& getDefaultImpl();
368   virtual ::ndk::ScopedAStatus setModuleDebug(const ::aidl::android::hardware::audio::core::ModuleDebug& in_debug) = 0;
369   virtual ::ndk::ScopedAStatus getTelephony(std::shared_ptr<::aidl::android::hardware::audio::core::ITelephony>* _aidl_return) = 0;
370   virtual ::ndk::ScopedAStatus getBluetooth(std::shared_ptr<::aidl::android::hardware::audio::core::IBluetooth>* _aidl_return) = 0;
371   virtual ::ndk::ScopedAStatus getBluetoothA2dp(std::shared_ptr<::aidl::android::hardware::audio::core::IBluetoothA2dp>* _aidl_return) = 0;
372   virtual ::ndk::ScopedAStatus getBluetoothLe(std::shared_ptr<::aidl::android::hardware::audio::core::IBluetoothLe>* _aidl_return) = 0;
373   virtual ::ndk::ScopedAStatus connectExternalDevice(const ::aidl::android::media::audio::common::AudioPort& in_templateIdAndAdditionalData, ::aidl::android::media::audio::common::AudioPort* _aidl_return) = 0;
374   virtual ::ndk::ScopedAStatus disconnectExternalDevice(int32_t in_portId) = 0;
375   virtual ::ndk::ScopedAStatus getAudioPatches(std::vector<::aidl::android::hardware::audio::core::AudioPatch>* _aidl_return) = 0;
376   virtual ::ndk::ScopedAStatus getAudioPort(int32_t in_portId, ::aidl::android::media::audio::common::AudioPort* _aidl_return) = 0;
377   virtual ::ndk::ScopedAStatus getAudioPortConfigs(std::vector<::aidl::android::media::audio::common::AudioPortConfig>* _aidl_return) = 0;
378   virtual ::ndk::ScopedAStatus getAudioPorts(std::vector<::aidl::android::media::audio::common::AudioPort>* _aidl_return) = 0;
379   virtual ::ndk::ScopedAStatus getAudioRoutes(std::vector<::aidl::android::hardware::audio::core::AudioRoute>* _aidl_return) = 0;
380   virtual ::ndk::ScopedAStatus getAudioRoutesForAudioPort(int32_t in_portId, std::vector<::aidl::android::hardware::audio::core::AudioRoute>* _aidl_return) = 0;
381   virtual ::ndk::ScopedAStatus openInputStream(const ::aidl::android::hardware::audio::core::IModule::OpenInputStreamArguments& in_args, ::aidl::android::hardware::audio::core::IModule::OpenInputStreamReturn* _aidl_return) = 0;
382   virtual ::ndk::ScopedAStatus openOutputStream(const ::aidl::android::hardware::audio::core::IModule::OpenOutputStreamArguments& in_args, ::aidl::android::hardware::audio::core::IModule::OpenOutputStreamReturn* _aidl_return) = 0;
383   virtual ::ndk::ScopedAStatus getSupportedPlaybackRateFactors(::aidl::android::hardware::audio::core::IModule::SupportedPlaybackRateFactors* _aidl_return) = 0;
384   virtual ::ndk::ScopedAStatus setAudioPatch(const ::aidl::android::hardware::audio::core::AudioPatch& in_requested, ::aidl::android::hardware::audio::core::AudioPatch* _aidl_return) = 0;
385   virtual ::ndk::ScopedAStatus setAudioPortConfig(const ::aidl::android::media::audio::common::AudioPortConfig& in_requested, ::aidl::android::media::audio::common::AudioPortConfig* out_suggested, bool* _aidl_return) = 0;
386   virtual ::ndk::ScopedAStatus resetAudioPatch(int32_t in_patchId) = 0;
387   virtual ::ndk::ScopedAStatus resetAudioPortConfig(int32_t in_portConfigId) = 0;
388   virtual ::ndk::ScopedAStatus getMasterMute(bool* _aidl_return) = 0;
389   virtual ::ndk::ScopedAStatus setMasterMute(bool in_mute) = 0;
390   virtual ::ndk::ScopedAStatus getMasterVolume(float* _aidl_return) = 0;
391   virtual ::ndk::ScopedAStatus setMasterVolume(float in_volume) = 0;
392   virtual ::ndk::ScopedAStatus getMicMute(bool* _aidl_return) = 0;
393   virtual ::ndk::ScopedAStatus setMicMute(bool in_mute) = 0;
394   virtual ::ndk::ScopedAStatus getMicrophones(std::vector<::aidl::android::media::audio::common::MicrophoneInfo>* _aidl_return) = 0;
395   virtual ::ndk::ScopedAStatus updateAudioMode(::aidl::android::media::audio::common::AudioMode in_mode) = 0;
396   virtual ::ndk::ScopedAStatus updateScreenRotation(::aidl::android::hardware::audio::core::IModule::ScreenRotation in_rotation) = 0;
397   virtual ::ndk::ScopedAStatus updateScreenState(bool in_isTurnedOn) = 0;
398   virtual ::ndk::ScopedAStatus getSoundDose(std::shared_ptr<::aidl::android::hardware::audio::core::sounddose::ISoundDose>* _aidl_return) = 0;
399   virtual ::ndk::ScopedAStatus generateHwAvSyncId(int32_t* _aidl_return) = 0;
400   virtual ::ndk::ScopedAStatus getVendorParameters(const std::vector<std::string>& in_ids, std::vector<::aidl::android::hardware::audio::core::VendorParameter>* _aidl_return) = 0;
401   virtual ::ndk::ScopedAStatus setVendorParameters(const std::vector<::aidl::android::hardware::audio::core::VendorParameter>& in_parameters, bool in_async) = 0;
402   virtual ::ndk::ScopedAStatus addDeviceEffect(int32_t in_portConfigId, const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>& in_effect) = 0;
403   virtual ::ndk::ScopedAStatus removeDeviceEffect(int32_t in_portConfigId, const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>& in_effect) = 0;
404   virtual ::ndk::ScopedAStatus getMmapPolicyInfos(::aidl::android::media::audio::common::AudioMMapPolicyType in_mmapPolicyType, std::vector<::aidl::android::media::audio::common::AudioMMapPolicyInfo>* _aidl_return) = 0;
405   virtual ::ndk::ScopedAStatus supportsVariableLatency(bool* _aidl_return) = 0;
406   virtual ::ndk::ScopedAStatus getAAudioMixerBurstCount(int32_t* _aidl_return) = 0;
407   virtual ::ndk::ScopedAStatus getAAudioHardwareBurstMinUsec(int32_t* _aidl_return) = 0;
408   virtual ::ndk::ScopedAStatus prepareToDisconnectExternalDevice(int32_t in_portId) = 0;
409   virtual ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) = 0;
410   virtual ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) = 0;
411 private:
412   static std::shared_ptr<IModule> default_impl;
413 };
414 class IModuleDefault : public IModule {
415 public:
416   ::ndk::ScopedAStatus setModuleDebug(const ::aidl::android::hardware::audio::core::ModuleDebug& in_debug) override;
417   ::ndk::ScopedAStatus getTelephony(std::shared_ptr<::aidl::android::hardware::audio::core::ITelephony>* _aidl_return) override;
418   ::ndk::ScopedAStatus getBluetooth(std::shared_ptr<::aidl::android::hardware::audio::core::IBluetooth>* _aidl_return) override;
419   ::ndk::ScopedAStatus getBluetoothA2dp(std::shared_ptr<::aidl::android::hardware::audio::core::IBluetoothA2dp>* _aidl_return) override;
420   ::ndk::ScopedAStatus getBluetoothLe(std::shared_ptr<::aidl::android::hardware::audio::core::IBluetoothLe>* _aidl_return) override;
421   ::ndk::ScopedAStatus connectExternalDevice(const ::aidl::android::media::audio::common::AudioPort& in_templateIdAndAdditionalData, ::aidl::android::media::audio::common::AudioPort* _aidl_return) override;
422   ::ndk::ScopedAStatus disconnectExternalDevice(int32_t in_portId) override;
423   ::ndk::ScopedAStatus getAudioPatches(std::vector<::aidl::android::hardware::audio::core::AudioPatch>* _aidl_return) override;
424   ::ndk::ScopedAStatus getAudioPort(int32_t in_portId, ::aidl::android::media::audio::common::AudioPort* _aidl_return) override;
425   ::ndk::ScopedAStatus getAudioPortConfigs(std::vector<::aidl::android::media::audio::common::AudioPortConfig>* _aidl_return) override;
426   ::ndk::ScopedAStatus getAudioPorts(std::vector<::aidl::android::media::audio::common::AudioPort>* _aidl_return) override;
427   ::ndk::ScopedAStatus getAudioRoutes(std::vector<::aidl::android::hardware::audio::core::AudioRoute>* _aidl_return) override;
428   ::ndk::ScopedAStatus getAudioRoutesForAudioPort(int32_t in_portId, std::vector<::aidl::android::hardware::audio::core::AudioRoute>* _aidl_return) override;
429   ::ndk::ScopedAStatus openInputStream(const ::aidl::android::hardware::audio::core::IModule::OpenInputStreamArguments& in_args, ::aidl::android::hardware::audio::core::IModule::OpenInputStreamReturn* _aidl_return) override;
430   ::ndk::ScopedAStatus openOutputStream(const ::aidl::android::hardware::audio::core::IModule::OpenOutputStreamArguments& in_args, ::aidl::android::hardware::audio::core::IModule::OpenOutputStreamReturn* _aidl_return) override;
431   ::ndk::ScopedAStatus getSupportedPlaybackRateFactors(::aidl::android::hardware::audio::core::IModule::SupportedPlaybackRateFactors* _aidl_return) override;
432   ::ndk::ScopedAStatus setAudioPatch(const ::aidl::android::hardware::audio::core::AudioPatch& in_requested, ::aidl::android::hardware::audio::core::AudioPatch* _aidl_return) override;
433   ::ndk::ScopedAStatus setAudioPortConfig(const ::aidl::android::media::audio::common::AudioPortConfig& in_requested, ::aidl::android::media::audio::common::AudioPortConfig* out_suggested, bool* _aidl_return) override;
434   ::ndk::ScopedAStatus resetAudioPatch(int32_t in_patchId) override;
435   ::ndk::ScopedAStatus resetAudioPortConfig(int32_t in_portConfigId) override;
436   ::ndk::ScopedAStatus getMasterMute(bool* _aidl_return) override;
437   ::ndk::ScopedAStatus setMasterMute(bool in_mute) override;
438   ::ndk::ScopedAStatus getMasterVolume(float* _aidl_return) override;
439   ::ndk::ScopedAStatus setMasterVolume(float in_volume) override;
440   ::ndk::ScopedAStatus getMicMute(bool* _aidl_return) override;
441   ::ndk::ScopedAStatus setMicMute(bool in_mute) override;
442   ::ndk::ScopedAStatus getMicrophones(std::vector<::aidl::android::media::audio::common::MicrophoneInfo>* _aidl_return) override;
443   ::ndk::ScopedAStatus updateAudioMode(::aidl::android::media::audio::common::AudioMode in_mode) override;
444   ::ndk::ScopedAStatus updateScreenRotation(::aidl::android::hardware::audio::core::IModule::ScreenRotation in_rotation) override;
445   ::ndk::ScopedAStatus updateScreenState(bool in_isTurnedOn) override;
446   ::ndk::ScopedAStatus getSoundDose(std::shared_ptr<::aidl::android::hardware::audio::core::sounddose::ISoundDose>* _aidl_return) override;
447   ::ndk::ScopedAStatus generateHwAvSyncId(int32_t* _aidl_return) override;
448   ::ndk::ScopedAStatus getVendorParameters(const std::vector<std::string>& in_ids, std::vector<::aidl::android::hardware::audio::core::VendorParameter>* _aidl_return) override;
449   ::ndk::ScopedAStatus setVendorParameters(const std::vector<::aidl::android::hardware::audio::core::VendorParameter>& in_parameters, bool in_async) override;
450   ::ndk::ScopedAStatus addDeviceEffect(int32_t in_portConfigId, const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>& in_effect) override;
451   ::ndk::ScopedAStatus removeDeviceEffect(int32_t in_portConfigId, const std::shared_ptr<::aidl::android::hardware::audio::effect::IEffect>& in_effect) override;
452   ::ndk::ScopedAStatus getMmapPolicyInfos(::aidl::android::media::audio::common::AudioMMapPolicyType in_mmapPolicyType, std::vector<::aidl::android::media::audio::common::AudioMMapPolicyInfo>* _aidl_return) override;
453   ::ndk::ScopedAStatus supportsVariableLatency(bool* _aidl_return) override;
454   ::ndk::ScopedAStatus getAAudioMixerBurstCount(int32_t* _aidl_return) override;
455   ::ndk::ScopedAStatus getAAudioHardwareBurstMinUsec(int32_t* _aidl_return) override;
456   ::ndk::ScopedAStatus prepareToDisconnectExternalDevice(int32_t in_portId) override;
457   ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) override;
458   ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) override;
459   ::ndk::SpAIBinder asBinder() override;
460   bool isRemote() override;
461 };
462 }  // namespace core
463 }  // namespace audio
464 }  // namespace hardware
465 }  // namespace android
466 }  // namespace aidl
467 namespace aidl {
468 namespace android {
469 namespace hardware {
470 namespace audio {
471 namespace core {
toString(IModule::ScreenRotation val)472 [[nodiscard]] static inline std::string toString(IModule::ScreenRotation val) {
473   switch(val) {
474   case IModule::ScreenRotation::DEG_0:
475     return "DEG_0";
476   case IModule::ScreenRotation::DEG_90:
477     return "DEG_90";
478   case IModule::ScreenRotation::DEG_180:
479     return "DEG_180";
480   case IModule::ScreenRotation::DEG_270:
481     return "DEG_270";
482   default:
483     return std::to_string(static_cast<int32_t>(val));
484   }
485 }
486 }  // namespace core
487 }  // namespace audio
488 }  // namespace hardware
489 }  // namespace android
490 }  // namespace aidl
491 namespace ndk {
492 namespace internal {
493 #pragma clang diagnostic push
494 #pragma clang diagnostic ignored "-Wc++17-extensions"
495 template <>
496 constexpr inline std::array<aidl::android::hardware::audio::core::IModule::ScreenRotation, 4> enum_values<aidl::android::hardware::audio::core::IModule::ScreenRotation> = {
497   aidl::android::hardware::audio::core::IModule::ScreenRotation::DEG_0,
498   aidl::android::hardware::audio::core::IModule::ScreenRotation::DEG_90,
499   aidl::android::hardware::audio::core::IModule::ScreenRotation::DEG_180,
500   aidl::android::hardware::audio::core::IModule::ScreenRotation::DEG_270,
501 };
502 #pragma clang diagnostic pop
503 }  // namespace internal
504 }  // namespace ndk
505