| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: I7b1cc71057b2bd4f771e7bcf508a8c3abd6017ce
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Contains the necessary changes to make frameworks/av build and work
on a 64-bit machine.
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
|
|\ \
| |/
| |
| |
| |
| |
| | |
resampling in fast tracks"
* commit '5a458ede3b7d303723fde4b856532bdc3b94971b':
AudioFlinger: Remove code for supporting resampling in fast tracks
|
| |
| |
| |
| |
| |
| | |
This isn't used at the moment.
Change-Id: I4e0fb2af5f7d959dbafd5ddb7defa1c6b8e8636a
|
| |
| |
| |
| | |
Change-Id: I57e44b4c36b99f7149542bbcf9645521c6152dfa
|
| |
| |
| |
| | |
Change-Id: Ie87607aa514976947540a77775e6425c4e56e7d9
|
|\ \
| |/
| |
| |
| |
| |
| | |
fast tracks
* commit '97992cc71fd0bbd4aa22e5195ee7e5cde09ac254':
FastMixer computes presentation timestamps for fast tracks
|
| |
| |
| |
| |
| |
| | |
and forwards them to each track's ExtendedAudioBufferProvider::onTimestamp().
Change-Id: I06fb9586bb7e20d5c0289abdc8cac6cd3fd2f6e8
|
|/
|
|
| |
Change-Id: I58b33fefdd8bf703647414157a99a3223be3531c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Direct and tunnel output threads can support various HAL stream formats,
included encoded. But currently there are stereo 16-bit PCM assumptions
in several places for mixer and duplicating output threads:
- mMixBuffer and mixBuffer()
- AudioMixer including resampler
- FastMixer's mixBuffer
- effects
- NBAIO_Format
- anywhere FCC_2 is used
- possibly other places
Until those assumptions are removed, this CL enforces stereo 16-bit
PCM in mixer and duplicating threads at the place where the HAL format
is read. It was already being checked in checkForNewParameters_l(),
but not in readOutputParameters().
Change-Id: Ibe344cc922743da234299097aa1bb1f54795cc9b
|
|
|
|
|
| |
Bug: 9798886
Change-Id: I9321e3f369f1ed9429ae222e3926ebdeb012b8b0
|
|
|
|
|
| |
Bug: 8834855
Change-Id: I4cd842cdfb09d2aaaaab9df9ac3bec6179709bd3
|
|
|
|
| |
Change-Id: Ia28720a7d0fad8cf110c2448b967d5648d42e017
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a regression introduced recently, that increased timing jitter
during the startup of the FastMixer and AudioTrack callback threads.
The regression was to make requestPriority() asynchronous as a way to
avoid an apparent priority inversion in system_server. This means that
the target thread could run briefly with the initial priority, before
the new priority takes effect.
This change removes the startup jitter for FastMixer, by making the
requestPriority() synchronous again for that case. It doesn't matter
that this restores the priority inversion involving normal mixer thread,
because it happens during startup of both threads.
The change also removes the startup jitter for the AudioTrack callback
thread, by having the target thread check whether the requestPriority()
has completed yet. If not, the target thread blocks with a timeout
until the priority boost finishes.
Finally, we now log an error message if the expected priority boost
doesn't happen.
Bug: 8698989
Change-Id: Id590e9a274b70ec1ba85b44a585ee37a22e41cbc
|
|
|
|
|
|
|
|
|
|
| |
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
|