summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * [audio][audioflinger] Consume all frames when a DirectThread is done.Phil Burk2014-12-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug was causing movies to think there was still data left to play so they never finished. Bug: 18360054 Change-Id: If7aee81d62b7af8532abd14579677848a06fe2b1 Signed-off-by: Phil Burk <philburk@google.com>
* | | | am b279f5ad: am c49d9cda: am 2dda40d6: Merge "audio policy: add support for ↵Eric Laurent2014-12-101-1/+7
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | custom mixes" into lmp-mr1-dev * commit 'b279f5adfa2fd6f22c87b3a7106fbb62a0b9a5d2': audio policy: add support for custom mixes
| * | | am c49d9cda: am 2dda40d6: Merge "audio policy: add support for custom mixes" ↵Eric Laurent2014-12-101-1/+7
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | into lmp-mr1-dev * commit 'c49d9cda49dab8b7dd0376cf56476b3e1895d5c6': audio policy: add support for custom mixes
| | * | audio policy: add support for custom mixesEric Laurent2014-12-091-1/+7
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 900f6535: am 561f50de: am db995fe3: Merge "Fix getTimestamp if offload ↵Andy Hung2014-12-091-1/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | thread is not initialized." into lmp-mr1-dev * commit '900f6535af232298e4a77477907a40f68e8dc61b': Fix getTimestamp if offload thread is not initialized.
| * | am 561f50de: am db995fe3: Merge "Fix getTimestamp if offload thread is not ↵Andy Hung2014-12-081-1/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | initialized." into lmp-mr1-dev * commit '561f50de82ce47f11ba8d4f25db1ca1d8467b2a7': Fix getTimestamp if offload thread is not initialized.
| | * Fix getTimestamp if offload thread is not initialized.Andy Hung2014-12-031-1/+2
| | | | | | | | | | | | | | | | | | | | | Returns INVALID_OPERATION. Bug: 18605649 Change-Id: I440fb687fbf9249098e049982fa83bcd1515fd80
* | | am 121143d5: am bf14c62e: am 72bf901c: Merge "audio policy: new ↵Eric Laurent2014-11-261-4/+8
|\ \ \ | |/ / | | | | | | | | | | | | | | | getOutputForAttr() prototype." into lmp-mr1-dev * commit '121143d5242a790d0bd01fe1b9cec5d28a1ba1d7': audio policy: new getOutputForAttr() prototype.
| * | am bf14c62e: am 72bf901c: Merge "audio policy: new getOutputForAttr() ↵Eric Laurent2014-11-261-4/+8
| |\ \ | | |/ | | | | | | | | | | | | | | | prototype." into lmp-mr1-dev * commit 'bf14c62e7973ed793a3b00c2c67beca4484c1c7a': audio policy: new getOutputForAttr() prototype.
| | * audio policy: new getOutputForAttr() prototype.Eric Laurent2014-11-251-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 72215491: am 1a475921: am 223fd5c9: audio: new routing strategies and ↵Eric Laurent2014-11-261-5/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | stream types * commit '72215491c60fbcdb9a2f0be782e24e39cca249c5': audio: new routing strategies and stream types
| * | am 1a475921: am 223fd5c9: audio: new routing strategies and stream typesEric Laurent2014-11-261-5/+2
| |\ \ | | |/ | | | | | | | | | * commit '1a475921c0577a4650d1bbe40a85b732d1766939': audio: new routing strategies and stream types
| | * audio: new routing strategies and stream typesEric Laurent2014-11-211-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | am d48f1b68: am f50db74f: Merge "Fix format conversion in DuplicatingThread" ↵Glenn Kasten2014-11-211-8/+8
| |\ \ | | |/ | | | | | | | | | | | | | | | into lmp-mr1-dev * commit 'd48f1b68b2b824ffcfdbf6aa67ad4696020a8a11': Fix format conversion in DuplicatingThread
* | | am c63c0973: am f50db74f: Merge "Fix format conversion in DuplicatingThread" ↵Glenn Kasten2014-11-211-8/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into lmp-mr1-dev automerge: d48f1b6 * commit 'c63c09738772133e9b20a7c8576ad116ff855ee2': Fix format conversion in DuplicatingThread
| * \ \ am f50db74f: Merge "Fix format conversion in DuplicatingThread" into lmp-mr1-devGlenn Kasten2014-11-211-8/+8
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | | | | automerge: d48f1b6 * commit 'd48f1b68b2b824ffcfdbf6aa67ad4696020a8a11': Fix format conversion in DuplicatingThread
| | * Fix format conversion in DuplicatingThreadHaynes Mathew George2014-11-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | DuplicatingThread converts PCM data from the format of the source thread to PCM_16BIT before writing to all connected output tracks. This needs to be done just once before writing to all tracks. Bug: 18461844 Change-Id: If05254f87f9198e09a0fa3c4e857afbb53ae7073
| * | resolved conflicts for merge of e78a27ca to lmp-mr1-dev-plus-aospMarco Nelissen2014-11-171-1/+1
| |\ \ | | |/ | |/| | | | Change-Id: If10a9cc17245f95d5e10b1507445abbb4020670e
| | * Update calls to IInterface::asBinder()Marco Nelissen2014-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a Conflicts: media/libmedia/IAudioFlinger.cpp media/libmedia/IMediaPlayer.cpp media/libstagefright/CameraSource.cpp
* | | Update calls to IInterface::asBinder()Marco Nelissen2014-11-141-1/+1
| | | | | | | | | | | | | | | | | | to use the new static version. Change-Id: I89a5988a0ac694ffc04d88cf939e8455bf925d4c
* | | Include normal output track buffer depth in systraceGlenn Kasten2014-11-101-0/+21
| | | | | | | | | | | | | | | | | | Also log "second chance" sleeps Change-Id: I6e352948926c246002642a50c92af213e6b79040
* | | am ccfeadcd: audioflinger: fix duplicating thread output buffers clear ↵Eric Laurent2014-11-081-1/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | automerge: 02b5708 automerge: 8510932 * commit '8510932d6e5a1d4628c700fbff8f836abe470713': audioflinger: fix duplicating thread output buffers clear
| * | audioflinger: fix duplicating thread output buffers clearEric Laurent2014-11-071-1/+5
| |/ | | | | | | | | | | | | | | | | Also clear mix buffer in DuplicatingThread::threadLoop_mix() instead of just sink buffer when output threads are not ready. Bug: 18262127. Change-Id: I4c22bbeaccdcc8d7c10c5882dde3439eb73d6ede
* | Improve dumpsys for output threadsGlenn Kasten2014-10-221-7/+71
| | | | | | | | | | | | | | Display output thread type and flags. Also add units and use consistent spelling. Change-Id: I19eb627f41c4887b6ad0543024a8477a99890798
* | am 9f38361f: am 5cc72274: am d61ba0aa: am 36d9256f: am ac302143: Fix the fixMarco Nelissen2014-10-201-1/+3
|\ \ | |/ | | | | | | * commit '9f38361fa0ba8fe04b9ba7e21bf25abe20620800': Fix the fix
| * Fix the fixMarco Nelissen2014-10-201-1/+3
| | | | | | | | | | | | | | We need to clear the buffer a little more often. Bug: 18023017 Change-Id: If8a522b9133a4269e2435af8958f6ced322e71e9
* | am 412b8e71: am 0c2c1619: am 0cfc8f25: am 145a4c67: am 22bc10a3: Merge ↵Marco Nelissen2014-10-201-4/+3
|\ \ | |/ | | | | | | | | | | "Clear effect buffer before sending to chain" into lmp-dev * commit '412b8e719e77e6e3284b87fd8ae1499d6ae76e06': Clear effect buffer before sending to chain
| * Clear effect buffer before sending to chainMarco Nelissen2014-10-171-4/+3
| | | | | | | | | | | | | | | | otherwise the effect might get a buffer with previous data instead of silence. Bug: 18023017 Change-Id: Ic6be5ce0e74552aac2a0cce9c660893f9ad27f5c
* | am b17182d8: am 10b464cf: am 2b217bb3: Merge "audioflinger: fix pre ↵Eric Laurent2014-10-031-0/+4
|\ \ | |/ | | | | | | | | | | processing transfer between record threads." into lmp-dev * commit 'b17182d85f147a8d68bba2b4d7ed5e757691b4f4': audioflinger: fix pre processing transfer between record threads.
| * Merge "audioflinger: fix pre processing transfer between record threads." ↵Eric Laurent2014-10-031-0/+4
| |\ | | | | | | | | | into lmp-dev
| | * audioflinger: fix pre processing transfer between record threads.Eric Laurent2014-10-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix two problems remaining with pre processing effects transfer from one record thread to the next in case of tear down due to device connection: 1 - the enabled state of the effects was not communicated to the new HAL input stream. 2 - the effects saved in orphan chains list were not transfered to the new thread when a AudioRecord was created. Bug: 17757378. Change-Id: I0923c98470db3b51154dc89846157780a4c21e86
* | | am 12d0cd1b: am 3a8bad2e: am be9ebd46: Merge "Fix uncertainty of one normal ↵Glenn Kasten2014-10-031-0/+15
|\ \ \ | |/ / | | | | | | | | | | | | | | | mix buffer in AudioTrack::getTimestamp" into lmp-dev * commit '12d0cd1bf756ec96755fae2e573659898bfba6d6': Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
| * | Fix uncertainty of one normal mix buffer in AudioTrack::getTimestampGlenn Kasten2014-10-021-0/+15
| |/ | | | | | | | | | | | | | | | | | | The per-thread timestamp latch was not synchronized with the per-track released frames. Now the value of each track's released frames is latched along with the timestamp. Bug: 17531839 Bug: 17669342 Change-Id: I9d50c8c6a5de55a3f4561ac40e20d497376c1257
* | am 0e42a880: am e5095be1: am a49c94ea: Merge "Revert "Fix uncertainty of one ↵Glenn Kasten2014-10-021-13/+0
|\ \ | |/ | | | | | | | | | | normal mix buffer in AudioTrack::getTimestamp"" into lmp-dev * commit '0e42a8807edec5541ecac4a050459fbb72c477dc': Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"
| * Merge "Revert "Fix uncertainty of one normal mix buffer in ↵Glenn Kasten2014-10-011-13/+0
| |\ | | | | | | | | | AudioTrack::getTimestamp"" into lmp-dev
| | * Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"Glenn Kasten2014-10-011-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 54464ba861aaafd11ee5645f5d1ecd1171c6e9fe. Bug: 17733142. Change-Id: I9886d40032b2f7d96bee03e600e14f78943d8052
* | | am 785da8f5: am 955e24d3: Merge "Fix uncertainty of one normal mix buffer in ↵Glenn Kasten2014-10-011-0/+13
|\ \ \ | |/ / | | | | | | | | | | | | | | | AudioTrack::getTimestamp" into lmp-dev * commit '785da8f542120e49d29289947e69aba180c1724b': Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
| * | Merge "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp" ↵Glenn Kasten2014-09-301-0/+13
| |\ \ | | |/ | | | | | | into lmp-dev
| | * Fix uncertainty of one normal mix buffer in AudioTrack::getTimestampGlenn Kasten2014-09-301-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The per-thread timestamp latch was not synchronized with the per-track released frames. Now the value of each track's released frames is latched along with the timestamp. Bug: 17531839 Bug: 17669342 Change-Id: I96252782911bd42a2534cc4030521b7eeb99a7b9
* | | am e0270e79: am f71224ce: Merge "audioflinger: forward flush to direct ↵Eric Laurent2014-10-011-1/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | output streams" into lmp-dev * commit 'e0270e79066825bb232ef5f271ac9ef84ce91b0f': audioflinger: forward flush to direct output streams
| * | Merge "audioflinger: forward flush to direct output streams" into lmp-devEric Laurent2014-09-301-1/+10
| |\ \
| | * | audioflinger: forward flush to direct output streamsEric Laurent2014-09-291-1/+10
| | |/ | | | | | | | | | | | | | | | | | | | | | Track flush should be forwarded to the audio HAL when playing on a direct output stream. Bug: 17704953. Change-Id: Iafc94327fe9aebf1d4eaa97b76c6767b7ac5babe
* | | am 00cd942e: am 4379c034: Merge "Fix tee sink" into lmp-devGlenn Kasten2014-09-301-3/+5
|\ \ \ | |/ / | | | | | | | | | * commit '00cd942ebe4bf675cad1fbba0d09ba36e419b017': Fix tee sink
| * | Fix tee sinkGlenn Kasten2014-09-281-3/+5
| |/ | | | | | | | | | | | | Note: this does not fix the bug below, but it helps to investigate the bug. Bug: 17578238 Change-Id: I0fd27a477b73ba0e1c5a658bdfad17c500f5dc67
* | am 589e1241: am 2720c8c4: Merge "audioflinger: remove debug log." into lmp-devEric Laurent2014-09-171-2/+0
|\ \ | |/ | | | | | | * commit '589e12415e10e291d48c19f63cb47193eb613fb0': audioflinger: remove debug log.
| * audioflinger: remove debug log.Eric Laurent2014-09-171-2/+0
| | | | | | | | | | | | | | Remove debug log left by commit ab5cdbaf. bug: 17537746. Change-Id: I10f672f607f8e87caaa8228fc05eff8aee7dfa15
* | am f5e98702: am cf7863ea: Merge "audioflinger: fix pre processing effect ↵Eric Laurent2014-09-161-17/+3
|\ \ | |/ | | | | | | | | | | leak" into lmp-dev * commit 'f5e9870228db68d9cb927ff49f2e46dabfb7bbec': audioflinger: fix pre processing effect leak
| * audioflinger: fix pre processing effect leakEric Laurent2014-09-151-17/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a capture thread was closed, the effects attached to this thread were left dangling and the associated effect chain destroyed. When their last client was disconnected, the effects were not released properly from the effect library because the destruction process could not be completed without the effect being attached to a thread. A similar problem prevented a RecordTrack to be properly released if its client was destroyed after the capture thread. The fix consists in allowing the effect or record track to be properly released even if its parent thread cannot be promoted. Also save any effect chain still present on a closed capture thread in case a new client wants to reuse the effects on the same session later. Bug: 17110064. Change-Id: I5cd644daa357afd1f3548f9bcb28e6152d95fdb8
* | am b12d6a17: am 62ce2072: Merge "Make IPowerManager native conform to .aidl ↵Glenn Kasten2014-09-081-4/+8
|\ \ | |/ | | | | | | | | | | for oneway" into lmp-dev * commit 'b12d6a17d33141789c974e3bd3eacfcb0be1c1e3': Make IPowerManager native conform to .aidl for oneway
| * Make IPowerManager native conform to .aidl for onewayGlenn Kasten2014-09-051-4/+8
| | | | | | | | | | | | | | | | But provide a temporary escape hatch for AudioFlinger. This oneway option will be removed as soon as possible. Bug: 16408906 Change-Id: I058a50906af810787e444a96819cb781b7f639ad