| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend pause/resume support to direct output threads
(was only for offload threads).
If the HAL implements pause/resume, track pause/resume is forwarded to
the HAL.
Pause, flush, resume sequence is respected by executing the HAL
calls in the playback thread (same as offload).
Make sure the track flags on client side are consistent with the
flags on server side.
Bug: 17883772.
Change-Id: I89b360d69818f7a9204bd36e3ec63a79e106ecf1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for custom mixes in AudioPolicyManager.
Two methods are added to register or unregister a list of custom mixes
with their attributes and format.
getOutputForAttr() and getInputForAttr() first look for a match in
registered mixes before defaulting to normal output/input selection
Remote submix device connection disconnection now takes address into
account to identify the correspnoding custom mix.
Bug: 16009464.
Change-Id: I3f1c2a485a0fb71b1f984ed0adc9b68aa971e408
|
|
|
|
|
|
|
|
| |
If track is restored when it set its volume to a non-unity value (such as mute),
the volume was forced to unity again. Now, the previous volume is restored.
Bug: 18570664
Change-Id: I79f34c6c7d6f535baba813fd3b8ba8e55cac8ad7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added AudioRecord constructor with audio attributes.
Replaced AudioPolicymanager::getInput() by getInputForAttr().
No new functionality for now.
Also:
- Fixed warnings in AudioPolicyManager
- Allocate audio session ID before calling getOutputForAttr() in
AudioTrack.
Bug: 16006090.
Change-Id: I15df21e4411db688e3096dd801cf579d76d81711
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/|
| | |
lmp-mr1-dev
|
| |
| |
| |
| |
| | |
Bug: 18217633
Change-Id: Ica77acf0a32832d9b04eb657ef2f4f5329f8fbda
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Added new routing strategies and stream type for internal use
by audio policy manager and audio flinger:
- One for accessibility to allow different routing than media
- One for re-routing (remote submix) in preparation of dynamic
policies
- Added stream type for "internal" audio flinger tracks used
for audio patches and duplication.
Bug: 18067208.
Change-Id: I88f884b552e51e4a49c29125e5a1204cf58ff434
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow A2DP sink selection even if A2DP is suspended.
It is not because use of A2DP is temporarily disabled by SCO
selection that the policy rule routing a given use case
to A2DP should be altered. The source will be routed to A2DP
but it will remain silent until suspend condition is cleared
which is the purpose of suspend mode.
Also make sure that accessibility prompts are audible while in call
by forcing stream type to STREAM_VOICE_CALL.
Fix inconsistent logic between AudioTrack::setStreamTypeFromAttributes()
and AudioPolicyManager::getStrategyForAttr()
Bug: 18095151.
Change-Id: I1c75dd8288ed3dd494eb942060eac9c9660dca50
|
|
|
|
|
|
|
|
| |
It is safer to query the output sampling rate once the output
have been acquired by calling getOutputForAttr().
Bug: 16009464.
Change-Id: Ib561facd19fba5359a6b837d75f1a1cd2dc51b29
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Fix race condition in handling of binder death notifications.
AudioSystem has a mixture of APIs for both ordinary app clients,
and the AudioFlinger and AudioPolicy services within mediaserver.
Due to this mix of uses, it is possible for there to be "surprising"
sequences of calls on the call stack.
Previously, we used a single mutex for all global variables, but
this caused a deadlock. To avoid the deadlock, we unlocked the mutex
during the critical sequence of calls. But this was a a
crucial place where it should have stayed locked;
see Change-Id I315c1c5066f62b05e1c13b04fae1272b5fbce977
Now we use separate mutexes for the AudioFlinger, AudioPolicy, and audio port
related global variables. This allows us to correctly hold each mutex
throughout the atomic region, even when AudioFlinger calls AudioPolicy
via AudioSystem, or vice-versa.
2. AudioSystem::clearAudioConfigCache now clears the IAudioFlinger reference.
3. Make AudioSystem::get_audio_policy_service more like get_audio_flinger.
Bug: 18242291
Change-Id: I9761443d8337df5bf66d4ca2316a9fd0bd11be94
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Convert attributes usage "assistance accessibility" to
a stream type guarantying that the prompt is audible
and not muted by policy manager.
Bug: 17994328.
Change-Id: I89f53f2ce84b499b859336c0a1a3a0332ee670f5
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for routing audio stream to the speaker when audio
attributes carry the FLAG_BEACON value:
- associate streams with FLAG_BEACON to the up-to-now unused
STREAM_TTS ("Transmitted Through Speaker").
The remapping happens in AudioTrack.
- AudioPolicyManager: define new strategy for handling the Beacon
behavior, that only goes to speaker. Define new volume curves
for STREAM_TTS that are not silence only for the speaker device
category. Keep ref count of other streams and never play Beacon
streams when anything else is playing: either don't start playback
if something else is playing, or unmute STREAM_TTS when it's
allowed to play and mute when it's done.
- Take into account muting latency when starting an output.
Bug 15415971
Change-Id: I26539c7ec1a486accd85bbeb1623e9c7d3a1192f
|
|
|
|
|
|
|
|
|
|
|
| |
mReleased represents the number of frames written to the
track, but was cleared on start() causing a mismatch if the
client wrote to the track before starting. Moved the clearing
to entering the STATE_STOPPED or STATE_FLUSHED state.
Bug: 18017947
Bug: 18022276
Change-Id: I3788c98c4c3c4d9cc004378432797b3f3138e22e
|
|
|
|
|
|
|
|
|
|
|
| |
In case of error during createTrack_l(), there is a possibility
that a newly created AudioTrackThread is resumed by requestExit()
just after entering the Thread class _threadLoop() but before
entering the class threadLoop(). In this case, processAudioBuffer()
is executed once with mCblk == 0 and we assert.
Bug: 17894033.
Change-Id: I93d0d0d4dbf14bcb88dad23e6ad49d2ecd47badd
|
|
|
|
|
|
|
|
|
| |
Make sure that accessibility prompts are heard when
a ringtone is active by forcing stream type
to AUDIO_STREAM_RING when phone state is AUDIO_MODE_RINGTONE.
Bug: 17558149.
Change-Id: Ia3bead8052fca5cbf282c267f7b9b06014fef628
|
|
|
|
|
| |
Bug: 17576481
Change-Id: I07d99e7c42b7d4f0994b5a6d9c9fe8eb29fbbe40
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Also improve robustness to choice of sampling rate or buffer size
such that increasing either by 10x does not cause overflow.
Bug: 12979141
Bug: 15933066
Change-Id: If7989bd745d1bee3bdf811b8b7c978543ccafb65
|
|
|
|
| |
Change-Id: Iae4995c98e64add1ab9e6c8ae6501515032755f5
|
|
|
|
| |
Change-Id: I600f062fa7148c01851023c1240c39939e648002
|
|
|
|
|
|
|
|
|
| |
Add support for compressed audio playback by use
of an AudioTrack attached to a direct output thread.
Bug: 9428304.
Change-Id: I4a61be9cf0e31003ca85935d6e0ee38ca8192e03
|
|
|
|
|
|
|
|
|
|
| |
In AudioPolicyManager, support querying an output
or playback strategy for audio attributes,
instead of a stream type,
In AudioTrack creation, use the output returned
for the track's attributes.
Change-Id: I0fef05845ba676404775e2e338c10e6a96237268
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
The audio stream type is not used in the getSampleRate() and
getFrameCount() methods.
Change-Id: I3d065ae272bd039204cd323cdab9b60460034f2d
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
After releasing a reference to a shared memory interface,
IPCThreadState::self()->flushCommands() must be called to ensure
that the corresponding reference is also cleared immediately in the
remote process. Otherwise the binder implementaiton will not
push the clear systematically causing the memory region not to be freed.
See issues 10711502 and 2801375.
Bug: 14057166.
Change-Id: If55f36f00d452d6cf00cf83bd2fba1c8f3abcb57
|
|\ |
|
| |
| |
| |
| |
| | |
Change-Id: Ia658ab4b6320d19fdb50f123c930918724ff0ef3
Signed-off-by: Andy Hung <hunga@google.com>
|
|/
|
|
|
|
|
|
|
|
| |
This will allow (eventually) a greater dynamic range for gains.
However there are still a few remaining places in effects and mixer
that will also need to be changed in order to get the full benefit.
Also fixes a minor bug: was not checking for NaN in AudioTrack C++.
Change-Id: I63bce9e82e0a61546d8ff475fb94bcb700d99c96
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AUDIO_FORMAT_PCM_8_BIT format was being converted to
AUDIO_FORMAT_PCM_16_BIT on client side even for direct tracks.
That conversion was incorrect; it should only be done for mixed tracks.
Also remove checks for specific PCM formats in the generic part of
server side of createTrack. Those format checks should only be done by
the thread. This will allow direct tracks for PCM 8-bit, PCM 24-bit, etc.
Change-Id: If5b9fd79f8642ed93e2aeabcaf4809b2ed798978
|
|
|
|
| |
Change-Id: I6609fa75c9a57fc4ca3887d626a2f4fb8b6593a1
|
|
|
|
| |
Change-Id: Id6b1aa17558eb73e17f22b8eab6cd02e00a96dff
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
AUDIO_INTERLEAVE_*
AUDIO_STREAM_MIN
AUDIO_SESSION_ALLOCATE
Change-Id: I31dd6f327204685e50716079ce21c4ba206dff11
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: Ie7346e93436ddc215cad7d16be555dcb6c277d54
|
|/
|
|
| |
Change-Id: I0878d11451c7bbbf96b59f5fe0cd97ba1f033aa9
|
|
|
|
|
|
|
| |
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
|
| |
| |
| |
| |
| |
| |
| | |
isOffloaded() tries to lock mLock again. We should be calling isOffloaded_l()
b/13394633
Change-Id: I155be6fee937f894d8e6c974e593223ab6014ade
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: 10994052
Change-Id: Ib2e38e7a600bcffef8cbc68c1722e40fbbc7ea67
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ |
|