| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Buffer frame count and notification frame count
are now calculated by server instead of by client.
The server has more information and can do a better job.
Also fix a few bugs:
- If a fast track was re-created, even with same pipe depth, it would fail.
Now it can correctly re-create a fast track provided the pipe depth is same.
- Notification frame count for fast tracks was calculated by client
as 1/2 of the total frame count, which is a large value due to the pipe.
Now the notification frame count is set by server to the HAL frame count.
This should reduce latency for fast tracks.
- EVENT_OVERRUN were happening frequently when there was sample rate conversion,
because the client didn't know about the sample rate conversion,
and under-estimated the necessary buffer size. Now since server
calculates the buffer sizes, EVENT_OVERRUN is unlikely.
- RecordThread::createRecordTrack_l was checking for mono and stereo
for fast tracks. This is not necessary, and now we can handle a
multi-channel fast track.
Bug: 7498763
Change-Id: I0c581618e8db33084d5ff9ed50a592990c9749e8
|
|
|
|
| |
Change-Id: I27fb888f01ed547242ffaa8d4626d38c7999ad53
|
|
|
|
|
|
|
|
| |
openRecord() now explicitly returns the control block and data buffer
as separate IMemory references. If the IMemory for data buffer
is 0, this means it immediately follows the control block.
Change-Id: Ic098f88f0e037f8fbe30006689e18cacacf09d06
|
|
|
|
|
|
| |
It's size_t consistently
Change-Id: I29638ef59ac773218025f2403a3508a307b487e0
|
|
|
|
|
|
| |
It's uint32_t consistently
Change-Id: If8298c7e9aeea2b951fe47b675adbdf48d104846
|
|
|
|
| |
Change-Id: I0fa61025c979709ad7d655bc717df5f194b6089e
|
|
|
|
| |
Change-Id: I62d6534a9581e84ae20c2422f7ad9aeda9b7c4df
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes it the same as for IAudioTrack.
Previously we had a mix of int, int32_t and uint32_t,
which could cause comparisons to fail.
Change-Id: Ic72ef650ee81f65db11e42ed16d818fdf3e310f4
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed bug that if the binder call failed (for example if the
IAudioFlinger binder is dead), then getInputFramesLost was returning
garbage. Now it correctly returns zero, which is the error value for
this method.
The type declarations for getInputFramesLost were inconsistent:
a mixture of unsigned int, size_t, and uint32_t. Now it returns uint32_t
everywhere, which is what the underlying HAL API returns.
Added a FIXME about the side effect behavior. This will need review
for multi-client.
Change-Id: Ifa2e117a87dbd0c1f2c892a31d1c3dd919bf1a0a
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: I00a1025e2891a1c96218b3c2187eaddda6614ebc
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
Bug: 11148722
Change-Id: Ia1e14133d73ac301fe06a047e70a573911822630
|
|/
|
|
| |
Change-Id: Ia99e23a0b46db3f3e6aa46f9018e63c14f4af369
|
|\
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
Change-Id: I56f82904cb3855bad6f33ad1ff4ddf66a61c5720
|
|\ \
| |/
| |
| |
| |
| |
| | |
into klp-dev
* commit '82278b2ceeebbcf345ed81413eeffa82fa82e05b':
Fix potential leak of audio input handle.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The audio input handle is ultimately owned by the audio recorder
object but it could be dropped on the floor if an error occurred
before that object was fully initialized.
Rearranged some of the argument validation and merged getInput_l
with openRecord_l to simplify the code and prevent such a leak
from occurring.
Bug: 10265163
Change-Id: I124dce344b1d11c2dd66ca5e2c9aec0c52c230e2
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: I8ad58a961cefd0b0c2b041e04fd78669917453d1
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I76ec536d1504eb9a558178b62bf225aace4b40d1
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new parameter 'flags' of type audio_input_flags_t will be used for
requesting a fast track, but is currently ignored.
Change-Id: If68dfda8b2d4eaaca42927d721b4630c47f71f3b
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new optional parameter 'flags' of type audio_input_flags_t will be
used for requesting a fast track.
Change-Id: Ia7e070cb57c833e608352da354fb30dc26df6918
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | | |
Change-Id: I122a7cf7bfc162090cb27f37c325db7a23985bc7
|
|\ \ \
| | |/
| |/| |
|
| |/
| |
| |
| | |
Change-Id: Iae38fa4ac20a45751566169213a08a15deb0a2f6
|
|/
|
|
| |
Change-Id: I72feefdd6f3a623fd3669b80d4b264518fdc0929
|
|
|
|
| |
Change-Id: I22ad4ba8777842bf6705e79c6ad796fdb9a4104c
|
|
|
|
|
| |
Bug: 9423855
Change-Id: I78ba8228c60dff11fb466156bb632c5dda45cdaf
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Channel count is uint32_t.
Remove redundant mask parameter to AudioTrack::createTrack_l()
and AudioRecord::openRecord_l().
Change-Id: I5dc2b18eb609b2c0dc3091994cbaa4628062c17f
|
|
|
|
|
|
| |
Also fix typo: bufferCount should be frameCount.
Change-Id: Ibed539504db75ef99dc21c8ff1bf2987122063a5
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I89fc6d8f695b48516d956b0a9a4a43d408f369f9
|
|
|
|
| |
Change-Id: Ibec910608948d778dc655d900255a80384e9b06f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix race conditions for EVENT_MARKER and EVENT_NEW_POS callbacks.
Marker and new position update fields are protected by lock.
getSampleRate() doesn't need a lock because it reads from shared memory
control block.
Enforce that the parameter passed with EVENT_MARKER and EVENT_NEW_POS
cannot not be changed by the callback handler, and will not change during
the call by another thread.
Session ID should never change; log if it does.
Change-Id: Ia2c63cf1a71b10bb06c37981bd76437f83fffa91
|