Lines Matching refs:virtual
68 class IAfThreadCallback : public virtual RefBase {
70 virtual audio_utils::mutex& mutex() const
72 virtual bool isNonOffloadableGlobalEffectEnabled_l() const
74 virtual audio_unique_id_t nextUniqueId(audio_unique_id_use_t use) = 0;
75 virtual bool btNrecIsOff() const = 0;
76 virtual float masterVolume_l() const
78 virtual bool masterMute_l() const
80 virtual float getMasterBalance_l() const
82 virtual bool streamMute_l(audio_stream_type_t stream) const
84 virtual audio_mode_t getMode() const = 0;
85 virtual bool isLowRamDevice() const = 0;
86 virtual bool isAudioPolicyReady() const = 0; // Effects
87 virtual uint32_t getScreenState() const = 0;
88 virtual std::optional<media::AudioVibratorInfo> getDefaultVibratorInfo_l() const
90 virtual const sp<IAfPatchPanel>& getPatchPanel() const = 0;
91 virtual const sp<MelReporter>& getMelReporter() const = 0;
92 virtual const sp<EffectsFactoryHalInterface>& getEffectsFactoryHal() const = 0;
93 virtual sp<IAudioManager> getOrCreateAudioManager() = 0; // Tracks
95 virtual bool updateOrphanEffectChains(const sp<IAfEffectModule>& effect)
97 virtual status_t moveEffectChain_ll(audio_session_t sessionId,
102 virtual void requestLogMerge() = 0;
103 virtual sp<NBLog::Writer> newWriter_l(size_t size, const char *name)
105 virtual void unregisterWriter(const sp<NBLog::Writer>& writer) = 0;
107 virtual sp<audioflinger::SyncEvent> createSyncEvent(AudioSystem::sync_event_t type,
115 virtual void ioConfigChanged_l(audio_io_config_event_t event,
118 virtual void onNonOffloadableGlobalEffectEnable() EXCLUDES_AudioFlinger_Mutex = 0;
119 virtual void onSupportedLatencyModesChanged(audio_io_handle_t output,
123 virtual void onHardError(std::set<audio_port_handle_t>& trackPortIds) = 0;
126 class IAfThreadBase : public virtual RefBase {
146 virtual status_t readyToRun() = 0;
147 virtual void clearPowerManager() EXCLUDES_ThreadBase_Mutex = 0;
148 virtual status_t initCheck() const = 0;
149 virtual type_t type() const = 0;
150 virtual bool isDuplicating() const = 0;
151 virtual audio_io_handle_t id() const = 0;
152 virtual uint32_t sampleRate() const = 0;
153 virtual audio_channel_mask_t channelMask() const = 0;
154 virtual audio_channel_mask_t mixerChannelMask() const = 0;
155 virtual audio_format_t format() const = 0;
156 virtual uint32_t channelCount() const = 0;
160 virtual size_t frameCount() const = 0;
161 virtual audio_channel_mask_t hapticChannelMask() const = 0;
162 virtual uint32_t hapticChannelCount() const = 0;
163 virtual uint32_t latency_l() const = 0; // NO_THREAD_SAFETY_ANALYSIS
164 virtual void setVolumeForOutput_l(float left, float right) const REQUIRES(mutex()) = 0;
167 virtual size_t frameCountHAL() const = 0;
168 virtual size_t frameSize() const = 0;
171 virtual void exit() EXCLUDES_ThreadBase_Mutex = 0;
172 virtual bool checkForNewParameter_l(const String8& keyValuePair, status_t& status)
174 virtual status_t setParameters(const String8& keyValuePairs) EXCLUDES_ThreadBase_Mutex = 0;
175 virtual String8 getParameters(const String8& keys) EXCLUDES_ThreadBase_Mutex = 0;
176 virtual void ioConfigChanged_l(
185 virtual void sendIoConfigEvent(
188 virtual void sendIoConfigEvent_l(
191 virtual void sendPrioConfigEvent(pid_t pid, pid_t tid, int32_t prio, bool forApp)
193 virtual void sendPrioConfigEvent_l(pid_t pid, pid_t tid, int32_t prio, bool forApp)
195 virtual status_t sendSetParameterConfigEvent_l(const String8& keyValuePair)
197 virtual status_t sendCreateAudioPatchConfigEvent(
200 virtual status_t sendReleaseAudioPatchConfigEvent(audio_patch_handle_t handle)
202 virtual status_t sendUpdateOutDeviceConfigEvent(
204 virtual void sendResizeBufferConfigEvent_l(int32_t maxSharedAudioHistoryMs)
206 virtual void sendCheckOutputStageEffectsEvent() EXCLUDES_ThreadBase_Mutex = 0;
207 virtual void sendCheckOutputStageEffectsEvent_l()
209 virtual void sendHalLatencyModesChangedEvent_l()
212 virtual void processConfigEvents_l()
214 virtual void setCheckOutputStageEffects() = 0; // no mutex needed
215 virtual void cacheParameters_l()
217 virtual status_t createAudioPatch_l(
220 virtual status_t releaseAudioPatch_l(const audio_patch_handle_t handle)
222 virtual void updateOutDevices(const DeviceDescriptorBaseVector& outDevices)
224 virtual void toAudioPortConfig(struct audio_port_config* config)
226 virtual void resizeInputBuffer_l(int32_t maxSharedAudioHistoryMs)
230 virtual bool inStandby() const = 0;
231 virtual const DeviceTypeSet outDeviceTypes_l() const REQUIRES(mutex()) = 0;
232 virtual audio_devices_t inDeviceType_l() const REQUIRES(mutex()) = 0;
233 virtual DeviceTypeSet getDeviceTypes_l() const REQUIRES(mutex()) = 0;
234 virtual const AudioDeviceTypeAddrVector& outDeviceTypeAddrs() const = 0;
235 virtual const AudioDeviceTypeAddr& inDeviceTypeAddr() const = 0;
236 virtual bool isOutput() const = 0;
237 virtual bool isOffloadOrMmap() const = 0;
238 virtual sp<StreamHalInterface> stream() const = 0;
239 virtual sp<IAfEffectHandle> createEffect_l(
267 virtual sp<IAfEffectChain> getEffectChain(audio_session_t sessionId) const
270 virtual sp<IAfEffectChain> getEffectChain_l(audio_session_t sessionId) const
272 virtual std::vector<int> getEffectIds_l(audio_session_t sessionId) const
275 virtual status_t addEffectChain_l(const sp<IAfEffectChain>& chain)
278 virtual size_t removeEffectChain_l(const sp<IAfEffectChain>& chain)
284 virtual void lockEffectChains_l(Vector<sp<IAfEffectChain>>& effectChains)
287 virtual void unlockEffectChains(const Vector<sp<IAfEffectChain>>& effectChains)
290 virtual Vector<sp<IAfEffectChain>> getEffectChains_l() const
293 virtual void setMode(audio_mode_t mode)
296 virtual sp<IAfEffectModule> getEffect(audio_session_t sessionId, int effectId) const
298 virtual sp<IAfEffectModule> getEffect_l(audio_session_t sessionId, int effectId) const
303 virtual status_t addEffect_ll(const sp<IAfEffectModule>& effect)
307 virtual void removeEffect_l(const sp<IAfEffectModule>& effect, bool release = false)
310 virtual void disconnectEffectHandle(IAfEffectHandle* handle, bool unpinIfLast)
313 virtual void detachAuxEffect_l(int effectId) REQUIRES(mutex()) = 0;
319 virtual uint32_t hasAudioSession_l(audio_session_t sessionId) const REQUIRES(mutex()) = 0;
320 virtual uint32_t hasAudioSession(audio_session_t sessionId) const
325 virtual product_strategy_t getStrategyForSession_l(audio_session_t sessionId) const
330 virtual void checkSuspendOnEffectEnabled(
334 virtual status_t setSyncEvent(const sp<audioflinger::SyncEvent>& event)
337 virtual bool isValidSyncEvent(const sp<audioflinger::SyncEvent>& event) const = 0;
345 virtual sp<MemoryDealer> readOnlyHeap() const = 0;
347 virtual sp<IMemory> pipeMemory() const = 0;
349 virtual void systemReady() EXCLUDES_ThreadBase_Mutex = 0;
352 virtual status_t checkEffectCompatibility_l(
355 virtual void broadcast_l() REQUIRES(mutex()) = 0;
357 virtual bool isTimestampCorrectionEnabled_l() const REQUIRES(mutex()) = 0;
359 virtual bool isMsdDevice() const = 0;
361 virtual void dump(int fd, const Vector<String16>& args) EXCLUDES_ThreadBase_Mutex = 0;
364 virtual void sendStatistics(bool force) EXCLUDES_ThreadBase_Mutex = 0;
366 virtual audio_utils::mutex& mutex() const
369 virtual void onEffectEnable(const sp<IAfEffectModule>& effect) EXCLUDES_ThreadBase_Mutex = 0;
370 virtual void onEffectDisable() EXCLUDES_ThreadBase_Mutex = 0;
373 virtual void invalidateTracksForAudioSession_l(audio_session_t sessionId) const
376 virtual void invalidateTracksForAudioSession(audio_session_t sessionId) const
379 virtual bool isStreamInitialized() const = 0;
380 virtual void startMelComputation_l(const sp<audio_utils::MelProcessor>& processor)
382 virtual void stopMelComputation_l()
385 virtual product_strategy_t getStrategyForStream(audio_stream_type_t stream) const
388 virtual void setEffectSuspended_l(
396 virtual void waitWhileThreadBusy_l(audio_utils::unique_lock& ul)
399 virtual sp<IAfDirectOutputThread> asIAfDirectOutputThread() { return nullptr; } in asIAfDirectOutputThread()
400 virtual sp<IAfDuplicatingThread> asIAfDuplicatingThread() { return nullptr; } in asIAfDuplicatingThread()
401 virtual sp<IAfPlaybackThread> asIAfPlaybackThread() { return nullptr; } in asIAfPlaybackThread()
402 virtual sp<IAfRecordThread> asIAfRecordThread() { return nullptr; } in asIAfRecordThread()
403 virtual IAfThreadCallback* afThreadCallback() const = 0;
406 class IAfPlaybackThread : public virtual IAfThreadBase, public virtual VolumeInterface {
442 virtual uint32_t latency() const = 0; // should be in IAfThreadBase?
444 virtual uint32_t& fastTrackAvailMask_l() REQUIRES(mutex()) = 0;
446 virtual sp<IAfTrack> createTrack_l(
471 virtual status_t addTrack_l(const sp<IAfTrack>& track) REQUIRES(mutex()) = 0;
472 virtual bool destroyTrack_l(const sp<IAfTrack>& track) REQUIRES(mutex()) = 0;
473 virtual bool isTrackActive(const sp<IAfTrack>& track) const REQUIRES(mutex()) = 0;
474 virtual void addOutputTrack_l(const sp<IAfTrack>& track) REQUIRES(mutex()) = 0;
476 virtual AudioStreamOut* getOutput_l() const REQUIRES(mutex()) = 0;
477 virtual AudioStreamOut* getOutput() const EXCLUDES_ThreadBase_Mutex = 0;
478 virtual AudioStreamOut* clearOutput() EXCLUDES_ThreadBase_Mutex = 0;
481 virtual void suspend() = 0;
482 virtual void restore() = 0;
483 virtual bool isSuspended() const = 0;
484 virtual status_t getRenderPosition(uint32_t* halFrames, uint32_t* dspFrames) const
488 virtual float* sinkBuffer() const = 0;
490 virtual status_t attachAuxEffect(const sp<IAfTrack>& track, int EffectId)
492 virtual status_t attachAuxEffect_l(const sp<IAfTrack>& track, int EffectId)
496 virtual bool invalidateTracks_l(audio_stream_type_t streamType) REQUIRES(mutex()) = 0;
497 virtual bool invalidateTracks_l(std::set<audio_port_handle_t>& portIds) REQUIRES(mutex()) = 0;
498 virtual void invalidateTracks(audio_stream_type_t streamType)
502 virtual void invalidateTracks(std::set<audio_port_handle_t>& portIds)
505 virtual status_t getTimestamp_l(AudioTimestamp& timestamp) REQUIRES(mutex()) = 0;
506 virtual void addPatchTrack(const sp<IAfPatchTrack>& track) EXCLUDES_ThreadBase_Mutex = 0;
507 virtual void deletePatchTrack(const sp<IAfPatchTrack>& track) EXCLUDES_ThreadBase_Mutex = 0;
510 virtual int64_t computeWaitTimeNs_l() const REQUIRES(mutex()) = 0;
512 virtual bool isTrackAllowed_l(
516 virtual bool supportsHapticPlayback() const = 0;
518 virtual void setDownStreamPatch(const struct audio_patch* patch)
521 virtual IAfTrack* getTrackById_l(audio_port_handle_t trackId) REQUIRES(mutex()) = 0;
523 virtual bool hasMixer() const = 0;
525 virtual status_t setRequestedLatencyMode(audio_latency_mode_t mode) = 0;
527 virtual status_t getSupportedLatencyModes(std::vector<audio_latency_mode_t>* modes)
530 virtual status_t setBluetoothVariableLatencyEnabled(bool enabled) = 0;
532 virtual void setStandby() EXCLUDES_ThreadBase_Mutex = 0;
533 virtual void setStandby_l() REQUIRES(mutex()) = 0;
534 virtual bool waitForHalStart() EXCLUDES_ThreadBase_Mutex = 0;
536 virtual bool hasFastMixer() const = 0;
537 virtual FastTrackUnderruns getFastTrackUnderruns(size_t fastIndex) const = 0;
538 virtual const std::atomic<int64_t>& framesWritten() const = 0;
540 virtual bool usesHwAvSync() const = 0;
542 virtual void setTracksInternalMute(std::map<audio_port_handle_t, bool>* tracksInternalMute)
546 class IAfDirectOutputThread : public virtual IAfPlaybackThread {
548 virtual status_t selectPresentation(int presentationId, int programId) = 0;
551 class IAfDuplicatingThread : public virtual IAfPlaybackThread {
557 virtual void addOutputTrack(IAfPlaybackThread* thread) EXCLUDES_ThreadBase_Mutex = 0;
558 virtual uint32_t waitTimeMs() const = 0;
559 virtual void removeOutputTrack(IAfPlaybackThread* thread) EXCLUDES_ThreadBase_Mutex = 0;
562 class IAfRecordThread : public virtual IAfThreadBase {
568 virtual sp<IAfRecordTrack> createRecordTrack_l(
585 virtual void destroyTrack_l(const sp<IAfRecordTrack>& track) REQUIRES(mutex()) = 0;
586 virtual void removeTrack_l(const sp<IAfRecordTrack>& track) REQUIRES(mutex()) = 0;
588 virtual status_t start(
594 virtual bool stop(IAfRecordTrack* recordTrack) EXCLUDES_ThreadBase_Mutex = 0;
597 virtual AudioStreamIn* getInput() const = 0;
598 virtual AudioStreamIn* clearInput() = 0;
600 virtual status_t getActiveMicrophones(
603 virtual status_t setPreferredMicrophoneDirection(audio_microphone_direction_t direction)
605 virtual status_t setPreferredMicrophoneFieldDimension(float zoom)
608 virtual void addPatchTrack(const sp<IAfPatchRecord>& record)
610 virtual void deletePatchTrack(const sp<IAfPatchRecord>& record)
612 virtual bool fastTrackAvailable() const = 0;
613 virtual void setFastTrackAvailable(bool available) = 0;
615 virtual void setRecordSilenced(audio_port_handle_t portId, bool silenced)
617 virtual bool hasFastCapture() const = 0;
619 virtual void checkBtNrec() EXCLUDES_ThreadBase_Mutex = 0;
620 virtual uint32_t getInputFramesLost() const EXCLUDES_ThreadBase_Mutex = 0;
622 virtual status_t shareAudioHistory(
626 virtual void resetAudioHistory_l() REQUIRES(mutex()) = 0;
629 class IAfMmapThread : public virtual IAfThreadBase {
639 virtual void configure(
646 virtual void disconnect() EXCLUDES_ThreadBase_Mutex = 0;
649 virtual status_t createMmapBuffer(
652 virtual status_t getMmapPosition(struct audio_mmap_position* position) const
654 virtual status_t start(
657 virtual status_t stop(audio_port_handle_t handle) EXCLUDES_ThreadBase_Mutex = 0;
658 virtual status_t standby() EXCLUDES_ThreadBase_Mutex = 0;
659 virtual status_t getExternalPosition(uint64_t* position, int64_t* timeNanos) const
661 virtual status_t reportData(const void* buffer, size_t frameCount)
665 virtual void invalidateTracks(std::set<audio_port_handle_t>& portIds)
669 virtual void setRecordSilenced(audio_port_handle_t portId, bool silenced)
672 virtual sp<IAfMmapPlaybackThread> asIAfMmapPlaybackThread() { return nullptr; } in asIAfMmapPlaybackThread()
673 virtual sp<IAfMmapCaptureThread> asIAfMmapCaptureThread() { return nullptr; } in asIAfMmapCaptureThread()
676 class IAfMmapPlaybackThread : public virtual IAfMmapThread, public virtual VolumeInterface {
682 virtual AudioStreamOut* clearOutput() EXCLUDES_ThreadBase_Mutex = 0;
685 class IAfMmapCaptureThread : public virtual IAfMmapThread {
691 virtual AudioStreamIn* clearInput() EXCLUDES_ThreadBase_Mutex = 0;