| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When creating a fast AudioTrack, a request is sent to SchedulingPolicyService
to elevate the requesting thread priority. This generates a binder
call into system_server process and to a JAVA service via JNI.
If the thread from which the track was created is in the system_server
process and does not have the "can call java" attribute, a crash occurs because
the binder optimization reuses the same thread to process the returning binder
call and no JNI env is present.
The fix consists in sending the priority change request from the AudioFlinger
mixer thread, not from the binder thread.
This also reverts the workaround in commit 73431968
Bug 7126707.
Change-Id: I3347adf71ffbb56ed8436506d4357eab693078a3
|
| |
|
|
|
|
|
|
| |
Ignore thread can call Java parameter to work around bug where
AudioTrack instance gets recreated when key clicks are enabled
and WFD gets turned on, with the wrong parameters.
Change-Id: Ia42c8704b46fe3ffea560b05b60939fa2e4b29e1
|
| |
|
|
| |
Change-Id: Ie7504d0ddb252f7e4d4f99ed0b44cfc7b1049816
|
| |
|
|
|
|
|
| |
This reverts commit 5d464eb0b8cffb994a754ff108795e858a882414.
It caused the wrong thread ID -1 to be passed to IAudioFlinger::createTrack().
Change-Id: Ic221d2bb4af572d3d2d752af19238c52f6728e3a
|
| |
|
|
|
|
| |
Simplifies the error recovery in case IAudioTrack fails.
Change-Id: I6aee41a2ac747a5689fb4836b04174e6107bf32f
|
| |
|
|
| |
Change-Id: I1c1896da48983aa9f1462a4b471f910498816f60
|
| |
|
|
|
|
|
|
| |
Convention is for "get" APIs that directly return status_t and indirectly
return a value via a pointer, to return BAD_VALUE if the pointer is NULL.
Also indirectly return 0 for other errors.
Change-Id: I1599f20ecb26e9723f9fb384ffbf911ff3a2ce1c
|
| |
|
|
| |
Change-Id: I7d8201590cda29c9fa99662a4fdba222091febfe
|
| |
|
|
| |
Change-Id: I48b193a742b32b6746aa938b84dc405124a6a5c3
|
| |
|
|
|
|
|
|
|
|
|
|
| |
AudioTrack::pause() should signal the control block condition
to release threads waiting for available buffers in obtainBuffer().
Otherwise the behavior relies on the timout on the condition
or the fact that audioflinger will mix a new audio buffer while executing
the pause.
Bug 6653769.
Change-Id: I5f8f73c471fe306070f30b814f32fd4b4dc1d575
|
| |
|
|
|
|
|
| |
This should help diagnose problems by allowing us to correlate
the logs with the dumpsys media.audio_flinger output.
Change-Id: I8c7c592b4f87d13b0f29c66ce7a2f301a0f063c9
|
| |
|
|
|
|
|
|
|
| |
Do not automatically restart an AudioTrack after an underrun
if the callback is executed but no data is written by the app.
Bug 6541286.
Change-Id: I11e7ab8dc968d7ff087058fec68f44490d3a7731
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added a timeout in case the trigger event is never fired.
- Extend AudioRecord obtainBuffer() timeout in case of
synchronous start to avoid spurious warning.
- Make sure that the event is triggered if the track is
destroyed.
- Reject event if the triggering track is in an incompatible state.
Also fix a problem when restoring a static AudioTrack after
a mediaserver crash.
Bug 6449468.
Change-Id: Ib36e11111fb88f73caa31dcb0622792737d57a4b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a workaround for bug that client can cache return value of
frameCount(), and is not notified when this value changes due to automatic
re-recreation of the underlying IAudioTrack.
A better long-term fix would be to notify clients when these kinds of
parameters change, and to fix assumptions in client code that they are
constant (e.g. in SoundPool and maybe obtainBuffer).
Also, once a fast track request is denied, don't request it again.
Bug: 6431187
Change-Id: I55b4ff30bbd9ed3a402e39452a38de52cdea53a9
|
| |
|
|
|
| |
Bug: 6427369
Change-Id: Id3b4487406235b881f6f0b4b95c5a02a9b797e75
|
| |
|
|
|
|
| |
except for "denied by client" and "denied by server"
Change-Id: I133ab747933729cc1f386813ee06ece055bdb294
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For fast tracks: move the default and minimum frame count calculations
from client to server. If accepted, the default and minimum frame count
is the fast mixer (HAL) frame count. If denied, the default and minimum
frame count is the same as it currently is for normal tracks.
For normal tracks: there is no change yet, preserve legacy behavior for
now but add a FIXME to change this later.
Bug fix: the test for buffer alignment matches channelCount was wrong.
Bug fix: check for 8-bit data in shared memory, which isn't supported.
Optimizations:
- in set(), only call AudioSystem::getOutputSamplingRate() when needed
- in createTrack_l(), only call AudioSystem::getSamplingRate() and
AudioSystem::getFrameCount() when needed
Change-Id: I79d2fe507db1a8f7bb094c71da8a129951dbb82f
|
| |
|
|
|
|
|
|
|
| |
The C++ APIs are going away.
Note: we use tid == 0 which is not supported yet by the C APIs,
do not submit this until that is added.
Change-Id: I0e90789e6c81c69f2544e899c52421ea5d1342be
|
| |
|
|
|
| |
Bug: 6379646
Change-Id: I12b53bc4118499ddc73a53a981f3f56328140868
|
| |
|
|
| |
Change-Id: Ifd825590ba36996064a458f64453a94b84722cb0
|
| |
|
|
|
|
|
|
|
|
| |
Allow AudioSink to use deep audio buffering when the
source is audio only and its duration is more than
a certain threshold.
This helps improve battery life but implies higher
audio latency.
Change-Id: Ie79915b61c370292f05aabda9779356570e03cbb
|
| |
|
|
| |
Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
|
| |
|
|
|
|
|
|
|
|
|
| |
removed outputs to stream mapping cache in audio system: the output for a
given stream type must always be queried from audio policy manager as the cache
is not always updated fast enough by audioflinger callback.
removed AudioFlinger::PlaybackThread::setStreamValid() not used anymore if
stream to output mapping is not cached.
Change-Id: Ieca720c0b292181f81247259c8a44359bc74c66b
|
| |
|
|
| |
Change-Id: I42ce691df3f586ac061b62237f35a263a0116f1f
|
| |
|
|
|
| |
b/6160363
Change-Id: I471815012c6a113ec2c4dd7676e8fa288a70bc76
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
createTrack and openRecord don't need the "old" flags parameter,
which was either audio_policy_output_t or audio_in_acoustics_t
shifted left by 16 bits. But they do need "new" flags, which
are defined by the application use case. Initially, the only
application use case flag is timed output, but others are planned.
For output, the audio_policy_output_t flags are passed to
AudioSystem::getOutput, which returns an audio_io_handle_t, and that
handle is then passed to createTrack. So createTrack doesn't need the
old flags parameter.
For input, the audio_in_acoustics_t flags are passed to
AudioSystem::getInput, which returns an audio_io_handle_t, and that
handle is then passed to openRecord. So openRecord doesn't need the
old flags parameter.
Change-Id: I18a9870911846cca69d420c19fe6a9face2fe8c4
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
It was only used to decide whether to issue a warning.
The warning was issued the first time track was created but
not at re-creation. Now it is a verbose message every time,
not a warning since it happens all the time with key clicks on A2DP.
Change-Id: I9d39f53c0a7eb84b666e55b1b76ff830cf8f37ba
|
| |\ \ |
|
| | |/
| |
| |
| | |
Change-Id: I327663a020670d0a72ff57bd0b682e2ce0528650
|
| |/
|
|
|
|
| |
Fix indentation, and add blank lines in key places for clarity
Change-Id: I57a0a8142394f83203161aa9b8aa9276abf3ed7c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix indentation to be multiple of 4.
Make it easier to search:
sp< not sp < to
"switch (...)" instead of "switch(...)" (also "if" and "while")
Remove redundant blank line at start or EOF.
Remove whitespace at end of line.
Remove extra blank lines where they don't add value.
Use git diff -b or -w to verify.
Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
|
| |
|
|
|
|
|
|
|
|
| |
This affects:
- IAudioFlinger::openOutput
- AudioTrack::AudioTrack
- AudioTrack::set
- apps that call these
Change-Id: I26fb281bac6cb87593d17697bc9cb37a835af205
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Current AudioTrack implementation enforces that the requested audio
buffer size is at least corresponding the audio latency.
This requirement is too strong and leads to problems with current
stagefright and AudioSink implementations when playing over output
streams with long latency.
Ultimately, the AudioSink design should be changed to specify a minimum
buffer size in time or frames units but not in buffer count units.
Change-Id: I8ba603956f92ac49143a8249572665aa548f2f0f
|
| |
|
|
|
|
|
|
| |
prctl(PR_SET_NAME) limits to 15 characters. Before we had names like
"Binder Thread #" and the counter was cut off :-( Also remove redundant
"thread" at end of name; it's always a thread.
Change-Id: I1f99c2730ba0787ed9b59c15914356cddf698e2f
|
| |
|
|
|
|
|
|
| |
Bring in changes to audio flinger made to support timed audio tracks
and HW master volume control.
Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae
Signed-off-by: John Grossman <johngro@google.com>
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
We no longer put the filename at start of file.
Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| | |
Change-Id: I868329c52f31bc20125f068500d8f892b4ec9796
|
| |/
|
|
|
|
| |
Inform AudioFlinger of the tid of the callback thread.
Change-Id: I670df92dd06749b057238b48ed1094b13aab720b
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The client callback threads had mutexes called AudioTrackThread::mLock
and ClientRecordThread::mLock. These mutexes were only used by start()
and stop(), and were unused by the thread itself. But start() and
stop() already have their own protection provided by AudioTrack::mLock
and AudioRecord::mLock. So the thread mutexes can be removed.
Change-Id: I098406d381645d77fba06a15511e179a327848ef
|
| | |
| |
| |
| | |
Change-Id: I4999e984460893961d0d8092cff17f3cf07d7214
|
| | |
| |
| |
| |
| |
| | |
Use if (p != NULL) instead of if (ptr)
Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
|
| |/
|
|
|
|
|
| |
This is part of the process of abstracting the control block
to make it easier to maintain.
Change-Id: Idb8f461e68dab3bcf268159cc0781651c6fb7094
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
This will make it easier for this kind of code to be optimized
for each target architecture.
Change-Id: I9efd27d6c0175b00b9a784353244805cec63c0b8
|
| | |
| |
| |
| |
| |
| | |
until we get updated prebuilts from vendor.
Change-Id: I8aae81d2513edca0ab268053a11c8c4206879e61
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Always read and write track volumes atomically. In most places this was
already being done, but there were a couple places where the left and
right channels were read independently.
Changed constant MAX_GAIN_INT to be a uint32_t instead of a float.
It is always used as a uint32_t in comparisons and assignments.
Use MAX_GAIN_INT in more places.
Now that volume is always accessed atomically, removed the union
and alias for uint16_t volume[2], and kept only volumeLR.
Removed volatile as it's meaningless.
In AudioFlinger, clamp the track volumes read from shared memory
before applying master and stream volume.
Change-Id: If65e2b27e5bc3db5bf75540479843041b58433f0
|