summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | am 190313ec: am 65e8d62a: Merge "Fixed sample video corrupted in MediaCodec ↵Edwin Wong2012-07-131-17/+12
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | mode." into jb-dev * commit '190313ec68e81c10d200ff3c20ac152cf90760d6': Fixed sample video corrupted in MediaCodec mode.
| * | am 65e8d62a: Merge "Fixed sample video corrupted in MediaCodec mode." into ↵Edwin Wong2012-07-131-17/+12
| |\ \ | | |/ | |/| | | | | | | | | | | | | jb-dev * commit '65e8d62a5b243518795cdafa498df4a49baf6940': Fixed sample video corrupted in MediaCodec mode.
| | * Fixed sample video corrupted in MediaCodec mode.Edwin Wong2012-07-131-17/+12
| | | | | | | | | | | | | | | Change-Id: I50c5660072d40f6e297e58fd026ea04c89d6a70a related-to-bug: 6732061
* | | AudioRecord client threading cleanupGlenn Kasten2012-07-131-55/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | getMinFrameCount error handlingGlenn Kasten2012-07-132-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Remove dead code in libmedia"Glenn Kasten2012-07-132-18/+0
|\ \ \
| * | | Remove dead code in libmediaGlenn Kasten2012-07-122-18/+0
| | | | | | | | | | | | | | | | Change-Id: I7d8201590cda29c9fa99662a4fdba222091febfe
* | | | Add tid parameter to IAudioFlinger::openRecordGlenn Kasten2012-07-122-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Not yet implemented Change-Id: I35523fb15ad71727ecc9f4bb870f07e4b7397dc4
* | | | Simplify AudioRecord::getInputFramesLost()Glenn Kasten2012-07-121-4/+2
|/ / / | | | | | | | | | | | | | | | This also fixes a benign race in reading mActive without a lock. Change-Id: I19e953d4f275e5c266ca1ca3fece7b6c02ad1707
* | | Use audio_channel_mask_t more placesGlenn Kasten2012-07-102-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Move declarations of local variables to first use"Glenn Kasten2012-07-101-1/+1
|\ \ \
| * | | Move declarations of local variables to first useGlenn Kasten2012-06-211-1/+1
| |/ / | | | | | | | | | Change-Id: I48b193a742b32b6746aa938b84dc405124a6a5c3
* | | Use audio_channel_mask_t more consistentlyGlenn Kasten2012-07-033-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Remove acoustics from AudioSystem::getInput()Glenn Kasten2012-06-253-9/+1
| | | | | | | | | | | | Change-Id: I29fb3ee5664c1f0ee0409c1bb2be087ecca637db
* | | Use audio_channel_mask_t in AudioRecordGlenn Kasten2012-06-251-4/+4
| | | | | | | | | | | | Change-Id: I9e1b918b2635d961604a4a9d88eb1c7179a167a7
* | | Include what you useGlenn Kasten2012-06-251-17/+7
| | | | | | | | | | | | Change-Id: I12ef9367d05dbe069c037b1b4acd6347a8cf3ece
* | | Remove AudioRecord record_flagsGlenn Kasten2012-06-221-6/+3
|/ / | | | | | | Change-Id: I021ddcc1bcb63132a4597d13e3d09db2a5f2c628
* | am 192cbbad: Fix audio track pause.Eric Laurent2012-06-141-0/+1
|\ \ | |/ | | | | | | * commit '192cbbad773979a6fe3b5a0c223356de4fc3309c': Fix audio track pause.
| * Fix audio track pause.Eric Laurent2012-06-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | AudioTrack::pause() should signal the control block condition to release threads waiting for available buffers in obtainBuffer(). Otherwise the behavior relies on the timout on the condition or the fact that audioflinger will mix a new audio buffer while executing the pause. Bug 6653769. Change-Id: I5f8f73c471fe306070f30b814f32fd4b4dc1d575
* | am 49dd5cf3: Merge "Log track name on obtain/releaseBuffer warnings" into jb-devGlenn Kasten2012-06-141-3/+3
|\ \ | |/ | | | | | | * commit '49dd5cf3469cd755321f8ec10013ad4fcfaf723d': Log track name on obtain/releaseBuffer warnings
| * Log track name on obtain/releaseBuffer warningsGlenn Kasten2012-06-131-3/+3
| | | | | | | | | | | | | | This should help diagnose problems by allowing us to correlate the logs with the dumpsys media.audio_flinger output. Change-Id: I8c7c592b4f87d13b0f29c66ce7a2f301a0f063c9
* | am 28ed2f93: Reduce underruns in screen off, esp. with EQGlenn Kasten2012-06-081-0/+1
|\ \ | |/ | | | | | | * commit '28ed2f93324988767b5658eba7c1fa781a275183': Reduce underruns in screen off, esp. with EQ
| * Reduce underruns in screen off, esp. with EQGlenn Kasten2012-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add MonoPipe APIs to specify setpoint. Use screen state to configure pipe setpoint. Fix a long-standing bug where pipe sleep time was excessive, which interacted poorly with governor and low clock frequencies. Now it deducts the elapsed time since last write(), which was significant when there was EQ and low clock frequency. Bug: 6618373 Change-Id: I6f3b0072c2244aeb033ef0795ad164491a164ff5
* | am 27d33134: Merge "Do not keep audio wake lock when apps underrun." into jb-devEric Laurent2012-05-311-14/+24
|\ \ | |/ | | | | | | * commit '27d33134130379cc91d936cdc742700311901a9d': Do not keep audio wake lock when apps underrun.
| * Do not keep audio wake lock when apps underrun.Eric Laurent2012-05-311-14/+24
| | | | | | | | | | | | | | | | | | Do not automatically restart an AudioTrack after an underrun if the callback is executed but no data is written by the app. Bug 6541286. Change-Id: I11e7ab8dc968d7ff087058fec68f44490d3a7731
* | libmedia: Fix build with gcc 4.7Bernhard Rosenkraenzer2012-05-241-3/+3
|/ | | | | | | | | | | gcc 4.7 doesn't like the redefinition of n in the same scope: for(size_t n=...;;) { size_t n = 2; // <-- duplicate definition } Change-Id: Idfc2e768a0eb85a3dacccd3431b4ad44775432a4 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
* Fix issues with synchronous record start.Eric Laurent2012-05-142-1/+7
| | | | | | | | | | | | | | | | - 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
* Don't allow AudioTrack frameCount to decreaseGlenn Kasten2012-05-031-1/+11
| | | | | | | | | | | | | | | This is a workaround for bug that client can cache return value of frameCount(), and is not notified when this value changes due to automatic re-recreation of the underlying IAudioTrack. A better long-term fix would be to notify clients when these kinds of parameters change, and to fix assumptions in client code that they are constant (e.g. in SoundPool and maybe obtainBuffer). Also, once a fast track request is denied, don't request it again. Bug: 6431187 Change-Id: I55b4ff30bbd9ed3a402e39452a38de52cdea53a9
* Fix race in AudioTrack destructionGlenn Kasten2012-05-021-1/+1
| | | | | Bug: 6427369 Change-Id: Id3b4487406235b881f6f0b4b95c5a02a9b797e75
* Disable fast track log spamGlenn Kasten2012-05-011-2/+2
| | | | | | except for "denied by client" and "denied by server" Change-Id: I133ab747933729cc1f386813ee06ece055bdb294
* Enable fast track for SoundPoolGlenn Kasten2012-05-011-1/+1
| | | | Change-Id: Ia80b3a7738e4c5dbe2bd5b0f55f0ca49943e2f64
* Re-enable fast track for ToneGeneratorGlenn Kasten2012-04-301-1/+1
| | | | Change-Id: If4152169778df124c750dc45023322ee23c80587
* Added support for HE-AAC recordingDave Burke2012-04-301-1/+2
| | | | | | | | | Fixed bug in decoder related to sample rates / channel counts Made decoder follow Fraunhofer pattern Log if bitrate not available Bug: 6275957 Change-Id: I47a8e29358fa4a88ebc73fe02d46a2bfb96c64fe
* Add Fraunhofer AAC encoder with AAC-ELD support.Dave Burke2012-04-251-3/+4
| | | | Change-Id: I6cd499d257d72f50a5b508bed97796a591a51506
* Move frame count calculations for fast tracksGlenn Kasten2012-04-251-44/+84
| | | | | | | | | | | | | | | | | | | | | For fast tracks: move the default and minimum frame count calculations from client to server. If accepted, the default and minimum frame count is the fast mixer (HAL) frame count. If denied, the default and minimum frame count is the same as it currently is for normal tracks. For normal tracks: there is no change yet, preserve legacy behavior for now but add a FIXME to change this later. Bug fix: the test for buffer alignment matches channelCount was wrong. Bug fix: check for 8-bit data in shared memory, which isn't supported. Optimizations: - in set(), only call AudioSystem::getOutputSamplingRate() when needed - in createTrack_l(), only call AudioSystem::getSamplingRate() and AudioSystem::getFrameCount() when needed Change-Id: I79d2fe507db1a8f7bb094c71da8a129951dbb82f
* Use C APIs instead of C++ APIs for policyGlenn Kasten2012-04-232-11/+11
| | | | | | | | | 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
* Fix regression in AudioTrack::pause()Glenn Kasten2012-04-231-1/+4
| | | | | Bug: 6379646 Change-Id: I12b53bc4118499ddc73a53a981f3f56328140868
* Fix ToneGenerator regressionGlenn Kasten2012-04-231-1/+1
| | | | | Bug: 6378847 Change-Id: Ib3324c7a5951ac95f99993bfae27ea02bfda08ff
* Configure policy of mediaserver threadsGlenn Kasten2012-04-225-44/+93
| | | | Change-Id: Ifd825590ba36996064a458f64453a94b84722cb0
* Add support for deep audio buffersEric Laurent2012-04-201-0/+4
| | | | | | | | | | Allow AudioSink to use deep audio buffering when the source is audio only and its duration is more than a certain threshold. This helps improve battery life but implies higher audio latency. Change-Id: Ie79915b61c370292f05aabda9779356570e03cbb
* Allow propagation of error information and description from the CryptoPlugin toAndreas Huber2012-04-191-2/+17
| | | | | | | the higher layers. Change-Id: I9f434ad55cdf575803c208bedf47b607baff2330 related-to-bug: 6365261
* Merge "Add support for scaling mode parameter"Jean-Michel Trivi2012-04-191-1/+44
|\
| * Add support for scaling mode parameterJean-Michel Trivi2012-04-181-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support VISUALIZER_PARAM__SCALING_MODE parameter. Modify process() function to use new volume scaling parameter, used to set whether captured values are maximized by current headroom in the buffer (default existing behaviora) or left as is and thus affected by volume. Modify AudioEffect to allow subclasses to override the following events: control status changed, enable status changed, command executed. In Visualizer class (a subclass of AudioEffect), reset the scaling mode and capture size on the actual effect as cached when control is regained. This will allow the effect to be properly configured whenever Visualizers with different scaling modes or capture sizes are released (e.g. from java release() method). Change-Id: I05cb9f925a296dceca91bafa9fe294ef2b2c2bd5
* | rename audio policy output flagsEric Laurent2012-04-187-25/+25
| | | | | | | | Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
* | Merge "ToneGenerator requests fast track"Glenn Kasten2012-04-171-6/+6
|\ \
| * | ToneGenerator requests fast trackGlenn Kasten2012-04-161-6/+6
| |/ | | | | | | | | | | Also add comments to AudioTrack::set() parameter list Change-Id: I28c76e9d813778d86b15d75cf7f01a17c258b6d9
* | Order of evaluation of parameters is not specifiedGlenn Kasten2012-04-161-1/+4
|/ | | | Change-Id: Id545e54c2ec8ed2f70ede630542ed999a9b2c5e2
* Make it possible to pass empty opaque data as (NULL, 0) to ICrypto.Andreas Huber2012-04-111-5/+15
| | | | | Change-Id: Ifee1744890b645e008c9aff3783625a7bfbcff27 related-to-bug: 6275919
* New API to support submitting encrypted buffers to the decoder.Andreas Huber2012-04-061-0/+11
| | | | | Change-Id: I69dd60e43078c4211c6123cf6e0ce90e676bf873 related-to-bug: 6275919
* audio policy: load audio hw modules.Eric Laurent2012-04-041-43/+62
| | | | | | | | | | | Audio HW modules are now loaded upon request from audio policy manager according to the configuration in audio_policy.conf. Removed hard coded HW module loading by AudioFlinger at init time. Added methods to IAudioFlinger and AudioPolicyInterface to control the loading of audio HW modules. Added methods to open an output or input stream on a specific hw module. Change-Id: I361b294ece1a9b56b2fb39cc64259dbb73b804f4