Loading services/audioflinger/fastpath/AutoPark.h +1 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ public: // Park the specific FastThread, which can be nullptr, in hot idle if not currently idling explicit AutoPark(const sp<T>& fastThread) : mFastThread(fastThread) { mPreviousCommand = FastThreadState::HOT_IDLE; if (fastThread != nullptr) { auto sq = mFastThread->sq(); FastThreadState *state = sq->begin(); Loading Loading @@ -57,7 +56,7 @@ public: private: const sp<T> mFastThread; // if !&IDLE, holds the FastThread state to restore after new parameters processed FastThreadState::Command mPreviousCommand; FastThreadState::Command mPreviousCommand = FastThreadState::HOT_IDLE; }; // class AutoPark } // namespace android services/audioflinger/fastpath/FastMixer.h +4 −3 Original line number Diff line number Diff line Loading @@ -80,12 +80,13 @@ private: // if sink format is different than mixer output. size_t mSinkBufferSize = 0; uint32_t mSinkChannelCount = FCC_2; audio_channel_mask_t mSinkChannelMask; audio_channel_mask_t mSinkChannelMask; // set in ctor void* mMixerBuffer = nullptr; // mixer output buffer. size_t mMixerBufferSize = 0; static constexpr audio_format_t mMixerBufferFormat = AUDIO_FORMAT_PCM_FLOAT; uint32_t mAudioChannelCount; // audio channel count, excludes haptic channels. // audio channel count, excludes haptic channels. Set in onStateChange(). uint32_t mAudioChannelCount = 0; enum {UNDEFINED, MIXED, ZEROED} mMixerBufferState = UNDEFINED; NBAIO_Format mFormat{Format_Invalid}; Loading @@ -103,7 +104,7 @@ private: // accessed without lock between multiple threads. std::atomic_bool mMasterMono{}; std::atomic<float> mMasterBalance{}; std::atomic_int_fast64_t mBoottimeOffset; std::atomic_int_fast64_t mBoottimeOffset{}; // parent thread id for debugging purposes [[maybe_unused]] const audio_io_handle_t mThreadIoHandle; Loading services/audioflinger/fastpath/FastMixerDumpState.h +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ private: struct FastTrackDump { FastTrackUnderruns mUnderruns; size_t mFramesReady = 0; // most recent value only; no long-term statistics kept int64_t mFramesWritten; // last value from track int64_t mFramesWritten = 0; // last value from track }; // No virtuals. Loading services/audioflinger/fastpath/FastMixerState.h +5 −5 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public: // The provider implementation is responsible for validating that the return value is in range. virtual gain_minifloat_packed_t getVolumeLR() = 0; protected: VolumeProvider() { } VolumeProvider() = default; virtual ~VolumeProvider() = default; }; Loading Loading @@ -66,9 +66,9 @@ struct FastMixerState : FastThreadState { FastMixerState(); // These are the minimum, maximum, and default values for maximum number of fast tracks static const unsigned kMinFastTracks = 2; static const unsigned kMaxFastTracks = 32; static const unsigned kDefaultFastTracks = 8; static constexpr unsigned kMinFastTracks = 2; static constexpr unsigned kMaxFastTracks = 32; static constexpr unsigned kDefaultFastTracks = 8; static unsigned sMaxFastTracks; // Configured maximum number of fast tracks static pthread_once_t sMaxFastTracksOnce; // Protects initializer for sMaxFastTracks Loading services/audioflinger/fastpath/StateQueue.h +2 −3 Original line number Diff line number Diff line Loading @@ -123,11 +123,10 @@ struct StateQueueMutatorDump { #endif // manages a FIFO queue of states template<typename T> class StateQueue { // marking as final to avoid derived classes as there are no virtuals. template<typename T> class StateQueue final { public: virtual ~StateQueue() = default; // why is this virtual? // Observer APIs // Poll for a state change. Returns a pointer to a read-only state, Loading Loading
services/audioflinger/fastpath/AutoPark.h +1 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ public: // Park the specific FastThread, which can be nullptr, in hot idle if not currently idling explicit AutoPark(const sp<T>& fastThread) : mFastThread(fastThread) { mPreviousCommand = FastThreadState::HOT_IDLE; if (fastThread != nullptr) { auto sq = mFastThread->sq(); FastThreadState *state = sq->begin(); Loading Loading @@ -57,7 +56,7 @@ public: private: const sp<T> mFastThread; // if !&IDLE, holds the FastThread state to restore after new parameters processed FastThreadState::Command mPreviousCommand; FastThreadState::Command mPreviousCommand = FastThreadState::HOT_IDLE; }; // class AutoPark } // namespace android
services/audioflinger/fastpath/FastMixer.h +4 −3 Original line number Diff line number Diff line Loading @@ -80,12 +80,13 @@ private: // if sink format is different than mixer output. size_t mSinkBufferSize = 0; uint32_t mSinkChannelCount = FCC_2; audio_channel_mask_t mSinkChannelMask; audio_channel_mask_t mSinkChannelMask; // set in ctor void* mMixerBuffer = nullptr; // mixer output buffer. size_t mMixerBufferSize = 0; static constexpr audio_format_t mMixerBufferFormat = AUDIO_FORMAT_PCM_FLOAT; uint32_t mAudioChannelCount; // audio channel count, excludes haptic channels. // audio channel count, excludes haptic channels. Set in onStateChange(). uint32_t mAudioChannelCount = 0; enum {UNDEFINED, MIXED, ZEROED} mMixerBufferState = UNDEFINED; NBAIO_Format mFormat{Format_Invalid}; Loading @@ -103,7 +104,7 @@ private: // accessed without lock between multiple threads. std::atomic_bool mMasterMono{}; std::atomic<float> mMasterBalance{}; std::atomic_int_fast64_t mBoottimeOffset; std::atomic_int_fast64_t mBoottimeOffset{}; // parent thread id for debugging purposes [[maybe_unused]] const audio_io_handle_t mThreadIoHandle; Loading
services/audioflinger/fastpath/FastMixerDumpState.h +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ private: struct FastTrackDump { FastTrackUnderruns mUnderruns; size_t mFramesReady = 0; // most recent value only; no long-term statistics kept int64_t mFramesWritten; // last value from track int64_t mFramesWritten = 0; // last value from track }; // No virtuals. Loading
services/audioflinger/fastpath/FastMixerState.h +5 −5 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public: // The provider implementation is responsible for validating that the return value is in range. virtual gain_minifloat_packed_t getVolumeLR() = 0; protected: VolumeProvider() { } VolumeProvider() = default; virtual ~VolumeProvider() = default; }; Loading Loading @@ -66,9 +66,9 @@ struct FastMixerState : FastThreadState { FastMixerState(); // These are the minimum, maximum, and default values for maximum number of fast tracks static const unsigned kMinFastTracks = 2; static const unsigned kMaxFastTracks = 32; static const unsigned kDefaultFastTracks = 8; static constexpr unsigned kMinFastTracks = 2; static constexpr unsigned kMaxFastTracks = 32; static constexpr unsigned kDefaultFastTracks = 8; static unsigned sMaxFastTracks; // Configured maximum number of fast tracks static pthread_once_t sMaxFastTracksOnce; // Protects initializer for sMaxFastTracks Loading
services/audioflinger/fastpath/StateQueue.h +2 −3 Original line number Diff line number Diff line Loading @@ -123,11 +123,10 @@ struct StateQueueMutatorDump { #endif // manages a FIFO queue of states template<typename T> class StateQueue { // marking as final to avoid derived classes as there are no virtuals. template<typename T> class StateQueue final { public: virtual ~StateQueue() = default; // why is this virtual? // Observer APIs // Poll for a state change. Returns a pointer to a read-only state, Loading