| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
| |
Just get the parameter on server side
Change-Id: I433a63104dbb257e0d862be2ab61847cb36d1c15
|
|
|
|
|
|
|
| |
If ever needed again, it could be implemented on client side by forcing
a track volume of 0.
Change-Id: I88a9b4f675b6dca2948549414f9ec2c192d29269
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Audioflinger.cpp and Audioflinger.h files must be split to
improve readability and maintainability.
This CL splits the files as follows:
AudioFlinger.cpp split into:
- AudioFlinger.cpp: implementation of IAudioflinger interface and global methods
- AFThreads.cpp: implementation of ThreadBase, PlaybackThread, MixerThread,
DuplicatingThread, DirectOutputThread and RecordThread.
- AFTracks.cpp: implementation of TrackBase, Track, TimedTrack, OutputTrack,
RecordTrack, TrackHandle and RecordHandle.
- AFEffects.cpp: implementation of EffectModule, EffectChain and EffectHandle.
AudioFlinger.h is modified by inline inclusion of header files containing
the declaration of complex inner classes:
- AFThreads.h: ThreadBase, PlaybackThread, MixerThread, DuplicatingThread,
DirectOutputThread and RecordThread
- AFEffects.h: EffectModule, EffectChain and EffectHandle
AFThreads.h includes the follownig headers inline:
- AFTrackBase.h: TrackBase
- AFPlaybackTracks: Track, TimedTrack, OutputTrack
- AFRecordTracks: RecordTrack
Change-Id: I512ebc3a51813ab7a4afccc9a538b18125165c4c
|
|
|
|
|
|
|
|
| |
Channel count is uint32_t.
Remove redundant mask parameter to AudioTrack::createTrack_l()
and AudioRecord::openRecord_l().
Change-Id: I5dc2b18eb609b2c0dc3091994cbaa4628062c17f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Rename correctLatency since it requires thread to be locked.
Use size_t for byte and frame counts.
Change-Id: I178fdd18bdb823813b9563927bdff8c0d28ca5a5
|
|/
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TrackBase::mFrameSize, mChannelMask, and mChannelCount are now const.
Use TrackBase::mFrameSize instead of re-calculating frame size.
AudioFlinger only sees 16-bit PCM format, conversion from 8-bit is
now entirely on the client side. Previously a small part of the
responsibility was on server side also.
size_t is unsigned, so use %u in logs.
Fix theoretical bug where TrackBase constructor was over-allocating space
for non-linear AudioTrack or 8-bit PCM AudioRecord (probably benign).
Change-Id: I7cbbba0bf4dba29ea751d8af341ab8e5cbbdc206
|
|
|
|
| |
Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
|
|
|
|
| |
Change-Id: I85d7d2f6381b251db5695202fec75128883a8662
|
|
|
|
|
|
|
| |
This prepares for adding a new field TrackBase::mFrameCount
with a different meaning.
Change-Id: I6bbe2c59f2a882be57caeec2e2e06f439a0e9e83
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This is part of a series to clean up the control block.
Change-Id: Ic881a3560d9547cb63fcc0cefec87aa3da480e0d
|
|
|
|
| |
Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
|
|
|
|
| |
Change-Id: I4f5e95a5ddf016530d1b2747a0a5ca0962caabda
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I47d688a9c10c4c3c868accc34102fb402ebcac62
|
|/
|
|
| |
Change-Id: I8ffca0460195263d159aa13015c246122d8556a2
|
|
|
|
|
|
|
|
|
|
| |
An output can only be closed if there is no lock contention that
prevents ThreadBase::exit() from being blocked. If an output
device is waiting for an operation to complete (here a write
in the remote_submix module, because the pipe is full), signal
the module that it's entering the "exiting" state.
Change-Id: I8248add60da543e90c25a4c809866cdb26255651
|
|
|
|
|
| |
Bug: 6635041
Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
The audio downmixer effect might need the audio session Id, pass it
from the track creation in AudioFlinger to the downmix effect
creation in AudioMixer.
Change-Id: I5e29540542ae89cf4a0cdb537b3e67f04442a20a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ThreadBase class now has a separate member for input
and output devices (mInDevice, mOutDevice).
Only query get_supported_devices() from audio HAL if the function
is exposed and if the audio policy manager did not specify the
audio module to open.
Also fixed bug in AEC preprocessing that would reset
to default output device when an input device was given.
Change-Id: I19d4d06aeb920b068e3ef31e6e6be6345ce5d67a
|
|
|
|
|
|
|
|
| |
Added support for EFFECT_CMD_SET_AUDIO_SOURCE audio effect
command to inform preprocessings of current audio source
selection for capture.
Change-Id: Ib2418a9aa8114e8457fe828ecd43b230ed86cdd6
|
|
|
|
| |
Change-Id: Ie7504d0ddb252f7e4d4f99ed0b44cfc7b1049816
|
|
|
|
|
|
|
|
|
|
| |
libnbaio is now a separate shared library from AudioFlinger, rather
than a static library used only by AudioFlinger.
AudioBufferProvider interface is now also independent of AudioFlinger,
moved to include/media/
Change-Id: I9bb62ffbc38d42a38b0af76e66da5e9ab1e0e21b
|
|
|
|
| |
Change-Id: I92e32ee16274c032c9d0ce910676be2a7fa52471
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 93d906837e0e89aa1d9c913ab2b531b809f9bb9e)
> AudioFlinger: Better handling for master volume/mute
>
> Changes to address bug 6842827.
>
> When a HAL is loaded, cache whether or not the HAL supports
> set_master_volume/mute in the AudioHwDevice structure. Store an
> AudioHwDevice in AudioStream(In|Out) structures instead of just an
> audio_he_device_t. This give threads (PlaybackThreads in
> particular) access to the cached capabilities.
>
> When setting master volume/mute, change the system to always set the
> setting on all HAL which support it and also to set the setting on all
> PlaybackThreads. Change PlaybackThreads to apply the setting at the
> in SW mix stage of the pipeline if its assigned HAL does not support
> the setting, or to ignore the setting of the assigned HAL does support
> it.
>
> Change-Id: Ia14137a30b4c3ee6f2d7ddcc8cba87bf5eec87f4
> Signed-off-by: John Grossman <johngro@google.com>
Change-Id: Icb6bc13764e100a2003eb1dee2231132ab287d98
Signed-off-by: John Grossman <johngro@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 91de9b56282d126ffb36344266af5fee3cefcfdd)
> Change audio flinger to user HAL master mute if available
>
> Hand merge from ics-aah
>
> > Change audio flinger to user HAL master mute if available: DO NOT MERGE
> >
> > Replicate the pattern used for HAL master volume support to make use
> > of master mute support if the HAL supports it. This is part of the
> > change needed to address bug 6828363. Because of the divergences
> > between ICS and master, this change will need to be merged by hand.
> >
> > Signed-off-by: John Grossman <johngro@google.com>
> > Change-Id: I6d83be524021d273d093bcb117b8f2fe57c23685
>
> Change-Id: I32280582905c969aaec2bb166ec5c61df82d737a
> Signed-off-by: John Grossman <johngro@google.com>
Change-Id: I5cd709187221d307fe25c5117ccaadca5f6b197b
Signed-off-by: John Grossman <johngro@google.com>
|
|
|
|
|
|
|
|
| |
Replace single mTrack by vector mTracks.
Destroy record tracks similarly to playback tracks.
Dump all record tracks, in addition to the active record track.
Change-Id: I503f10b51928b6b92698fe1c51a9ddd3215df1f4
|
|
|
|
|
|
|
|
| |
Document where int is used instead of AudioSystem::sync_event_t
(probably because of a header file dependency).
TrackBase::start() and RecordTrack::start() don't need default parameters.
Change-Id: I82f4a4d078be900f3aa4bd926697e32f5ed68ec8
|
|
|
|
|
|
| |
Also move initial standby from to threadLoop to avoid a race condition.
Change-Id: I65afca83c36fb41b983b3b1d3dab35d4029560e3
|
|
|
|
| |
Change-Id: I885b169f4b176a6b5c2ca9a534214b4ffff1700e
|
|
|
|
| |
Change-Id: Iad008f20d35a18acf500f773900164552fd0c19e
|
|
|
|
| |
Change-Id: Id0ac1915f57fef4a938c7f90989c1162a8b6c51c
|
|
|
|
|
|
| |
Only the IAudioFlinger::dump() needs to return a status_t.
Change-Id: Iffeb2a7db4846df850b6b2ed960276f1fd75dba0
|
|
|
|
| |
Change-Id: Id0ace02ca6f480a6c46e11880acf6cdc66d83184
|
|
|
|
|
|
| |
The result of calling virtual methods from a destructor is undefined.
Change-Id: I0fd4a19626e5ae564a60b753315b5f6c4b8d1f2c
|
|
|
|
|
|
|
| |
There was a theoretical but unlikely race if two binder threads
executed suspend() or restore() concurrently. Also added comments.
Change-Id: I0908acc810b83bdd66455b27ca3429de1662a2cd
|
|
|
|
|
|
| |
Not yet implemented
Change-Id: I35523fb15ad71727ecc9f4bb870f07e4b7397dc4
|
|
|
|
| |
Change-Id: If22a6c4e572b0734eba0c5a7ce29a2c61c581e5d
|
|
|
|
|
|
| |
Add comments and rename one method for clarity
Change-Id: I04a9147e46e88a072256c0211b112d52202419e2
|
|
|
|
|
|
|
|
|
|
| |
Use it in AudioSystem::getOutput(), AudioSystem::getInput(),
IAudioPolicyService::getOutput(), IAudioPolicyService::getInput(),
and various other places in AudioFlinger.
Not done: AudioTrack and OutputDescriptor.
Change-Id: I70e83455820bd8f05dafd30c63d636c6a47cd172
|
|
|
|
|
|
| |
and add acquire load at the read
Change-Id: Ib41a58f5b1f6af87a8bd63d3f77d2ec0e48cb479
|
|
|
|
| |
Change-Id: I386ba27b2305a397aba70331c6bf0d35ea727cf6
|
|
|
|
| |
Change-Id: I424052b4ff9218147a5cfc8e6dcd67fe8105d229
|