| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Comparisons between size_t and int64_t variables show
warnings for 64 bit compilation, fix with casting.
Change-Id: I3c1b12ea6eca01e49696c724a1cf1cc6b88df7aa
|
|\
| |
| |
| |
| | |
* commit 'af318e2882e0b8b1a594f079eb3d10b2daa3ff7e':
Fix double close.
|
| |\
| | |
| | |
| | |
| | | |
* commit '0b87c0d9e074384d05e6563c1b1cf5dbd5246436':
Fix double close.
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch will fix the double close issue in SoundPool::doLoad():
status = MediaPlayer::decode(mFd, mOffset, mLength, &sampleRate, &numChannels, &format,
mHeap, &mSize);
ALOGV("close(%d)", mFd);
::close(mFd);
mFd = -1;
In MediaPlayerService::decode() which is called directly by
MediaPlayer::decode(), the fd will be closed, and after it return, the
mFd will be closed again.
When the system is idle, the second close will fail with EBADFD, but if
the system is busy, the mFd will be reused with another open/socket/pipe
system call, and the second close will cause errors.
Change-Id: If709515392cd490fea569658202524c51f8df785
Signed-off-by: Bao Haojun <baohaojun@gmail.com>
Signed-off-by: Wang Liang <wangliang@smartisan.cn>
|
| | |\ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If ClientProxy was interrupted by AudioTrack::pause() just before futex syscall() in obtainBuffer() was called,
It will not call releaseBuffer to wake up AudioTrackThread.
It puts the AudioTrackThread to sleep and then a deadlock occurs.
In this case, CBLK_INTERRUPT flags can't prevent a deadlock,
so this patch set mFutex to FUTEX_WAKE during interrupt() to avoid deadlock.
A similar problem could occur due to re-route or recovery after mediaserver death.
Bug: 18641665
Change-Id: I66fcae43af9a91eb55f6cdb52c644ee6c0999772
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Refactoring now possible due to changes in the Android
atomic include.
Change-Id: Ia0094d322d9ad3d8c186307306821376ca8002c4
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This gets rids of a bunch of special midi handling and replaces it
with an extractor that works with NuPlayer and MediaMetadataRetriever.
Change-Id: I8d0f5bbdde2ca24267cf4d62ab26afe9630e0217
|
|\ \ \ \ \ \
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
pause/resume for direct outputs" into lmp-mr1-dev
* commit '85aca658ac7d20584b0647427256df50a5f243ef':
audioflinger: implement pause/resume for direct outputs
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
direct outputs" into lmp-mr1-dev
* commit 'd33712d7ec5dcf427cc0be9b7d2ca1c99823c8e6':
audioflinger: implement pause/resume for direct outputs
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Extend pause/resume support to direct output threads
(was only for offload threads).
If the HAL implements pause/resume, track pause/resume is forwarded to
the HAL.
Pause, flush, resume sequence is respected by executing the HAL
calls in the playback thread (same as offload).
Make sure the track flags on client side are consistent with the
flags on server side.
Bug: 17883772.
Change-Id: I89b360d69818f7a9204bd36e3ec63a79e106ecf1
|
| |_|/ / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Instead of having the Sonivox engine directly open the file and
use stdio to read from it, use caller-provided callbacks.
Change-Id: I4d775c8458c48c591a15794c4517e006dcf034e1
|
|\ \ \ \ \ \
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
* commit '66b17e9dfe114ae968bfb2f8ad8325527e373c65':
audio policy: binder calls for dynamic audio policy mixes
|
| |\ \ \ \ \
| | |/ / / /
| | | | | |
| | | | | | |
Change-Id: Ifd30546c11def40ad483f27c9d7baa4008fcbac3
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add binder calls to register and unregister dynamic mixes
to AudioPolicyManager.
Bug: 16009464.
Change-Id: I4ef38166d0cfc88c984970969380d0cd6eb083ac
|
|\ \ \ \ \ \
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
custom mixes" into lmp-mr1-dev
* commit 'b279f5adfa2fd6f22c87b3a7106fbb62a0b9a5d2':
audio policy: add support for custom mixes
|
| |\ \ \ \ \
| | |/ / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
into lmp-mr1-dev
* commit 'c49d9cda49dab8b7dd0376cf56476b3e1895d5c6':
audio policy: add support for custom mixes
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add support for custom mixes in AudioPolicyManager.
Two methods are added to register or unregister a list of custom mixes
with their attributes and format.
getOutputForAttr() and getInputForAttr() first look for a match in
registered mixes before defaulting to normal output/input selection
Remote submix device connection disconnection now takes address into
account to identify the correspnoding custom mix.
Bug: 16009464.
Change-Id: I3f1c2a485a0fb71b1f984ed0adc9b68aa971e408
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
MediaPlayerService can't open files (it needs an already opened
file descriptor), so these were just wasting space.
Change-Id: I323044a6c1814a7bff952ed71b5c7792df2abf03
|
|\ \ \ \ \
| |/ / / /
| | | | |
| | | | |
| | | | | |
* commit 'c1b0d49cacde26c2420528169d157d2c778a9b0d':
Prevent ANR when AudioTrack is paused or re-routed
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If ClientProxy was interrupted by AudioTrack::pause() just before futex syscall() in obtainBuffer() was called,
It will not call releaseBuffer to wake up AudioTrackThread.
It puts the AudioTrackThread to sleep and then a deadlock occurs.
In this case, CBLK_INTERRUPT flags can't prevent a deadlock,
so this patch set mFutex to FUTEX_WAKE during interrupt() to avoid deadlock.
A similar problem could occur due to re-route or recovery after mediaserver death.
Bug: 18641665
Change-Id: I66fcae43af9a91eb55f6cdb52c644ee6c0999772
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If track is restored when it set its volume to a non-unity value (such as mute),
the volume was forced to unity again. Now, the previous volume is restored.
Bug: 18570664
Change-Id: I79f34c6c7d6f535baba813fd3b8ba8e55cac8ad7
|
|\ \ \ \ \
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
track is restored"
* commit 'bde85d05414cdd3888071635dd05e9ff78679d5e':
Track volume should be maintained even if track is restored
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If track is restored when it set its volume to a non-unity value (such as mute),
the volume was forced to unity again. Now, the previous volume is restored.
Bug: 18570664
Change-Id: I79f34c6c7d6f535baba813fd3b8ba8e55cac8ad7
|
|\ \ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
of audio source." into lmp-mr1-dev
* commit '390ef84373b7edd1397381f780ca235326357094':
AudioRecord: use audio attributes instead of audio source.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
prototype." into lmp-mr1-dev
* commit 'bf14c62e7973ed793a3b00c2c67beca4484c1c7a':
audio policy: new getOutputForAttr() prototype.
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Update getOutputForAttr() prototype and group all logic
dealing with audio attributes to stream type conversion in
audio policy manager.
getOutputForAttr():
- specifies the audio session (for future use)
- returns a status code
- receives either stream type (for legacy) or audio attributes
- returns an updated streamtype
Remove logic dealing with legacy stream types to attributes conversion
from AudioTrack.
Use correct type for audio sessions in other APIs (startOutput() ...).
releaseOutput() specifies the audio session (for future use).
Bug: 18067208.
Change-Id: I1bfbe9626c04c7955d77f8a70aecfad2cb204817
|
|\ \ \ \ \
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
buffer start" into lmp-mr1-dev
* commit '1e18795a4847e9368baa7ecee146d3901b283cd0':
Fix AudioTrack loop mode to play audio from buffer start
|
| |\ \ \ \
| | |/ / /
| |/| | |
| | | | | |
lmp-mr1-dev
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 18217633
Change-Id: Ica77acf0a32832d9b04eb657ef2f4f5329f8fbda
|
|\ \ \ \ \
| |/ / / /
| | | | |
| | | | |
| | | | | |
* commit '1a475921c0577a4650d1bbe40a85b732d1766939':
audio: new routing strategies and stream types
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added new routing strategies and stream type for internal use
by audio policy manager and audio flinger:
- One for accessibility to allow different routing than media
- One for re-routing (remote submix) in preparation of dynamic
policies
- Added stream type for "internal" audio flinger tracks used
for audio patches and duplication.
Bug: 18067208.
Change-Id: I88f884b552e51e4a49c29125e5a1204cf58ff434
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
into lmp-mr1-dev
* commit 'f8c2d1665393d8e0620a7129ef3865f34489e6ef':
Fix missing loop count for static tracks.
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
|\ \ \ \ \
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
lmp-mr1-dev
* commit '568689b169d8b0ae2cc252b88602db5e5acaa604':
AudioSystem: fix cross deadlock
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Do not hold gLockAPS when calling
AudioPolicyService::registerClient() in get_audio_policy_service().
registerClient() will need to acquire the AudioPolicyService mutex and
if at the same time a method called from AudioPolicyService
(with mutex held) calls back into AudioSystem and get_audio_policy_service()
a cross deadlock occurs.
Same preventive fix for get_audio_flinger().
Use a separate mutex for notification client list in AudioPolicyService.
This prevents deadlocking if registerClient() is called as a consequence of
AudioFlinger calling back into AudioPolicyManager while executing a method
with AudioPolicyService locked
Bug: 18403952.
Bug: 18450065.
Change-Id: Ia832e41aede8bc6c843fc615508fbdd74e0863b5
|
|\ \ \ \ \
| | |_|/ /
| |/| | |
| | | | |
| | | | | |
* commit 'cd370c790a9017560874a2588da46d4538087cad':
Use standard syntax to initialize fields.
|
| |\ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Clang compiler gives warning to old gnu syntax.
BUG: 18193625
Change-Id: I1b5237d60866fc357fc808f6a6955ab20418a7d8
|
|\ \ \ \ \ \
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
into lmp-mr1-dev
* commit '4fd641be9fed70743ca4fe823b69e74c258ce275':
AudioSystem: Add mutex for output cache
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fix cross deadlock with AudioFlinger by adding
a dedicated mutex to protect access to cached output list
and parameters.
Bug: 18410728.
Change-Id: Ia31283b1972d8865a46e84e63695173c187eb781
|
|\ \ \ \ \ \ \
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
A2DP when suspended." into lmp-mr1-dev
* commit 'bfa77b5c687f217e26267693306aaa6cc8a63672':
audio policy: do not prevent routing to A2DP when suspended.
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Allow A2DP sink selection even if A2DP is suspended.
It is not because use of A2DP is temporarily disabled by SCO
selection that the policy rule routing a given use case
to A2DP should be altered. The source will be routed to A2DP
but it will remain silent until suspend condition is cleared
which is the purpose of suspend mode.
Also make sure that accessibility prompts are audible while in call
by forcing stream type to STREAM_VOICE_CALL.
Fix inconsistent logic between AudioTrack::setStreamTypeFromAttributes()
and AudioPolicyManager::getStrategyForAttr()
Bug: 18095151.
Change-Id: I1c75dd8288ed3dd494eb942060eac9c9660dca50
|
|\ \ \ \ \ \
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
have atomic.h."
* commit '26d92768d6dac505903c96e842673ee9a57a0989':
No need to #include atomic-inline.h if you have atomic.h.
|