| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Abbreviation framesReady to fRdy for new systrace.
Put inline const on one line.
Use local copy of mState in state.
Improve logging.
Line length 100.
Change-Id: I8201c3ce0e53fd464fd33d02544e52c342d40b68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove almost all of the specific logs, but leave the media.log
logging infrastructure in place for the next time we need it.
Re-apply a few good changes that were reverted earlier:
- check logf format vs. argument list compatibility
- distinguish potentially modified and actually modified tracks in FastMixer
- fix benign bug where sq->end() was called more than once
- fix a build warning
Bug: 6490974
Change-Id: I02d3e83646c738acaebb415bd0d6b548638b4ef5
|
|
|
|
|
|
| |
This reverts commit 32584a7d672864b20ab8b83a3cb23c1858e908b7
Change-Id: I9dc680578b955b1af462eeb7a49d61a0d45eb81b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.
Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.
Details:
- include caller pid or client pid where appropriate
- increase log buffer size
- log mFastIndex when AudioMixer sees an invalid bufferProvider.
- log both potentially modified and actually modified tracks in FastMixer.
- fix benign bug where sq->end() was called more than once.
- log StateQueue push() call and return.
- increase StateQueue size from 4 to 8 entries
- log mixer->enable(), bufferProvider, and currentTrackMask
- log buffer provider addresses
- increase fast mixer log buffer again
- check logf format vs. argument list compatibility
- add logging to AudioMixer
- add checking of magic field in AudioMixer to detect overwrites
- add bool AudioMixer::enabled()
- increase log buffer sizes yet again
- enable assertion checking without ALOGV
- improve a few log messages
- check for corruption in more places
- log in all the process hooks
- add new mixer APIs so we can check for corruption of mixer state
- fix a build warning
Bug: 6490974
Change-Id: Ib0c4a73dcf606ef9bd898313b3b40ef61ab42f51
|
|
|
|
|
|
| |
This reverts commit 639482c24c911b125398b31883ba6d55faebe28b
Change-Id: I11f2829072ab11e18b0663024f27bf31192f1d39
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.
Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.
Details:
- include caller pid or client pid where appropriate
- increase log buffer size
- log mFastIndex when AudioMixer sees an invalid bufferProvider.
- log both potentially modified and actually modified tracks in FastMixer.
- fix benign bug where sq->end() was called more than once.
- log StateQueue push() call and return.
- increase StateQueue size from 4 to 8 entries
- log mixer->enable(), bufferProvider, and currentTrackMask
- log buffer provider addresses
- increase fast mixer log buffer again
- check logf format vs. argument list compatibility
- add logging to AudioMixer
- add checking of magic field in AudioMixer to detect overwrites
- add bool AudioMixer::enabled()
Bug: 6490974
Change-Id: I1f3f18aa62d9fbd35bc32285b669f5ba40efe28e
|
|
|
|
|
|
| |
This reverts commit 0ddd56316262ac74a95e9edb595697c163136d6d
Change-Id: I180a928af6f5a38d15a5efe44cd1fe927b5d961c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.
Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.
Details:
- include caller pid or client pid where appropriate
- increase log buffer size
- log mFastIndex when AudioMixer sees an invalid bufferProvider.
- log both potentially modified and actually modified tracks in FastMixer.
- fix benign bug where sq->end() was called more than once.
- log StateQueue push() call and return.
Bug: 6490974
Change-Id: Iee7c8f40e20b6000cd8286c0ec6a14fff4a37af1
|
|
|
|
|
|
| |
This reverts commit 3051df27261e9952c0e642dec548515250e85f6a
Change-Id: I8bf5c3e91b65bd20de26f480c367c2854b62373c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.
Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.
Details:
- include caller pid or client pid where appropriate
- increase log buffer size
Bug: 6490974
Change-Id: I4c030f171343fe4b483eae0ddea4427118d8d4b1
|
|
|
|
| |
Change-Id: Ia0f8204334f6b233f644d897762a18c95d936b4b
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ic4895ed5682bad10b03e97d8015e642ee1696533
|
| |
| |
| |
| |
| |
| |
| |
| | |
With ANDROID_SMP set, tracing functionality is completely inline, and
without the performance hits of external library calls, tracing does
not need to be conditionally compiled.
Change-Id: I4b29a9a52c403f0d2ea137c5b7bc05a518a7ca4b
|
| |
| |
| |
| |
| |
| |
| | |
Tracing functions are meant to be dynamically controlled via sysprops.
Conditional compilation removes this functionality.
Change-Id: I26bc473d104d0b3c50a228dddfda3fa2428d157a
|
|/
|
|
|
|
|
|
|
|
| |
ATRACE_BEGIN and ATRACE_END have replaced the static
Tracer::traceBegin and Tracer::traceEnd functions, so
use them instead.
Fixes compilation errors when tracing is enabled.
Change-Id: I4d1147d2f76afcdf113e9986f0544cb848802b15
|
|
|
|
|
| |
Bug: 7100774
Change-Id: I15a84a19bb6d6ef1d9dac4beaa03587638196404
|
|
|
|
|
|
|
|
| |
The audio downmixer effect might need the audio session Id, pass it
from the track creation in AudioFlinger to the downmix effect
creation in AudioMixer.
Change-Id: I5e29540542ae89cf4a0cdb537b3e67f04442a20a
|
|
|
|
| |
Change-Id: I31c964caeb8b5d9ae0a426224f030cdcb01114a0
|
|
|
|
|
|
|
|
|
|
| |
The new overrun correction is: if the previous write() cycle time is <
50% of expected, then sleep enough extra to make the total cycle time =
95% of expected. This should help compensate for HAL implementations
that have uneven cycle times due to sample rate conversion.
Bug: 6881638
Change-Id: I5ab58afdfceee7ac523177f021fbf62d743d571a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(cherry picked from commit e20ac92c564a2f4e8123885807abdf0a78de0dd7)
> AudioFlinger: fix timed audio
>
> Addresses Bug 6900517.
>
> Finish up support for timed audio in the new FastMixer world. Pay special
> attention to remaining lock-less and voluntary yield free on the FastMixer
> thread. This fixes audio playback for Q on JB.
>
> Change-Id: Iaf815e58a1b1d0a0190051794bec8dc5c9231785
> Signed-off-by: John Grossman <johngro@google.com>
Change-Id: I9bd687acc345a05867af48e71116690fdb0ce1b5
Signed-off-by: John Grossman <johngro@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, warmup was considered done as soon as any write() took
more than 0.5 nominal cycle time. In practice, this was always the
first write() that turned on power to the output path, and it didn't
accurately account for filling the full kernel buffer queue, or for
buffering in the HAL sample rate conversion.
Now warmup is considered done when a write() _after_ the first write
takes more than 0.5 nominal cycle time.
This will throttle the initial pull rate after coming out of standby.
When combined with another change to throttle the pull rate for
devices with HAL sample rate conversion, it may help reduce some of the
notification glitches. The only downside is that it will increase the
warmup time a bit.
Bug: 6508317, 6650846, 6607056
Change-Id: I39f324c5195578170a55308e9601d3a1b41db3e0
|
|
|
|
|
|
|
| |
Force a sleep if audio HAL write() returns too quickly.
Bug: 6661275
Change-Id: Ie810f5a087b89fb24dab229a0e500af1dee53571
|
|
|
|
|
|
|
|
|
|
| |
Certain CPUs with dynamic cluster swapping and hotplug
don't report CPU frequency accurately. The file descriptors
used to read the frequency become stale and report bogus data.
So make this feature a build time option for debugging only.
This will also improve performance of the fast mixer loop.
Change-Id: I602f81ec3281a37992769208be08084ed1469e8c
|
|
|
|
|
|
|
|
|
| |
Don't include in FastMixer if it's not present.
This removes confusing clutter especially for devices
with a separate deep buffer output thread, or for the
duplicating thread and A2DP output thread.
Change-Id: I84933f5555593256f11ba0895ec915c09cf16963
|
|
|
|
|
|
|
|
|
|
| |
Do not force sleep when an overrun occurs. This was for non
blocking audio HAL and is unused.
Keep statistics on overruns.
Bug 6605215.
Change-Id: I295455d4562201aa3814c88bdd6e52c9226712af
|
|
|
|
|
| |
Bug: 6591648
Change-Id: I696f51c682e7233ba690d97da26012084989b412
|
|
|
|
|
| |
Bug: 6592923
Change-Id: I980c6fc69d78c569147ea44ce33a7f8a41739c91
|
|
|
|
| |
Change-Id: I6b2f97881c39998a2fae9ab79d669af6c0a37e94
|
|
|
|
|
|
|
|
|
|
| |
Trace fast track buffer fill status for underruns etc.
Move the definition of macro to Android.mk.
No overhead if disabled.
Change-Id: If0e83e21b61b059ca38f543f8a6ffb58e08c79ee
|
|
|
|
|
|
|
|
| |
One device reports zero CPU kHz occasionally, so skip those values.
Preserve accuracy of the low-order 4 bits of the the CPU frequency.
Change-Id: I7d934f697412277462464fca82d112d0306a214e
|
|
|
|
|
|
|
| |
Maintain more accurate accounting of type of underrun.
Automatically remove track from active list after a series of "empty" underruns.
Change-Id: If042bf80e1790dcaaf195c99dc9c0ed9b55382c1
|
|
|
|
|
|
| |
Was losing the upper half of the bounds, and MHz was off.
Change-Id: I61c98027b35ce7c3578ea6f3acf05aa5c48a5831
|
|
|
|
|
|
| |
Disabled by default; uncomment ATRACE_TAG to enable
Change-Id: I99af894022a859ee5644bd853cfd8a48e4735ff9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
Change-Id: I61552f83507e08e4c706076b9fb15362869e6265
|