| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On invalidating an offload track, the IAudioTrack instance is
destroyed and the offload output is released. If it so happens
that APM::getOutputForAttr for the new IAudioTrack is called before
OffloadThread::prepareTracks_l checks and removes an invalid track,
the same output can get reused.
The side effect of this is data present in HAL and below from before the
invalidate will be rendered before data from the new seek position
is rendered. This is unexpected.
To fix this, set hint to issue flush when an offload track is invalidated.
Bug: 28566885
CRs-Fixed: 1002438
Change-Id: Ib6c38a3abb600598b87591bac90d03b7150d5216
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
6.0' as a single patch.
Signed-off-by: jinamdar <jaydeep.inamdar@dts.com>
(cherry picked from commit d3668da66643d4cc39058fb65c8db0742748f70f)
Conflicts:
services/audioflinger/AudioFlinger.cpp
services/audioflinger/Threads.cpp
Change-Id: I67e3ba100ff40058919ba827b806aea7bdbaf4bb
|
|
|
|
|
|
|
|
|
| |
Legacy ALSA really hates floating point, and it's breaking
mic input when doing things like audio recording.
Use the old conversion routine for legacy ALSA.
Change-Id: I616f4cd42fa0e4d7595dd61ed2d36c4fa7052c53
|
|
|
|
|
|
| |
allow effects in case outout is direct pcm
Change-Id: I2ad7eacf11642a4ca9f892b61124293d0dc503a9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- audio policy:
Force device change to ensure new audio patch creation
upon first track activity on a given output.
Fix function device_distinguishes_on_address() which could mistake
some output device with remote submix input device.
- audio flinger:
Reduce number of binder calls upon new client registration by only
sending ioConfigChanged() callbacks to newly registered client.
Fix first patch after output thread creation not triggering an
ioConfigChanged() callback.
-audio system:
Force client registration upon routing callback installation to force
new ioConfigChanged() callback from audio flinger.
Bug: 22381136.
Change-Id: Ieb0d9f92f563a40552eb31bc0499c8ac65f78ce4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce the number of audio port, audio patch and
IO config changed binder calls from mediaserver to
client processes:
- Do not call IO config changed callback if selected
device is the same as previously selected one on a given
audio flinger playback or capture thread.
- Do not call the audio port or audo patch list update
callback on a client if this client as no listener registered.
Bug: 22045560.
Change-Id: If780e105404de79b7cb5c80c27b793ceb6b1c423
|
|
|
|
|
| |
Bug: 21858740
Change-Id: I8f291b64c1033867bb57ffceaa3b7d94aa998715
|
|
|
|
|
|
|
|
|
| |
For direct threads, when recycling a stream, perform a flush so
that the frame position is reset.
Bug: 21145353
Change-Id: I08611cd64bb249a9659c44f9e4c47e7455f4838f
Signed-off-by: Phil Burk <philburk@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This helps prevent underruns with NuPlayer and other applications
which set up buffers that are close to minimum size or use deep
buffers, and rely on a double-buffering sleep strategy to fill.
Enabled by default. Disabled by setting af.thread.throttle 0
Bug: 19062223
Bug: 21198655
Change-Id: Ia52b48e0c99588af5db53c43fede2afd775b8899
|
|
|
|
|
|
|
|
|
|
|
| |
Add suffix to clarify units for the following variables:
standbyTime -> mStandbyTimeNs
standbyDelay -> mStandbyDelayNs
activeSleepTime -> mActiveSleepTimeUs
idleSleepTime -> mIdleSleepTimeUs
sleepTime -> mSleepTimeUs
Change-Id: I7f5d602c39e0ef3f6fe9ef99eaf1b351c7bd4fc3
|
|
|
|
|
|
|
|
| |
Wait for system ready indication form AudioService before enabling
calls to scheduling service or power manager.
Bug: 11520969.
Change-Id: I221927394f4a08fd86c9d457e55dd0e07949f0cf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clear output stream pointer in duplicating thread
when the main output to which it is attached is closed.
Also do not forward master mute and volume commands to
duplicating threads as this is not applicable.
Also fix logic in AudioFlinger::primaryPlaybackThread_l()
that could accidentally return a duplicating thread.
This never happens because the primary thread is always
first in the list.
Bug: 20731946.
Change-Id: Ic8869699836920351b23d09544c50a258d3fb585
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add class AudioSystem::AudioDeviceCallback notifying
AudioSystem clients upon device selection change on a given
input or output thread.
Maintain a list of installed callback per I/O handle in AudioSystem
and call registered callbacks when an OPEN of CONFIG_CHANGED event
is received on IAudioFlingerClient::ioConfigChanged().
Add methods to AudioTrack and AudioRecord to add and remove device
change callbacks.
Add methods to AudioTrack and AudioRecord to query currently selected
device.
ioConfigChanged() events now convey the audio patch describing
the input or output thread routing.
Fix AudioRecord failure to start when invalidation is
handled by start().
Change-Id: I9e938adf025fa712337c63b1e02a8c18f2a20d39
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a Direct Track is paused and the HAL does not support
pause() and resume() then the HW never gets paused.
The app can just keep writing data, which gets played.
Bug: 18899620
Change-Id: Ice0f360956ff7ca425f6f24a0a2a8640d8b43fa8
Signed-off-by: Phil Burk <philburk@google.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clean up implementation of audio configuration cache and
callback events from AudioFlinger:
- Define class AudioIoDescriptor for audio input and output
configurations outside of AudioSystem class.
- Do not use void * but an AudioIoDescriptor as argument to
audio config callbacks from AudioFlinger.
- Remove unused configuration events.
- Move AudioSystem audio input and output cache from static singletons to
members of AudioFlingerClient subclass.
Change-Id: I67c196c32c09ce2756af0755ee1fe631040c3270
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not use setParameters() with AUDIO_PARAMETER_STREAM_ROUTING
when communicating the input or output device selected to playback or
record threads, even for HAL version less than 3.0.
Use createAudioPatch()/releaseAudioPatch() instead.
This allows to send more information on the output or input device being
selected.
Also fix a regression introduced in L where the output device selection
was not communicated to effects on record threads.
Change-Id: I4780ada53241d56694b005c992171e173c3bf8f5
|
|
|
|
| |
Change-Id: Ia388fb012a0b6d81613ef87142a97d76836338f9
|
|
|
|
| |
Change-Id: Id4bb9b973eeea16946fba3bc084c7ac270d9fa33
|
|
|
|
| |
Change-Id: I3cc3af221ad5797ff219d75227350733afa180db
|
|
|
|
| |
Change-Id: Ia3aab8590cd41e8a7cba0a7345d70d2866d92045
|
|
|
|
| |
Change-Id: I37d3c4ce22b74fe8581a886fe5a7f9fef8266dad
|
|
|
|
| |
Change-Id: I0adfcdcab7923a07a840ec0e04528cb8bfc41f10
|
|\
| |
| |
| |
| |
| |
| | |
sync output when AudioTrack underruns" into lmp-mr1-dev
* commit '69158e3e7b565a5ca131a2efaa9b76615ca80cbb':
audioflinger: pause HW A/V sync output when AudioTrack underruns
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not standby, starve or feed 0s to the audio HAL on direct
output using HW A/V sync mode.
Bug: 17883772.
Change-Id: I11e6c97ec24360d75f9b602814d40a54b60cb7a7
|
| |
| |
| |
| | |
Change-Id: I6c8fe626a3825fa9e139319656d682a57b887c97
|
|\ \
| |/
| |
| |
| |
| |
| | |
pause/resume for direct outputs" into lmp-mr1-dev
* commit '85aca658ac7d20584b0647427256df50a5f243ef':
audioflinger: implement pause/resume for direct outputs
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| |
| |
| | |
stream types
* commit '72215491c60fbcdb9a2f0be782e24e39cca249c5':
audio: new routing strategies and stream types
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
| |
Display output thread type and flags.
Also add units and use consistent spelling.
Change-Id: I19eb627f41c4887b6ad0543024a8477a99890798
|
|
|
|
|
|
|
|
|
|
| |
The per-thread timestamp latch was not synchronized with the per-track
released frames. Now the value of each track's released frames is
latched along with the timestamp.
Bug: 17531839
Bug: 17669342
Change-Id: I9d50c8c6a5de55a3f4561ac40e20d497376c1257
|
|\
| |
| |
| | |
AudioTrack::getTimestamp"" into lmp-dev
|
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 54464ba861aaafd11ee5645f5d1ecd1171c6e9fe.
Bug: 17733142.
Change-Id: I9886d40032b2f7d96bee03e600e14f78943d8052
|
|\ \
| |/
| |
| | |
into lmp-dev
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The per-thread timestamp latch was not synchronized with the per-track
released frames. Now the value of each track's released frames is
latched along with the timestamp.
Bug: 17531839
Bug: 17669342
Change-Id: I96252782911bd42a2534cc4030521b7eeb99a7b9
|
|/
|
|
|
|
|
|
| |
Track flush should be forwarded to the audio HAL when playing
on a direct output stream.
Bug: 17704953.
Change-Id: Iafc94327fe9aebf1d4eaa97b76c6767b7ac5babe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a capture thread was closed, the effects attached to this thread
were left dangling and the associated effect chain destroyed.
When their last client was disconnected, the effects were not released
properly from the effect library because the destruction process could
not be completed without the effect being attached to a thread.
A similar problem prevented a RecordTrack to be properly released if
its client was destroyed after the capture thread.
The fix consists in allowing the effect or record track to be properly
released even if its parent thread cannot be promoted.
Also save any effect chain still present on a closed capture thread
in case a new client wants to reuse the effects on the same session later.
Bug: 17110064.
Change-Id: I5cd644daa357afd1f3548f9bcb28e6152d95fdb8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for audio device connections between different audio
hw modules.
The patch is performed by creating a bridge between the playback
thread connected to the sink device and the record thread connected
to the source device using a pair of specialized PlaybackTrack and
RecordTrack.
- Added PatchTrack and PatchRecord classes.
- Added TrackBase type to indicate more clearly the track behavior.
- A TrackBase can allocate the buffer or reuse an existing one.
- Factored some code in openOutput() and openInput() for internal use
by PatchPanel.
Bug: 14815883.
Change-Id: Ib9515fcda864610458a4bc81fa8f59096ff4d7db
|
|
|
|
|
|
|
|
| |
Fixes an issue caused by extended precision and the FastMixer
when the format to the FastMixer was returned instead of the
HAL format.
Change-Id: I2be9d55d5c87d82e46b5200b07fcdd986ebde08a
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I08885cc381d03c522a23289e74f0e1ed46563863
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: Ie623edae2e795f9155f1f452fe4e6c7217a4a4c8
|
| |
| |
| |
| |
| |
| |
| | |
This avoids worry about the thread lifetime during tear-down.
Bug: 15858655
Change-Id: I896d24317bd6f53a574645cdf4cd514eaa205dd5
|
|/
|
|
|
|
|
| |
Will only configure fast capture path if the input buffer size is less than
10 ms and the input sample rate is same as the primary output sample rate.
Change-Id: I4a7cdc6069d750845412c626d27e83f72a1ab397
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a new PatchPanel subclass to AudioFlinger
to handle audio ports and audio patches configuration
and connection.
The first implementation does not add new functionnality.
AudioPolicyManager uses patch panel interface to control
device routing.
AudioFlinger:
- Added PatchPanel class. The first implementation does not
add new functionnality. PatchPanel handles routing commands
for audio HAL after 3.0 or converts to setParameters for audio
HALs before 3.0.
- Added config events to ThreadBase to control synchronized
audio patch connection.
AudioPolicyManager:
- Use PatchPanel API to control device selection isntead of setParameters.
- New base class AudioPort common to audio device descriptors
and input output stream profiles. This class is RefBase and groups
attributes common to audio ports.
- Use same device selection flow for input as for outputs:
getNewInputDevice -> getDeviceForInptusiource -> setInputDevice
Change-Id: Idaa5a883b19a45816651c58cac697640dc717cd9
|
|\ |
|
| |
| |
| |
| |
| | |
Change-Id: Ia152a839014e235fbfb656104c15d7c1b456d02e
Signed-off-by: Andy Hung <hunga@google.com>
|
|/
|
|
| |
Change-Id: Ib9ac170f8e8b7746b3588157a56cbee3b753a1cb
|