| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update getOutputForAttr() prototype and group all logic
dealing with audio attributes to stream type conversion in
audio policy manager.
getOutputForAttr():
- specifies the audio session (for future use)
- returns a status code
- receives either stream type (for legacy) or audio attributes
- returns an updated streamtype
Remove logic dealing with legacy stream types to attributes conversion
from AudioTrack.
Use correct type for audio sessions in other APIs (startOutput() ...).
releaseOutput() specifies the audio session (for future use).
Bug: 18067208.
Change-Id: I1bfbe9626c04c7955d77f8a70aecfad2cb204817
|
|
|
|
|
|
|
|
|
|
| |
getTimestamp for offloaded tracks now returns WOULD_BLOCK for
situations where the timestamp is unavailable due to the
previous track still flushing or the timestamp is stale.
It is fixed for normal playback conditions.
Bug: 14659809
Bug: 17428188
Change-Id: Ic9ec07ccabc604236979769db5c4ea2dec252660
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace epoch concept by observing and accumulating server delta
positions. The advantage of using server deltas instead of absolute
values is that they (1) are not sensitive to 32-bit wraparound,
(2) are not sensitive to server behavior for stop(), and
(3) prepare for future 64-bit client positions without requiring 64-bit
positions on server.
Add comments to AudioTrack::getTimestamp() and friends
that the timestamp output parameter is undefined on error.
Don't allow getTimestamp to return a negative frame position after stop().
Accumulate the client released frames, which may be useful for a future API.
Bug: 11815245
Change-Id: I652940fa2db2f34a78c012a3ead0d9204fa29c6e
|
|
|
|
| |
Change-Id: Iae4995c98e64add1ab9e6c8ae6501515032755f5
|
|
|
|
|
|
|
|
|
| |
Add support for compressed audio playback by use
of an AudioTrack attached to a direct output thread.
Bug: 9428304.
Change-Id: I4a61be9cf0e31003ca85935d6e0ee38ca8192e03
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store audio attributes in AudioTrack class.
When an AudioTrack is "set" with non null audio
attributes, derive a stream type that reflects
the attributes.
When an AudioTrack is "set" without attributes,
and only has a stream type, derive default
audio attributes.
Change-Id: I322b91fa9a7e193118960c5e78cdddd85d66f9ad
|
|
|
|
|
|
|
| |
As much as possible, the checks for specific formats are done on server
side. The only exception is 8-bit, which needs a client side workaround.
Change-Id: I52fe086c039460c8dac009de03b67eb54c56a836
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Id6b1aa17558eb73e17f22b8eab6cd02e00a96dff
|
|/
|
|
| |
Change-Id: I5776313b9b49072cd666d28880f0d07cc73f827b
|
|
|
|
|
|
|
|
| |
AUDIO_INTERLEAVE_*
AUDIO_STREAM_MIN
AUDIO_SESSION_ALLOCATE
Change-Id: I31dd6f327204685e50716079ce21c4ba206dff11
|
|
|
|
|
|
|
| |
It was only used for one log.
A better solution will be a per-track unique ID.
Change-Id: Ia440e02ae4a5a4019a9a2d08970e1ee93ac4c3a3
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Bug 7531968
Change-Id: I6d0e79fa8cab5b6eb36bcc34977f4cf0d7eec8ea
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An offload output can be re-used between two audio tracks having
the same configuration. A timestamp query for a paused track
while the other is running would return an incorrect time.
To fix this, cache the playback position on a pause() and return
this time when requested until the track is resumed.
Bug: 12826612.
Change-Id: I324112ea9827e52fff53ef44cd8513c8d85a0bc4
|
| |
| |
| |
| |
| |
| | |
It's size_t consistently
Change-Id: I29638ef59ac773218025f2403a3508a307b487e0
|
|/
|
|
|
|
| |
It's uint32_t consistently
Change-Id: If8298c7e9aeea2b951fe47b675adbdf48d104846
|
|
|
|
|
|
| |
so they can be properly freed.
Change-Id: I6f389035bc29e74e7c367c1c6d0252b180f666b3
|
|
|
|
| |
Change-Id: I0fa61025c979709ad7d655bc717df5f194b6089e
|
|
|
|
|
|
|
|
|
|
| |
AudioRecord::openRecord_l() code was refactored earlier to
remove the redundant parameters:
> Change-Id: I124dce344b1d11c2dd66ca5e2c9aec0c52c230e2
This changelist refactors AudioTrack similarly.
Change-Id: Iefd2bd662870ea81d04eff7b7c26f9c8b0dadd26
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AudioRecord input handle code was refactored earlier
to fix a potential handle leak, and to simplify the code:
> Change-Id: I124dce344b1d11c2dd66ca5e2c9aec0c52c230e2
This changelist refactors AudioTrack similarly,
and adds further cleanup of both AudioTrack and AudioRecord.
We attempt to implement the rules for referencing counting I/O handles,
but there is still the possibility of a handle leak if the client process
dies after allocating the handle reference but before releasing it.
That issue is being tracked separately.
Details:
- AudioSystem::getOutput() is now called within createTrack_l
- restoreTrack_l was missing offload info
now it has the info available,
but is not yet being called for offloaded tracks
- AudioTrack::getOutput() is now const
- Remove getOutput_l()
Change-Id: I44a0a623d24fc5847bcac0939c276400568adbca
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I515970aa0660418d5d1640fb1bf477e112c89bdd
|
|\ \
| |/
| |
| | |
earlier"
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will allow removal of most of the parameter list to createTrack_l.
Also check for valid stream type at client so we can log a better error
message.
Change-Id: Ia7176896d47fbb49106119fca26d9de8e7efe859
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: I00a1025e2891a1c96218b3c2187eaddda6614ebc
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
and remove unnecessary initialization of mFrameCount in set().
Change-Id: I9effeb0a6dd035ca02fe77f6992c55d9515b4df6
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also fix a couple of places where we were using AUDIO_SESSION_OUTPUT_MIX,
which happens to also be equal to 0, but has a different meaning.
Change-Id: I90e39be3b89f5021a96d9e3b8d10929013ca977f
|
| | |
| | |
| | |
| | | |
Change-Id: Id45ba544cc84133ed5e578fb4fd8a11b62211dc1
|
| |/
|/|
| |
| | |
Change-Id: I7c01b9d2e109acf8c393d2c3b7b1985f6647d96c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Guarantee to return a non-zero frameCount for return status NO_ERROR;
Return the correct specific status_t if any of the AudioSystem APIs fail,
instead of the generic NO_INIT.
API change: getMinFramCount no longer defaults to zero on error, so
callers _must_ check the return status. This change makes
getMinFrameCount more like other APIs. All known callers were reviewed,
and they do check the return status.
Change-Id: I4a8342a75ee89a068c23c84b8380ed9d1b968507
|
|/
|
|
| |
Change-Id: Ia99e23a0b46db3f3e6aa46f9018e63c14f4af369
|
|
|
|
|
|
|
|
| |
AudioPlayer must read the sampling rate from offloaded audio sinks
whenever a new time position is computed as the decoder can update
the sampling rate on the fly.
Change-Id: I997e5248cfd4017aeceb4e11689324ded2a5bc88
|
|
|
|
|
|
|
| |
Set a work source for the playback wakelock, so that playback is
counted against the requesting app instead of the media server.
Change-Id: I7329f88a288a95a582a78005a1c3d16a5a611e31
|
|\
| |
| |
| |
| |
| |
| | |
followed by start" into klp-dev
* commit 'b2059ff384eee8ffb70a7ec8fc5570405201c734':
Fix race condition in AudioTrack::pause followed by start
|
| |
| |
| |
| |
| | |
Bug: 11148722
Change-Id: Iec88f00c8510363d4418e4b8d5b34feb06ecf04d
|
|\ \
| |/
| |
| |
| |
| |
| | |
destruction" into klp-dev
* commit 'f2c643c89e405b57c7ce42067b876fb80031e5fa':
Fix slow AudioTrack and AudioRecord destruction
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were two causes for the slowness:
When thread was paused, it used nanosleep and sleep. These usually
run to completion (except for POSIX signal, which we avoid because it
is low-level). Instead, replace the nanosleep and sleep by condition
timed wait, as that can be made to return early by a condition signal.
Another advantage of condition timed wait is that a condition wait was
already being used at top of thread loop, so it is a simpler change.
The AudioRecord destructor was missing a proxy interrupt that was correct
in AudioTrack. This proxy interrupt is needed in case another thread
is blocked in proxy obtainBuffer.
Does not address the 1 second polling for NS_WHENEVER.
Bug: 10822765
Change-Id: Id665994551e87e4d7da9c7b015f424fd7a0b5560
|
|\ \
| |/
| |
| |
| | |
* commit 'f94b2946a511c5cbb6b9001449ca8278cb332bda':
Add IAudioTrack::getTimestamp()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
with dummy implementation in AudioFlinger::TrackHandle, and
implement AudioTrack::getTimestamp() using IAudioTrack.
Also document invariant that mAudioTrack and control block are always
non-0 after successful initialization.
Change-Id: I9861d1454cff7decf795d5d5898ac7999a9f3b7e
|
|\ \
| |/
| |
| |
| |
| |
| | |
timestamps" into klp-dev
* commit '73e4f3d44f7022b03943ae34f08363e049e4b46f':
New AudioTrack C++ API for audio timestamps
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This new API is intended to replace latency(), especially for A/V sync.
The application will receive periodic timestamp notifications. The period
is unspecified, but will likely be more frequent after a pause or stop,
set position, underrun, display on/off change, route change, or when audio
framework notices drift. It will be up to the higher level application
(e.g. Stagefright) to reconstruct a clock that updates more frequently.
The current latency() method doesn't indicate when latency changes
due to screen on/off state, route changes, etc.
Includes squahsed change-Id: I2082f8752040be0c234b1a6f1be2e269abf2ce7c
Dummy implementation of AudioTrack:getTimestamp()
Rename AudioTrack::Timestamp to AudioTimestamp.
Renaming and pulling up to a higher level allows more modules to use it.
Change-Id: Ibf7f6a207c3f8d8697f25ede2cd5200697fadb86
(cherry picked from commit dd69eb893867634fd169c03204a6ad7c74b351e7)
|
| |
| |
| |
| | |
Change-Id: Id3ccc183a03421330d0498faaa62a45915cdc3d6
|
|/
|
|
| |
Change-Id: I56f82904cb3855bad6f33ad1ff4ddf66a61c5720
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
There was some obsolete and incomplete text left over
after the new control block code was submitted.
This cleans up all those comments to be accurate again.
Change-Id: Ic52f5869cb723cde25d709514d6deea6aa6f20aa
|
|\ \ |
|