| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Use this struct to handle the parameters for TimestretchBufferProvider all
across the system.
Add stretch mode and fallback mode to TimestretchBuffer Provider.
Change-Id: I19099924a7003c62e48bb6ead56c785cb129fba2
|
|
|
|
|
| |
Bug: 19196501
Change-Id: I6411e1d3ce652b711a71a6d9df020cb5f60d4714
|
|
|
|
| |
Change-Id: I37d3c4ce22b74fe8581a886fe5a7f9fef8266dad
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I1083ab739e445e5bd3e3082fc1d3a20cc19601d5
|
| |
| |
| |
| |
| |
| |
| |
| | |
Allow restoration of loop and position.
Make position and loop synchronously readable.
Bug: 17964637
Change-Id: I8cfb5036e665f55fdff5c67d27e1363ce9a8665d
|
|/
|
|
|
|
|
| |
Allow independent setting of position and loop.
Bug: 17964637
Change-Id: I8b3bd97a244b932728b68da7684044f2636984a5
|
|
|
|
| |
Change-Id: I6c8fe626a3825fa9e139319656d682a57b887c97
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StaticAudioTrackServerProxy::framesReady() previously returned
only the contiguous frames, update to return the total
available frames. This resolves short-count looping in
SoundPool for FastTracks.
Also (1) Removes the racy condition of reading two variables
and (2) Fixes buffer->mNonContig to return the correct value
and (3) Restores behavior that loop count of 1 goes back to
loopStart once during playback.
Bug: 11830751
Bug: 12070295
Bug: 17456842
Change-Id: I64906e6036bb00a1d7375b03efe6deb69d6478ca
|
|
|
|
|
|
|
|
|
| |
This structure is passed between 64 and 32 bit processes via shared
memory, so ensure it's the same size, and that the members we care
about are in the same place.
Bug: 17569156
Change-Id: Id776bc825af1fbf43a6dd3407cca064f6d932902
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| | |
* commit '2a8270e6944fb3addfcba87f6885aaad196b8b88':
Offer a type-safe album art interface.
|
| |
| |
| |
| |
| | |
Bug: 15514223
Change-Id: Iddfc33a00e6cd3779ca09c01a55f62b151f6ec95
|
| |
| |
| |
| |
| |
| |
| | |
Eventually we may want to use uint64_t, but will need to confirm atomicity.
Bug: 12381724
Change-Id: Ia2c591d262d22b47b6f7dab4b9d9faa14b86d865
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
Eventually we may want to use uint64_t, but will need to confirm atomicity.
Bug: 12381724
Change-Id: Ia2c591d262d22b47b6f7dab4b9d9faa14b86d865
|
| |
| |
| |
| |
| |
| | |
in IAudioFlinger::createTrack and IAudioFlinger::openRecord
Change-Id: I09c644c80e92c8e744b1b99055988a2588b2a83d
|
|\ \
| |/
| |
| |
| | |
* commit '77177fa20773d02b4f9c4147ecb98107f019fa7d':
Allow releaseBuffer after flush
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After AudioTrack start checks for pending flush,
allow releaseBuffer on any previously obtained buffer.
For example, this can happen if the resampler has obtained
a buffer but not released the whole buffer yet.
Note that the resampler will be reading obsolete data.
Bug: 11285590
Change-Id: I0614fbb62e43604aac3089cce4b7797c87a306b5
|
|\ \
| |/
| |
| |
| |
| |
| | |
restore" into klp-dev
* commit '7f8c397378a7ee5abd395413be71388ad36d3ed2':
AudioTrack: fix head position after restore
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The head position transfered to the new track
by restoreTrack_l() must take into account the frames that
are dropped from the old track to avoid a non recoverable
offset in the playback head position returned to applications.
Bug: 11230062.
Change-Id: I51143a08b95e8f264ed709ae2054360315f2b8b1
|
|\ \
| |/
| |
| |
| |
| |
| | |
SRC" into klp-dev
* commit '11454092e4a94d3c8b4576c981595339abdfac0d':
Fix underruns when fast track denied due to SRC
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
OpenSL ES requests a fast track. If sample rate conversion is needed,
the request is denied by server, and a larger client buffer is used
to handle the higher latency of a normal track. However the client
notification period was calculated based on buffer being divided into
2 sub-buffers. That resulted in the notification period being too long.
The server pulls chunks that are smaller than half the total buffer.
So now the client uses 3 sub-buffers when there is SRC.
Also removed the 'defer wake' optimization because it was incorrect.
This optimization attempted to reduce the number of wakeups of client,
when server releaseBuffer knows that another releaseBuffer will be
following. But there is no way for the first releaseBuffer to predict
how soon the second releaseBuffer will occur. In some cases it was
a long time, and the client underran. So now the client is woken up
immediately if the total number of available frames to client is >=
the minimum number the client wants to see (the notification period).
Also fix bug where minimum frame count was not being used in the
calculation of notification period.
Bug: 10342804
Change-Id: I3c246f4e7bc3684a344f2cf08268dc082e338e2a
|
|\ \
| |/
| |
| |
| | |
* commit '908d3c09ca7f2ccb280aa5dc8d876099ff9a9d0f':
Implement Track::getTimestamp()
|
| |
| |
| |
| |
| |
| |
| | |
using a new timestamp latch in PlaybackThread, and
AudioTrackServerProxy::framesReleased() which returns mServer.
Change-Id: I1ebfba968c773faaab95648c272fd3ebd74718d6
|
|/
|
|
| |
Change-Id: Id3ccc183a03421330d0498faaa62a45915cdc3d6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I7b6d31e24531954ab1ecdf3ed56c19433700bd89
|
|
|
|
| |
Change-Id: Ieabd91acee92d0e84e66fbd358df5282b856306e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- start() returns a status so that upper layers can
recreate a non offloaded track in case of error.
- Added states to handle offloaded tracks specific:
- waiting for stream end (drain) notification by
audio flinger
- allow pause while waiting for stream end notification
- getPosition() queries the render position directly from
audio HAL.
- disable APIs not applicable to offloaded tracks
- Modified track restoring behavior for invalidated
offloaded tracks: just send the callback and wait for
upper layers to create a new track.
- Added wait for stream end management in audio track client
proxy. Similar to obtainBuffer and should be factored in.
Change-Id: I0fc48117946364cb255afd653195498891f622bd
Signed-off-by: Eric Laurent <elaurent@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
| |
Maintain unreleased frame count on client side also (was already there on server side).
Assertion failure instead of BAD_VALUE status for incorrect usage of APIs.
Clean up error handling code.
Change-Id: I23ca2f6f8a7c18645309ee5d64fbc844429bcba8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NOTE: this does _not_ include all private member variables added
to classes as part of offload support. Only public/protected functions
and stubs functions/variables needed to make the changes buildable.
- isOffloadSupported() added to audio policy service
A stub implementation is required to build, this always returns false
- setParameters() added to IAudioTrack
A stub implementation is required to build, this always returns
INVALID_OPERATION
- CBlk flag for stream end
- Change AudioSystem::getRenderPosition() to take an audio_output_t
so caller can specify which output to query
- Add AudioSystem::isOffloadSupported()
This is fully implemented down to the AudioFlinger function
AudioPolicyServer::isOffloadSupported() which is just a stub
that always returns false.
- Add EVENT_STREAM_END to AudioTrack interface.
STREAM_END is used to signal when the hardware has actually finished
playing all the data it was sent.
- Add event type enumeration to media player interface AudioSink callbacks
so that the same callback can be used to handle multiple types of
event. For offloaded tracks we also have to handle STREAM_END and
TEAR_DOWN events
- Pass audio_offload_info_t to various functions used for opening outputs,
tracks and audio players. This passes additional information about the
compressed stream down to the HAL when using offload.
For publicly-available APIs this is an optional parameter (for some of
the internal and low-level APIs around the HAL interface it is mandatory)
- Add getParameters() and setParameters() API to AudioTrack
Currently dummy implementations.
- Change AudioPlayer contructor so that it takes a set of bitflags defining what
options are required. This replaces the original bool which only specified
whether to use deep buffering.
- Changes to StageFright class definition related to handling tearing-down of
an offloaded track when we need to switch back to software decode
- Define new StageFright utility functions used for offloaded tracks
Currently dummy implementations.
- AudioFlinger changes to use extended audio_config_t.
Fills in audio_offload_info_t member if this info is passed in when
opening an output.
- libvideoeditor changes required to add the new event type parameter
to AudioSink callback functions
- libmediaplayerservice changes required to add the new event type parameter
to AudioSink callback functions
Change-Id: I3ab41138aa1083d81fe83b886a9b1021ec7320f1
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
|
|
|
|
|
|
|
|
| |
An event flag can be more fault-tolerant in case of loss of synchronization,
as it cannot overflow. It also allows more bits to be used in the future.
See http://en.wikipedia.org/wiki/Event_flag
Change-Id: I01ca25d951eb263124da54bb4738f0d94ec4a48b
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: If7e2bc9b2a216524ee9cbb68682e2634933b4973
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| | |
VideoFrame"
* commit 'ba6b1bc38e0c355277f69af286469adb5f02e876':
Initialize and copy mRotationAngle in VideoFrame
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When thumbnails were generated they could be generated at random
angles as the mRotationAngle variable was not initialized to any
value. This variable would have to be explicitly overwritten to not
cause random rotation. Changed the implementation to initialize the
value to 0 (no rotation). mRotationAngle was also missing in the
copy constructor.
Change-Id: I67a5340fdd807c6ab3a3da5eecb09b5b9d5f4666
|
| |
| |
| |
| |
| |
| | |
This is part of a series to clean up the control block.
Change-Id: I7f4cb05aef63053f8e2ab05b286d302260ef4758
|
| |
| |
| |
| | |
Change-Id: I85d7d2f6381b251db5695202fec75128883a8662
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Finish removing CBLK_RESTORING and CBLK_RESTORED from control block flags,
and remove constant RESTORE_TIMEOUT_MS.
Also minor cleanup:
- Cache mCblk in local variable cblk and make cblk allocatable in a register.
- Use "iMem" for sp<IMemory>.
- Add missing error log to AudioRecord; it was already in AudioTrack.
This is part of a series to clean up the control block.
Change-Id: Ia5f5ab4763c392bc06a45851b167ddaee29e3455
|
| |
| |
| |
| |
| |
| | |
This is part of a series to clean up the control block.
Change-Id: Ifab1c42ac0f8be704e571b292713cd2250d12a3f
|
| |
| |
| |
| |
| |
| | |
This is part of a series to clean up the control block.
Change-Id: Ie474557db7cb360f2d9a0f11600a68f5a3d46f07
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove CBLK_RESTORING and CBLK_RESTORED from control block flags,
for AudioTrack only. They are still used by AudioRecord.
This is part of a series to clean up the control block.
Change-Id: Iae4798f5b527c492bdaf789987ff3a1dadd0cb37
|
| |
| |
| |
| |
| |
| | |
This is part of a series to clean up the control block.
Change-Id: I0265fece3247356b585d4d48fbda6f37aea8a851
|
| |
| |
| |
| |
| |
| | |
This is part of a series to clean up the control block.
Change-Id: Ic881a3560d9547cb63fcc0cefec87aa3da480e0d
|
| |
| |
| |
| |
| |
| | |
Use only one symbol per flag
Change-Id: Ia3582e2134abd60c896d11337face65383e79c7c
|
|/
|
|
| |
Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
|