| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Channel count is uint32_t.
Remove redundant mask parameter to AudioTrack::createTrack_l()
and AudioRecord::openRecord_l().
Change-Id: I5dc2b18eb609b2c0dc3091994cbaa4628062c17f
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I130e7849fd1da7a0b7fe56c3c53919d26e3843b8
|
|/
|
|
|
|
| |
This is part of a series to clean up the control block.
Change-Id: I7f4cb05aef63053f8e2ab05b286d302260ef4758
|
|
|
|
|
|
| |
Also fix typo: bufferCount should be frameCount.
Change-Id: Ibed539504db75ef99dc21c8ff1bf2987122063a5
|
|
|
|
| |
Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This is part of a series to clean up the control block.
Change-Id: I0265fece3247356b585d4d48fbda6f37aea8a851
|
|
|
|
| |
Change-Id: I89fc6d8f695b48516d956b0a9a4a43d408f369f9
|
|
|
|
|
|
| |
Use only one symbol per flag
Change-Id: Ia3582e2134abd60c896d11337face65383e79c7c
|
|
|
|
| |
Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
|
|
|
|
|
|
|
| |
AudioRecord::set() was calling getMinFrameCount() with
a channel count instead of a channel mask.
Change-Id: Iabace7686426430fd53deac0c71b0c36aa64171c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
like AudioTrack::stop()
Change-Id: Iab62f4665151345f1ad5874c97a21d1a331f0154
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename ClientRecordThread to AudioRecordThread to be more similar to
AudioTrack naming.
Only create the thread once, and use resume() and pause() for start()
and stop(). This will allow us to have a known client callback thread
tid that we can pass to AudioFlinger before start().
mActive:
Made mActive a bool not int.
mActive is protected by mLock; volatile is meaningless.
Fixed a few places where mActive was accessed without a lock:
- stopped()
- processAudioBuffer()
These aren't used internally, so no need for _l() versions.
Change-Id: I4b8a5c90f3a22d3894b344564cb1c5aef4f1fda2
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Not yet implemented
Change-Id: I35523fb15ad71727ecc9f4bb870f07e4b7397dc4
|
|
|
|
|
|
| |
This also fixes a benign race in reading mActive without a lock.
Change-Id: I19e953d4f275e5c266ca1ca3fece7b6c02ad1707
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In IAudioFlinger::createTrack() and IAudioFlinger::openRecord(),
declare input parameter to use correct type audio_channel_mask_t.
In IAudioFlinger::getInputBufferSize(), input parameter is now channel mask
instead of channel count.
Remove unused IAudioFlinger::channelCount(audio_io_handle_t).
In AudioRecord::getMinFrameCount() and AudioSystem::getInputBufferSize(),
input parameter is channel mask instead of channel count.
Change-Id: Ib2f1c29bea70f016b3cfce83942ba292190ac965
|
|
|
|
| |
Change-Id: I29fb3ee5664c1f0ee0409c1bb2be087ecca637db
|
|
|
|
| |
Change-Id: I9e1b918b2635d961604a4a9d88eb1c7179a167a7
|
|
|
|
| |
Change-Id: I12ef9367d05dbe069c037b1b4acd6347a8cf3ece
|
|
|
|
| |
Change-Id: I021ddcc1bcb63132a4597d13e3d09db2a5f2c628
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: Ifd825590ba36996064a458f64453a94b84722cb0
|
|
|
|
|
| |
b/6160363
Change-Id: I471815012c6a113ec2c4dd7676e8fa288a70bc76
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added the infrastructure to support the synchronization of playback and
capture actions on specific events.
The first requirement for this feature is to synchronize the audio capture
start with the full rendering of a given audio content.
The applications can further be extended to other use cases
(synchronized playback start...) by adding new synchronization events and
new synchronous control methods on player or recorders.
Also added a method to query the audio session from a ToneGenerator.
Change-Id: I51f1167290d9cafdf2fbcdf9e4785156973af44c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I6f369a2b99eb515603bc7d5629a07db2b96783fe
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
| |
Change-Id: Ifae4fd7820b650aaca2b13c8658c292db1c46c0f
|
|
|
|
|
|
| |
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
|
|/
|
|
|
|
| |
Use if (p != NULL) instead of if (ptr)
Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Was a mix of audio_source_t, uint8_t, and int.
Related fixes:
- fix comments in MediaRecorder.java
- AudioPolicyService server side was not checking source parameter at
all, so if the client wrapper was bypassed, invalid values could be
passed into audio HAL
- JNI android_media_AudioRecord_setup was checking source for positive
values, but not negative values. This test is redundant, since already
checked at Java and now checked by AudioPolicyService also, but might
as well make it correct.
Change-Id: Ie5e25d646dcd59a86d7985aa46cfcb4a1ba64a4a
|
|
|
|
|
|
|
|
|
|
|
|
| |
Was int or uint32_t.
When AudioFlinger::format can't determine the correct format,
return INVALID rather than DEFAULT.
Init mFormat to INVALID rather than DEFAULT in the constructor.
Subclass constructors will set mFormat to the correct value.
Change-Id: I9b62640aa107d24d2d27925f5563d0d7407d1b73
|
|
|
|
|
|
|
|
|
| |
except in the control block, where we don't have room.
In AudioFlinger::ThreadBase::TrackBase::getBuffer,
read the frame size from control block only once.
Change-Id: Id6c4bccd4ed3e07d91df6bbea43bae45524f9f4e
|
|
|
|
| |
Change-Id: Ie79dd5abb8078b35474bf0f1b3a6ff994a3a3360
|
|
|
|
|
|
|
| |
See https://android-git.corp.google.com/g/#/c/157220
Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
|
|
|
|
|
|
|
| |
See https://android-git.corp.google.com/g/157065
Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
|
|
|
|
|
|
|
|
|
|
|
| |
Several source files privately defined macros LIKELY and UNLIKELY in terms
of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and
CC_UNLIKELY which are intended for this purpose. So rename the private
uses to use the standard names.
In addition, AudioFlinger was relying on the macro expanding to extra ( ).
Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873
|
|
|
|
|
|
|
|
|
|
| |
On AudioTrack and AudioRecord stop or failed start, restore the priority
and cgroup of the caller to their previous values, rather than forcing
to NORMAL. Dependent on new thread APIs.
Also fixes bug where priority was set to AUDIO but cgroup not set.
Change-Id: Ib83893918fb4fdf57c6b87884b51038997a631d8
|
|
|
|
|
|
|
| |
See https://android-git.corp.google.com/g/#/c/143865
Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
|
|
|
|
|
|
|
|
| |
Don't remove effects until the session they are in goes away or all
AudioEffects have been explicitly released. This allows the control
panel process to die without stopping the effects.
Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
|