Loading services/audiopolicy/common/managerdefinitions/include/EffectDescriptor.h +3 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,9 @@ public: private: status_t setEffectEnabled(const sp<EffectDescriptor> &effectDesc, bool enabled); uint32_t mTotalEffectsCpuLoad; // current CPU load used by effects uint32_t mTotalEffectsMemory; // current memory used by effects uint32_t mTotalEffectsCpuLoad; // current CPU load used by effects (in MIPS) uint32_t mTotalEffectsMemory; // current memory used by effects (in KB) uint32_t mTotalEffectsMemoryMaxUsed; // maximum memory used by effects (in KB) /** * Maximum CPU load allocated to audio effects in 0.1 MIPS (ARMv5TE, 0 WS memory) units Loading services/audiopolicy/common/managerdefinitions/src/EffectDescriptor.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ status_t EffectDescriptor::dump(int fd) EffectDescriptorCollection::EffectDescriptorCollection() : mTotalEffectsCpuLoad(0), mTotalEffectsMemory(0) mTotalEffectsMemory(0), mTotalEffectsMemoryMaxUsed(0) { } Loading @@ -62,6 +63,9 @@ status_t EffectDescriptorCollection::registerEffect(const effect_descriptor_t *d return INVALID_OPERATION; } mTotalEffectsMemory += desc->memoryUsage; if (mTotalEffectsMemory > mTotalEffectsMemoryMaxUsed) { mTotalEffectsMemoryMaxUsed = mTotalEffectsMemory; } ALOGV("registerEffect() effect %s, io %d, strategy %d session %d id %d", desc->name, io, strategy, session, id); ALOGV("registerEffect() memory %d, total memory %d", desc->memoryUsage, mTotalEffectsMemory); Loading Loading @@ -175,8 +179,9 @@ status_t EffectDescriptorCollection::dump(int fd) const size_t SIZE = 256; char buffer[SIZE]; snprintf(buffer, SIZE, "\nTotal Effects CPU: %f MIPS, Total Effects memory: %d KB\n", (float)mTotalEffectsCpuLoad/10, mTotalEffectsMemory); snprintf(buffer, SIZE, "\nTotal Effects CPU: %f MIPS, Total Effects memory: %d KB, Max memory used: %d KB\n", (float)mTotalEffectsCpuLoad/10, mTotalEffectsMemory, mTotalEffectsMemoryMaxUsed); write(fd, buffer, strlen(buffer)); snprintf(buffer, SIZE, "Registered effects:\n"); Loading Loading
services/audiopolicy/common/managerdefinitions/include/EffectDescriptor.h +3 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,9 @@ public: private: status_t setEffectEnabled(const sp<EffectDescriptor> &effectDesc, bool enabled); uint32_t mTotalEffectsCpuLoad; // current CPU load used by effects uint32_t mTotalEffectsMemory; // current memory used by effects uint32_t mTotalEffectsCpuLoad; // current CPU load used by effects (in MIPS) uint32_t mTotalEffectsMemory; // current memory used by effects (in KB) uint32_t mTotalEffectsMemoryMaxUsed; // maximum memory used by effects (in KB) /** * Maximum CPU load allocated to audio effects in 0.1 MIPS (ARMv5TE, 0 WS memory) units Loading
services/audiopolicy/common/managerdefinitions/src/EffectDescriptor.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ status_t EffectDescriptor::dump(int fd) EffectDescriptorCollection::EffectDescriptorCollection() : mTotalEffectsCpuLoad(0), mTotalEffectsMemory(0) mTotalEffectsMemory(0), mTotalEffectsMemoryMaxUsed(0) { } Loading @@ -62,6 +63,9 @@ status_t EffectDescriptorCollection::registerEffect(const effect_descriptor_t *d return INVALID_OPERATION; } mTotalEffectsMemory += desc->memoryUsage; if (mTotalEffectsMemory > mTotalEffectsMemoryMaxUsed) { mTotalEffectsMemoryMaxUsed = mTotalEffectsMemory; } ALOGV("registerEffect() effect %s, io %d, strategy %d session %d id %d", desc->name, io, strategy, session, id); ALOGV("registerEffect() memory %d, total memory %d", desc->memoryUsage, mTotalEffectsMemory); Loading Loading @@ -175,8 +179,9 @@ status_t EffectDescriptorCollection::dump(int fd) const size_t SIZE = 256; char buffer[SIZE]; snprintf(buffer, SIZE, "\nTotal Effects CPU: %f MIPS, Total Effects memory: %d KB\n", (float)mTotalEffectsCpuLoad/10, mTotalEffectsMemory); snprintf(buffer, SIZE, "\nTotal Effects CPU: %f MIPS, Total Effects memory: %d KB, Max memory used: %d KB\n", (float)mTotalEffectsCpuLoad/10, mTotalEffectsMemory, mTotalEffectsMemoryMaxUsed); write(fd, buffer, strlen(buffer)); snprintf(buffer, SIZE, "Registered effects:\n"); Loading