| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Add support for compressed audio playback by use
of an AudioTrack attached to a direct output thread.
Bug: 9428304.
Change-Id: I4a61be9cf0e31003ca85935d6e0ee38ca8192e03
|
|
|
|
|
| |
Bug: 15523502
Change-Id: Ifd4aa7fca197bc041c1620fc3f7d953a8902551a
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I6bd48292310be4e05758a11f617f50585904422d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Pre-requisite:
Perform seek on the clip. After seek the data remaining till EOS
is little more than the driver and common block buffering.
-Framework state:
Offload thread is waiting for signal from the HAL for a free
buffer. Audio Player calls sink stop on reaching EOS. Audio
track is waiting on obtain buffer for a free space in common
block to send the last buffer. The track is moved to stopping
state as input EOS is reached.
-Issue:
Perform pause/ resume in this state(STOPPING), Audio playback
does not resume.
-Fix
Ensure resume is called in stopping state if frames ready is
greater than zero.
Bug: 12870871
Change-Id: Ib1378c4ee5ce4bea655691e93de0775f7b1d2804
Signed-off-by: Glenn Kasten <gkasten@google.com>
|
|
|
|
| |
Change-Id: I57e44b4c36b99f7149542bbcf9645521c6152dfa
|
|
|
|
|
|
|
|
|
| |
Do not allow an offload track to directly control the offload thread
behavior. OffloadThread can check for any pending flush reporting
by its active tracks and decide to flush the HW or not.
Bug: 12530661
Change-Id: Ib33f023c942f6c091b618004136b153c38a6eef6
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| | |
offloaded tracks" into klp-dev
* commit '3424d6e17637e0743ddf3bf4688af8ee36e69264':
fix volume and effect enable delay on offloaded tracks
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Volume: add a method to wake up the mediaserver playback
thread when a volume command is received on an offloaded track.
Effects: call effect chain process on offloaded playback threads
asynchronously from writes to allow effect state updates while
waiting for async write callback.
Bug: 10796540.
Change-Id: Id2747ae88783575d1d7ffd6fc86fbd054ab2c739
|
|\ \
| |/
| |
| |
| | |
* commit '8a220740cd77eb844123d3914190a94513797b40':
Fix AudioTrack shared memory leak
|
| |
| |
| |
| |
| | |
Bug: 2801375
Change-Id: I50e15164fe310f69ea019dca5b49171a02bc6992
|
|\ \
| |/
| |
| |
| |
| |
| | |
and onTimestamp
* commit 'a4a82c5f8f3eccfa10ce30a52cbb4b1c5c983282':
Add ExtendedAudioBufferProvider::framesReleased and onTimestamp
|
| |
| |
| |
| |
| |
| |
| | |
and implement them in SourceAudioBufferProvider using the associated NBAIO_Source,
and in Track using the associated AudioTrackServerProxy.
Change-Id: I60dc4adba63fc1dc452ff16caf347e4a7c8242c2
|
|\ \
| |/
| |
| |
| |
| |
| | |
AudioFlinger::PlaybackThread::Track::getTimestamp()" into klp-dev
* commit '3ae0a58a83d092d96672295c8a62908478f28a9b':
Add AudioFlinger::PlaybackThread::Track::getTimestamp()
|
| |
| |
| |
| |
| |
| |
| | |
with a dummy implementation initially,
and use it in AudioFlinger::TrackHandle::getTimestamp()
Change-Id: I2da88fc52a135a7f0d9fd9538986e919dc8ccd3b
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Outside callers now use initCheck() to determine whether a TrackBase
has been created successfully, instead of relying on internal knowledge.
Previously, callers needed to know that a TrackBase was only valid if it's
getCbk() != 0. For a Track (playback), they needed to know to also check
the track's name (track index). Now, outsiders can just call initCheck().
Other changes:
- Return a 0 reference if track creation fails
- Remove a dead line of code in AudioFlinger::openRecord
Change-Id: If374924a3f6fd27906f625aa83dd0a1e3f506e00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a regression that was introduced earlier
by commit 9f80dd223d83d9bb9077fb6baee056cee4eaf7e5
called "New control block for AudioTrack and AudioRecord".
That commit broke underrun reporting for fast tracks.
Also remove Track::mUnderrunCount, which counted the number of underrun
events, and was only used by dumpsys media.audio_flinger.
Now dumpsys media.audio_flinger reports the number of underrun frames,
Isolated underrun-related control block accesses via the proxy, so that
the server is not directly poking around in the control block.
The new proxy APIs are AudioTrackServerProxy::getUnderrunFrames() and
AudioTrackServerProxy::tallyUnderrunFrames(). getUnderrunFrames() returns
a rolling counter for streaming tracks, or zero for static buffer tracks
which never underrun, but do a kind of 'pause' at end of buffer.
tallyUnderrunFrames() increments the counter by a specified number of frames.
Change-Id: Ib31fd73eb17cbb23888ce3af8ff29f471f5bd5a2
|
|
|
|
|
|
|
| |
This is part of a series of CLs to clean up the shared memory
control block, by removing any fields that don't have to be there.
Change-Id: I6e51003a1293b6800258c31b22cff2eba42162e7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added specialized playback thread class for offload playback,
derived from directoutput thread.
This thread type handles specific state transitions for offloaded
tracks and offloading commands (pause/resume/drain/flush..) to audio HAL.
As opposed to other threads, does not go to standby if the track is paused.
- Added support for asynchronous write and drain operations at audio HAL.
Use a thread to handle async callback events from HAL: this avoids locking
playback thread mutex when executing the callback and cause deadlocks when
calling audio HAL functions with the playback thread mutex locked.
- Better accouting for track activity: call start/stop and release Output
methods in audio policy manager when tracks are actually added and removed
from the active tracks list.
Added a command thread in audio policy service to handle stop/release commands
asynchronously and avoid deadlocks with playback thread.
- Track terminated status is not a state anymore. This condition is othogonal
to state to permitted state transitions while terminated.
Change-Id: Id157f4b3277620568d8eace7535d9186602564de
|
|
|
|
|
|
|
|
| |
Main differences between old and new control block:
- removes the mutex, which was a potential source of priority inversion
- circular indices into shared buffer, which is now always a power-of-2 size
Change-Id: I4e9b7fa99858b488ac98a441fa70e31dbba1b865
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The proxy object will eventually be the only code that understands the
details of the control block. This should make it easier to change the
control block in the future.
Initial set of control block fields that are isolated:
- sample rate
- send level
- volume
Prepare for streaming/static separation by adding a union to the control
block for the new fields.
Fix bug in handling of max sample rate on a track. It was only checking
at re-configuration, not at each mix.
Simplify OutputTrack::obtainBuffer.
Change-Id: I2249f9d04f73a911a922ad1d7f6197292c74cd92
|
|
|
|
|
|
|
| |
Don't rely on control block to determine whether track has been marked
invalid. Instead, use a local flag that can't be corrupted by client.
Change-Id: I783dafe828f93c1c3d2d0e5a08105ea536436efb
|
|
|
|
|
|
|
| |
If ever needed again, it could be implemented on client side by forcing
a track volume of 0.
Change-Id: I88a9b4f675b6dca2948549414f9ec2c192d29269
|
|
Audioflinger.cpp and Audioflinger.h files must be split to
improve readability and maintainability.
This CL splits the files as follows:
AudioFlinger.cpp split into:
- AudioFlinger.cpp: implementation of IAudioflinger interface and global methods
- AFThreads.cpp: implementation of ThreadBase, PlaybackThread, MixerThread,
DuplicatingThread, DirectOutputThread and RecordThread.
- AFTracks.cpp: implementation of TrackBase, Track, TimedTrack, OutputTrack,
RecordTrack, TrackHandle and RecordHandle.
- AFEffects.cpp: implementation of EffectModule, EffectChain and EffectHandle.
AudioFlinger.h is modified by inline inclusion of header files containing
the declaration of complex inner classes:
- AFThreads.h: ThreadBase, PlaybackThread, MixerThread, DuplicatingThread,
DirectOutputThread and RecordThread
- AFEffects.h: EffectModule, EffectChain and EffectHandle
AFThreads.h includes the follownig headers inline:
- AFTrackBase.h: TrackBase
- AFPlaybackTracks: Track, TimedTrack, OutputTrack
- AFRecordTracks: RecordTrack
Change-Id: I512ebc3a51813ab7a4afccc9a538b18125165c4c
|