summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/FastMixer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use audio tag for system tracingGlenn Kasten2012-05-101-0/+7
| | | | | | Disabled by default; uncomment ATRACE_TAG to enable Change-Id: I99af894022a859ee5644bd853cfd8a48e4735ff9
* Update fast mixer statisticsGlenn Kasten2012-05-101-16/+114
| | | | | | | | | | | | | | | Compute statistics on fast mixer elapsed time and CPU load per cycle using a simple moving average rather than by fixed blocks. This has a couple advantages: - remove burstiness of CPU usage due to former floating-point calculations in fast mixer - gives us flexibility in how to report (e.g. could report over just the last 1 second) Disadvantage is increased RAM, and since the samples are not updated atomically, it is possible to have an error in the statistics. This should not be much of an issue due to the relatively large number of samples. Also add CPU raw ns and adjusted MHz statistics. Change-Id: Iaa2cd13f18250c3162aff40409b3694b769d9505
* Fix race condition for non-started fast tracksGlenn Kasten2012-04-301-11/+76
| | | | | | | | | | | | | | | | | | | | | This required re-implementing how fast tracks are considered active. Now, they use the same logic as normal tracks, except underrun is ignored. Other changes: - add framesReady() to AudioBufferProvider interface - rebased - add track underrun counter state to fast mixer dump state - move dumpsys header to Track::appendDumpHeader() so it closer to where tracks are dumped - display track state in dumpsys as a character code - measure and display warmup time and cycles in dumpsys - copy in the presentation complete code - add ExtendedAudioBufferProvider for framesReady() which returns size_t - simplify underrun tracking - deferred reset track after stop() - add comments Change-Id: I7db8821bc565230ec76da1f9380fe3fb09735e5b
* FastMixer updateGlenn Kasten2012-04-201-3/+25
| | | | | | | | | | Updates: - Add support for mono fast tracks - Add support for optional sample rate conversion on fast tracks - Log sample rate and frame count - Enable statistics Change-Id: Ife014edf4f452da361f3eaaae19209ef6ff6958b
* Fix multichannel downmix pause bug on video playerJean-Michel Trivi2012-04-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | Pausing a video player will cause the track audio mixer to be disabled, which causes the downmixer to be deleted. When reenabled, the track channel mask hasn't changed but the downmixer is there anymore. Fixed by: - instanciating a downmixer when the AudioMixer track gets initialized (in getTrackName(), now taking a channel mask as input), and deleted when in deleteTrackName(). - when the channel changes on a track, check whether it needs a downmixer or not. Preparing a track for downmix automatically removes the old downmixer if there was one. Also: initialize the track downmixerBufferProvider field when AudioMixer is instanciated, so we can safely call delete on it in AudioMixer's destructor, in case deleteTrackName() wasn't called before the mixer was destroyed. Change-Id: I589b0781cda5b3c82f85b561c52b08546cac21f8
* Fast mixerGlenn Kasten2012-04-181-0/+454
Change-Id: I61552f83507e08e4c706076b9fb15362869e6265