Lines Matching refs:virtual

48     virtual audio_io_handle_t io() const = 0;
49 virtual bool isOutput() const = 0;
50 virtual bool isOffload() const = 0;
51 virtual bool isOffloadOrDirect() const = 0;
52 virtual bool isOffloadOrMmap() const = 0;
53 virtual bool isSpatializer() const = 0;
54 virtual uint32_t sampleRate() const = 0;
55 virtual audio_channel_mask_t inChannelMask(int id) const = 0;
56 virtual uint32_t inChannelCount(int id) const = 0;
57 virtual audio_channel_mask_t outChannelMask() const = 0;
58 virtual uint32_t outChannelCount() const = 0;
59 virtual audio_channel_mask_t hapticChannelMask() const = 0;
60 virtual size_t frameCount() const = 0;
64 virtual uint32_t latency() const { return 0; } in latency()
65 virtual status_t addEffectToHal(const sp<EffectHalInterface>& effect) = 0;
66 virtual status_t removeEffectFromHal(const sp<EffectHalInterface>& effect) = 0;
67 virtual void setVolumeForOutput(float left, float right) const = 0;
68 virtual bool disconnectEffectHandle(IAfEffectHandle *handle, bool unpinIfLast) = 0;
69 virtual void checkSuspendOnEffectEnabled(
71 virtual void onEffectEnable(const sp<IAfEffectBase>& effect) = 0;
72 virtual void onEffectDisable(const sp<IAfEffectBase>& effect) = 0;
75 virtual status_t createEffectHal(const effect_uuid_t *pEffectUuid,
77 virtual status_t allocateHalBuffer(size_t size, sp<EffectBufferHalInterface>* buffer) = 0;
78 virtual bool updateOrphanEffectChains(const sp<IAfEffectBase>& effect) = 0;
81 virtual product_strategy_t strategy() const = 0;
82 virtual int32_t activeTrackCnt() const = 0;
83 virtual void resetVolume_l() REQUIRES(audio_utils::EffectChain_Mutex) = 0;
84 virtual wp<IAfEffectChain> chain() const = 0;
85 virtual bool isAudioPolicyReady() const = 0;
88 class IAfEffectBase : public virtual RefBase {
102 virtual int id() const = 0;
103 virtual effect_state state() const = 0;
104 virtual audio_session_t sessionId() const = 0;
105 virtual const effect_descriptor_t& desc() const = 0;
106 virtual bool isOffloadable() const = 0;
107 virtual bool isImplementationSoftware() const = 0;
108 virtual bool isProcessImplemented() const = 0;
109 virtual bool isVolumeControl() const REQUIRES(audio_utils::EffectChain_Mutex) = 0;
110 virtual bool isVolumeMonitor() const = 0;
111 virtual bool isEnabled() const = 0;
112 virtual bool isPinned() const = 0;
113 virtual void unPin() = 0;
114 virtual status_t updatePolicyState() EXCLUDES_EffectBase_Mutex = 0;
115 virtual bool purgeHandles() EXCLUDES_EffectBase_Mutex = 0;
116 virtual void checkSuspendOnEffectEnabled(bool enabled, bool threadLocked) = 0;
119 virtual void setCallback(const sp<EffectCallbackInterface>& callback) = 0;
120 virtual sp<EffectCallbackInterface> getCallback() const = 0;
122 virtual status_t addHandle(IAfEffectHandle* handle) EXCLUDES_EffectBase_Mutex = 0;
123 virtual ssize_t removeHandle(IAfEffectHandle* handle) EXCLUDES_EffectBase_Mutex = 0;
125 virtual sp<IAfEffectModule> asEffectModule() = 0;
126 virtual sp<IAfDeviceEffectProxy> asDeviceEffectProxy() = 0;
128 virtual status_t command(int32_t cmdCode, const std::vector<uint8_t>& cmdData,
132 virtual void dump(int fd, const Vector<String16>& args) const = 0;
135 virtual status_t setEnabled(bool enabled, bool fromHandle) EXCLUDES_EffectBase_Mutex = 0;
136 virtual status_t setEnabled_l(bool enabled) REQUIRES(audio_utils::EffectBase_Mutex) = 0;
137 virtual void setSuspended(bool suspended) EXCLUDES_EffectBase_Mutex = 0;
138 virtual bool suspended() const EXCLUDES_EffectBase_Mutex = 0;
140 virtual ssize_t disconnectHandle(IAfEffectHandle* handle,
142 virtual ssize_t removeHandle_l(IAfEffectHandle* handle)
144 virtual IAfEffectHandle* controlHandle_l() REQUIRES(audio_utils::EffectBase_Mutex) = 0;
146 virtual audio_utils::mutex& mutex() const
150 class IAfEffectModule : public virtual IAfEffectBase {
163 virtual int16_t *inBuffer() const = 0;
164 virtual status_t setDevices(const AudioDeviceTypeAddrVector &devices) = 0;
165 virtual status_t setInputDevice(const AudioDeviceTypeAddr &device) = 0;
166 virtual status_t setVolume_l(uint32_t* left, uint32_t* right,
169 virtual status_t setOffloaded_l(bool offloaded, audio_io_handle_t io) = 0;
170 virtual bool isOffloaded_l() const = 0;
172 virtual status_t setAudioSource(audio_source_t source) = 0;
173 virtual status_t setMode(audio_mode_t mode) = 0;
175 virtual status_t start_l() = 0;
176 virtual status_t getConfigs_l(audio_config_base_t* inputCfg, audio_config_base_t* outputCfg,
181 virtual bool isHapticGenerator() const = 0;
183 virtual bool isSpatializer() const = 0;
185 virtual status_t setHapticScale_l(int id, os::HapticScale hapticScale)
187 virtual status_t setVibratorInfo_l(const media::AudioVibratorInfo& vibratorInfo)
189 virtual status_t sendMetadata_ll(const std::vector<playback_track_metadata_v7_t>& metadata)
194 virtual bool updateState_l()
198 virtual void process() = 0;
199 virtual void reset_l() REQUIRES(audio_utils::EffectChain_Mutex) = 0;
200 virtual status_t configure_l() REQUIRES(audio_utils::EffectChain_Mutex) = 0;
201 virtual status_t init_l()
203 virtual uint32_t status() const = 0;
204 virtual bool isProcessEnabled() const = 0;
205 virtual bool isOffloadedOrDirect_l() const REQUIRES(audio_utils::EffectChain_Mutex) = 0;
206 virtual bool isVolumeControlEnabled_l() const REQUIRES(audio_utils::EffectChain_Mutex) = 0;
208 virtual void setInBuffer(const sp<EffectBufferHalInterface>& buffer) = 0;
209 virtual void setOutBuffer(const sp<EffectBufferHalInterface>& buffer) = 0;
210 virtual int16_t *outBuffer() const = 0;
213 virtual void updateAccessMode_l() = 0;
215 virtual status_t stop_l() = 0;
216 virtual void addEffectToHal_l() = 0;
217 virtual void release_l(const std::string& from) = 0;
236 virtual void process_l() REQUIRES(audio_utils::EffectChain_Mutex) = 0;
238 virtual audio_utils::mutex& mutex() const RETURN_CAPABILITY(audio_utils::EffectChain_Mutex) = 0;
240 virtual status_t createEffect(sp<IAfEffectModule>& effect, effect_descriptor_t* desc, int id,
244 virtual status_t addEffect(const sp<IAfEffectModule>& handle)
246 virtual status_t addEffect_l(const sp<IAfEffectModule>& handle)
248 virtual size_t removeEffect(const sp<IAfEffectModule>& handle,
251 virtual audio_session_t sessionId() const = 0;
252 virtual void setSessionId(audio_session_t sessionId) = 0;
254 virtual sp<IAfEffectModule> getEffectFromDesc(effect_descriptor_t* descriptor) const
256 virtual sp<IAfEffectModule> getEffectFromId_l(int id) const
258 virtual sp<IAfEffectModule> getEffectFromType_l(const effect_uuid_t* type) const
260 virtual std::vector<int> getEffectIds_l() const = 0;
261 virtual bool setVolume(uint32_t* left, uint32_t* right,
263 virtual void resetVolume_l() REQUIRES(audio_utils::EffectChain_Mutex) = 0;
264 virtual void setDevices_l(const AudioDeviceTypeAddrVector& devices)
266 virtual void setInputDevice_l(const AudioDeviceTypeAddr& device)
268 virtual void setMode_l(audio_mode_t mode)
270 virtual void setAudioSource_l(audio_source_t source)
273 virtual void setInBuffer(const sp<EffectBufferHalInterface>& buffer) = 0;
274 virtual float *inBuffer() const = 0;
275 virtual void setOutBuffer(const sp<EffectBufferHalInterface>& buffer) = 0;
276 virtual float *outBuffer() const = 0;
278 virtual void incTrackCnt() = 0;
279 virtual void decTrackCnt() = 0;
280 virtual int32_t trackCnt() const = 0;
282 virtual void incActiveTrackCnt() = 0;
283 virtual void decActiveTrackCnt() = 0;
284 virtual int32_t activeTrackCnt() const = 0;
286 virtual product_strategy_t strategy() const = 0;
287 virtual void setStrategy(product_strategy_t strategy) = 0;
291 virtual void setEffectSuspended_l(const effect_uuid_t* type, bool suspend) = 0;
293 virtual void setEffectSuspendedAll_l(bool suspend) = 0;
295 virtual void checkSuspendOnEffectEnabled_l(const sp<IAfEffectModule>& effect, bool enabled)
298 virtual void clearInputBuffer() EXCLUDES_EffectChain_Mutex = 0;
301 virtual bool isNonOffloadableEnabled() const EXCLUDES_EffectChain_Mutex = 0;
302 virtual bool isNonOffloadableEnabled_l() const REQUIRES(audio_utils::EffectChain_Mutex) = 0;
304 virtual void syncHalEffectsState_l()
308 virtual void checkOutputFlagCompatibility(audio_output_flags_t *flags) const = 0;
311 virtual void checkInputFlagCompatibility(audio_input_flags_t *flags) const = 0;
314 virtual bool isRawCompatible() const = 0;
317 virtual bool isFastCompatible() const = 0;
320 virtual bool isBitPerfectCompatible() const = 0;
323 virtual bool isCompatibleWithThread_l(const sp<IAfThreadBase>& thread) const
326 virtual bool containsHapticGeneratingEffect()
329 virtual bool containsHapticGeneratingEffect_l()
332 virtual void setHapticScale_l(int id, os::HapticScale hapticScale)
335 virtual sp<EffectCallbackInterface> effectCallback() const = 0;
337 virtual wp<IAfThreadBase> thread() const = 0;
338 virtual void setThread(const sp<IAfThreadBase>& thread) EXCLUDES_EffectChain_Mutex = 0;
340 virtual bool isFirstEffect_l(int id) const REQUIRES(audio_utils::EffectChain_Mutex) = 0;
342 virtual size_t numberOfEffects() const = 0;
343 virtual sp<IAfEffectModule> getEffectModule(size_t index) const = 0;
346 virtual void sendMetadata_l(const std::vector<playback_track_metadata_v7_t>& allMetadata,
349 virtual void dump(int fd, const Vector<String16>& args) const = 0;
352 class IAfEffectHandle : public virtual RefBase {
364 virtual status_t initCheck() const = 0;
365 virtual bool enabled() const = 0;
366 virtual int id() const = 0;
367 virtual wp<IAfEffectBase> effect() const = 0;
368 virtual sp<android::media::IEffect> asIEffect() = 0;
369 virtual const sp<Client>& client() const = 0;
372 virtual void setControl(bool hasControl, bool signal, bool enabled) = 0;
373 virtual bool hasControl() const = 0;
374 virtual void setEnabled(bool enabled) = 0;
375 virtual bool disconnected() const = 0;
376 virtual int priority() const = 0;
378 virtual void commandExecuted(uint32_t cmdCode,
381 virtual void framesProcessed(int32_t frames) const = 0;
383 virtual void dumpToBuffer(char* buffer, size_t size) const = 0;
386 class IAfDeviceEffectProxy : public virtual IAfEffectBase {
392 virtual status_t init_l(const std::map<audio_patch_handle_t, IAfPatchPanel::Patch>& patches)
394 virtual const AudioDeviceTypeAddr& device() const = 0;
396 virtual status_t onCreatePatch(
399 virtual status_t onUpdatePatch(audio_patch_handle_t oldPatchHandle,
402 virtual void onReleasePatch(audio_patch_handle_t patchHandle) = 0;
404 virtual void dump2(int fd, int spaces) const = 0; // TODO(b/291319101) naming?
408 virtual bool isOutput() const = 0;
409 virtual uint32_t sampleRate() const = 0;
410 virtual audio_channel_mask_t channelMask() const = 0;
411 virtual uint32_t channelCount() const = 0;
413 virtual size_t removeEffect(const sp<IAfEffectModule>& effect) = 0;
414 virtual status_t addEffectToHal(const sp<EffectHalInterface>& effect) = 0;
415 virtual status_t removeEffectFromHal(const sp<EffectHalInterface>& effect) = 0;