summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Allow 8 channels in RecordThreadAndy Hung2015-05-051-3/+1
| | | | | | | | | | | | Change-Id: I738d4975188695e568015e1bc64d160550e958f5
* | | audio flinger: fix fuzz test crashEric Laurent2015-05-081-1/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear output stream pointer in duplicating thread when the main output to which it is attached is closed. Also do not forward master mute and volume commands to duplicating threads as this is not applicable. Also fix logic in AudioFlinger::primaryPlaybackThread_l() that could accidentally return a duplicating thread. This never happens because the primary thread is always first in the list. Bug: 20731946. Change-Id: Ic8869699836920351b23d09544c50a258d3fb585
* | Implement audio device callbackEric Laurent2015-05-061-0/+8
|/ | | | | | | | | | | | | | | | | | | | Add class AudioSystem::AudioDeviceCallback notifying AudioSystem clients upon device selection change on a given input or output thread. Maintain a list of installed callback per I/O handle in AudioSystem and call registered callbacks when an OPEN of CONFIG_CHANGED event is received on IAudioFlingerClient::ioConfigChanged(). Add methods to AudioTrack and AudioRecord to add and remove device change callbacks. Add methods to AudioTrack and AudioRecord to query currently selected device. ioConfigChanged() events now convey the audio patch describing the input or output thread routing. Fix AudioRecord failure to start when invalidation is handled by start(). Change-Id: I9e938adf025fa712337c63b1e02a8c18f2a20d39
* Merge "AudioTrack: fix direct tracks not pausing" into mnc-devPhil Burk2015-05-021-8/+9
|\
| * AudioTrack: fix direct tracks not pausingPhil Burk2015-05-011-8/+9
| | | | | | | | | | | | | | | | | | | | When a Direct Track is paused and the HAL does not support pause() and resume() then the HW never gets paused. The app can just keep writing data, which gets played. Bug: 18899620 Change-Id: Ice0f360956ff7ca425f6f24a0a2a8640d8b43fa8 Signed-off-by: Phil Burk <philburk@google.com>
* | AudioSystem: refactor audio config cache and callbacksEric Laurent2015-05-011-38/+34
|/ | | | | | | | | | | | | | | Clean up implementation of audio configuration cache and callback events from AudioFlinger: - Define class AudioIoDescriptor for audio input and output configurations outside of AudioSystem class. - Do not use void * but an AudioIoDescriptor as argument to audio config callbacks from AudioFlinger. - Remove unused configuration events. - Move AudioSystem audio input and output cache from static singletons to members of AudioFlingerClient subclass. Change-Id: I67c196c32c09ce2756af0755ee1fe631040c3270
* PatchPanel: do not use setParameters() internally.Eric Laurent2015-04-281-36/+169
| | | | | | | | | | | | | | Do not use setParameters() with AUDIO_PARAMETER_STREAM_ROUTING when communicating the input or output device selected to playback or record threads, even for HAL version less than 3.0. Use createAudioPatch()/releaseAudioPatch() instead. This allows to send more information on the output or input device being selected. Also fix a regression introduced in L where the output device selection was not communicated to effects on record threads. Change-Id: I4780ada53241d56694b005c992171e173c3bf8f5
* Add floating and multichannel record to AudioFlingerAndy Hung2015-04-221-67/+144
| | | | Change-Id: Ia388fb012a0b6d81613ef87142a97d76836338f9
* Merge "Make record buffer in RecordThread variable format"Andy Hung2015-04-221-8/+8
|\
| * Make record buffer in RecordThread variable formatAndy Hung2015-04-211-8/+8
| | | | | | | | Change-Id: Id4bb9b973eeea16946fba3bc084c7ac270d9fa33
* | Use AudioPlaybackRate to hold TimestretchBufferProvider parametersRicardo Garcia2015-04-221-8/+4
|/ | | | | | | | Use this struct to handle the parameters for TimestretchBufferProvider all across the system. Add stretch mode and fallback mode to TimestretchBuffer Provider. Change-Id: I19099924a7003c62e48bb6ead56c785cb129fba2
* Add playback rate to AudioTrackAndy Hung2015-04-091-16/+29
| | | | | Bug: 19196501 Change-Id: I6411e1d3ce652b711a71a6d9df020cb5f60d4714
* Enable 8 bit and float pcm record formats for AudioFlingerAndy Hung2015-04-081-0/+13
| | | | | | | Update sampling rate handling as well. Bug: 19570772 Change-Id: I872248e64c0578b2e48869a68fee0d51bd0640c3
* Improve ResamplerBufferProviderAndy Hung2015-04-081-28/+56
| | | | Change-Id: I3cc3af221ad5797ff219d75227350733afa180db
* Add RecordBufferConverter for RecordThread data processingAndy Hung2015-04-081-112/+193
| | | | Change-Id: Ia3aab8590cd41e8a7cba0a7345d70d2866d92045
* audio flinger: fix standby on output with HW A/V syncEric Laurent2015-04-011-2/+12
| | | | | | | | | | Fix a bug in audio HAL pause logic on output threads with HW A/V sync preventing the HAL to enter standby when the audio track is stopped and detroyed. Bug: 19980184. Change-Id: Ia497dad23159038b447fcbc18a67bb61b70b79cc
* Merge "AudioFlinger: call SPDIF wrapper from AudioFlinger"Phil Burk2015-03-241-17/+13
|\
| * AudioFlinger: call SPDIF wrapper from AudioFlingerPhil Burk2015-03-241-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Create an interface layer between the AudioFlinger and the HAL that manages the wrapping and format conversion. Removed unnecessary includes. Handle rate conversion in getRenderPosition(). Try to open HAL with encoded format before wrapping with SPDIF. Bug: 17566660 Change-Id: I00ad888ca15ff0f85b85efb8167c7f5ea761a244 Signed-off-by: Phil Burk <philburk@google.com>
* | AudioRecord TRANSFER_OBTAIN can be used with FAST flagGlenn Kasten2015-03-231-2/+3
|/ | | | Change-Id: I001ba1a88150dddf79d99baf5927f31799745eef
* Fix typosGlenn Kasten2015-03-231-1/+1
| | | | | | | | Fix typos in comments Add formal parameter name to declaration where it was missing Fix out of order comments Change-Id: I1de81ae82af5ca507864e4c7b959111bac898b98
* Merge "Initial implementation of fast capture dump"Glenn Kasten2015-03-191-0/+4
|\
| * Initial implementation of fast capture dumpGlenn Kasten2015-03-061-0/+4
| | | | | | | | Change-Id: I898d903e539f760ef7caa80f41ca21c223f67264
* | Merge "Allow TRANSFER_OBTAIN to be used for fast tracks"Glenn Kasten2015-03-091-2/+3
|\ \ | |/ |/|
| * Allow TRANSFER_OBTAIN to be used for fast tracksGlenn Kasten2015-03-091-2/+3
| | | | | | | | Change-Id: I8fa20c26f076567b38210af4a680fe1cb2eacee4
* | Dump generic information first for each threadGlenn Kasten2015-03-061-7/+6
| | | | | | | | | | | | also mBufferSize was already being displayed as part of dumpBase Change-Id: I17f3062fcc076c594b5fd6b8fca286b27067e07c
* | Display more fields in thread dumpBaseGlenn Kasten2015-03-061-0/+4
|/ | | | Change-Id: Ice15e999dda2f6cf9d23685ade4a87f74180322d
* Rename mName to mThreadName and kNameLength to kThreadNameLengthGlenn Kasten2015-03-061-12/+13
| | | | Change-Id: I0adfcdcab7923a07a840ec0e04528cb8bfc41f10
* WhitespaceGlenn Kasten2015-03-061-13/+13
| | | | | | switch indent Change-Id: I652c798dd37a80634d247c4d881fb1cce92c4bd6
* Add devicesToString, inputFlagsToString, and sourceToStringGlenn Kasten2015-03-061-1/+102
| | | | Change-Id: I0c09d76c204ffc5579f62d2ed1faef07922a5962
* Fix typo in string tableGlenn Kasten2015-03-051-1/+1
| | | | Change-Id: Iaf3d3c77129c62cf3dcad21fc754f390eb43b28e
* Pull up increaseSamplingN and kSamplingNforLowRamDeviceGlenn Kasten2015-03-031-3/+3
| | | | | | | from FastMixerDumpState to FastThreadDumpState, and remove unused parameter from FastMixerDumpState constructor. Change-Id: Ib8937b106622a8da28a6ef6043de4528ae82cb05
* Remove redundant semicolon from namespace closingGlenn Kasten2015-03-031-1/+1
| | | | Change-Id: I163f9d3d216c283ae1160ce4802e5247cf44fba7
* Fix compile error if FAST_THREAD_STATISTICS not definedGlenn Kasten2015-03-021-0/+2
| | | | Change-Id: I3a4ac558e61ad956a7a6e325534e722066e49b2f
* Merge "Change AudioTrack resampling buffers from 3 to 2"Andy Hung2015-02-281-19/+12
|\
| * Change AudioTrack resampling buffers from 3 to 2Andy Hung2015-02-061-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Move computation of minimum AudioTrack buffer size to server for normal streaming PCM tracks. Use server-side computation to exactly determine requirements for the resampler to avoid triple buffering. This reduces latency for normal audio tracks that require resampling, and makes things consistent with the minimum buffer size. Change-Id: I2f2ca0e599ee20e16559bc5c5dab61ed100da16c
* | Include what you useGlenn Kasten2015-02-191-0/+2
|/ | | | Change-Id: I1967861f383bb5ed6743fb69e3bd439907ed7033
* Merge "Update duplicating thread to use float audio"Andy Hung2015-01-171-0/+22
|\
| * Update duplicating thread to use float audioAndy Hung2015-01-151-0/+22
| | | | | | | | | | | | Previously device format was used, typically pcm 16 bit. Change-Id: I70a8b594820e948a2caa299194807ec17348b0e9
* | Merge "Allow duplicating thread to use native mixing audio format"Andy Hung2015-01-161-22/+26
|\ \ | |/
| * Allow duplicating thread to use native mixing audio formatAndy Hung2015-01-151-22/+26
| | | | | | | | | | | | | | Update OutputTrack to take variable formats. Previously conversion to AUDIO_FORMAT_PCM_16_BIT was required. Change-Id: I4a96a60ddd8d8dfe651405a0bcd4f98c89bc1ade
* | am 69158e3e: am 6ab33981: am 610255e8: Merge "audioflinger: pause HW A/V ↵Eric Laurent2015-01-071-5/+10
|\ \ | |/ |/| | | | | | | | | sync output when AudioTrack underruns" into lmp-mr1-dev * commit '69158e3e7b565a5ca131a2efaa9b76615ca80cbb': audioflinger: pause HW A/V sync output when AudioTrack underruns
| * am 6ab33981: am 610255e8: Merge "audioflinger: pause HW A/V sync output when ↵Eric Laurent2015-01-071-5/+10
| |\ | | | | | | | | | | | | | | | | | | AudioTrack underruns" into lmp-mr1-dev * commit '6ab33981d45cd69e683a143fec6530e66bd3e371': audioflinger: pause HW A/V sync output when AudioTrack underruns
| | * audioflinger: pause HW A/V sync output when AudioTrack underrunsEric Laurent2014-12-191-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not standby, starve or feed 0s to the audio HAL on direct output using HW A/V sync mode. Bug: 17883772. Change-Id: I11e6c97ec24360d75f9b602814d40a54b60cb7a7
* | | Line length 100Glenn Kasten2014-12-301-3/+4
| | | | | | | | | | | | Change-Id: I6c8fe626a3825fa9e139319656d682a57b887c97
* | | am 85aca658: am d33712d7: am 145cf5d8: Merge "audioflinger: implement ↵Eric Laurent2014-12-171-21/+106
|\ \ \ | |/ / | | | | | | | | | | | | | | | pause/resume for direct outputs" into lmp-mr1-dev * commit '85aca658ac7d20584b0647427256df50a5f243ef': audioflinger: implement pause/resume for direct outputs
| * | am d33712d7: am 145cf5d8: Merge "audioflinger: implement pause/resume for ↵Eric Laurent2014-12-171-21/+106
| |\ \ | | |/ | | | | | | | | | | | | | | | direct outputs" into lmp-mr1-dev * commit 'd33712d7ec5dcf427cc0be9b7d2ca1c99823c8e6': audioflinger: implement pause/resume for direct outputs
| | * audioflinger: implement pause/resume for direct outputsEric Laurent2014-12-161-21/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 2592184c: am 6baa8fe7: am 94a92c69: Merge "[audio][audioflinger] Consume ↵Phil Burk2014-12-111-2/+7
|\ \ \ | |/ / | | | | | | | | | | | | | | | all frames when a DirectThread is done." into lmp-mr1-dev * commit '2592184c976ef83aa9fdad7d63bfdb408c95aa7d': [audio][audioflinger] Consume all frames when a DirectThread is done.
| * | am 6baa8fe7: am 94a92c69: Merge "[audio][audioflinger] Consume all frames ↵Phil Burk2014-12-111-2/+7
| |\ \ | | |/ | | | | | | | | | | | | | | | when a DirectThread is done." into lmp-mr1-dev * commit '6baa8fe747621b7121ff18dcdfab15d99c349c15': [audio][audioflinger] Consume all frames when a DirectThread is done.
| | * Merge "[audio][audioflinger] Consume all frames when a DirectThread is ↵Phil Burk2014-12-111-2/+7
| | |\ | | | | | | | | | | | | done." into lmp-mr1-dev