summaryrefslogtreecommitdiffstats
path: root/media/libeffects
Commit message (Collapse)AuthorAgeFilesLines
...
* Prevent occurences of clipping in loud downmixed scenesJean-Michel Trivi2012-05-241-20/+20
| | | | | | | | | | | | The downmixer effect is a mixer, wich, like the platform mixer, hard-clips. To prevent clipping during loud scenes across multiple chanels, apply a fixed attenuation on the result of the downmix. Note that this attenuation is lower the theoretical required attenuation (except for quad and surround) but is adequate for most content. Bug 4280902 Change-Id: Iec520e9f1367284d6102633f532429361717692d
* Stereo downmixer supports generic configurations. Fix 7.1 downmixJean-Michel Trivi2012-05-162-11/+282
| | | | | | | | | | | | | | | | | | Added a generic downmixer to stereo function to handle the multichannel configurations not supported by the dedicated downmix functions. It first verifies the mask is supported, and then derives channel indices for the downmix. Added support for forcing the generic downmixer to be always used instead of the format-specific functions (define DOWNMIX_ALWAYS_USE_GENERIC_DOWNMIXER to force it). Fixed 7.1 downmix function where handling of accumulate vs overwrite was inversed. Bug 4280902 Change-Id: I8259b32c4e90f76ef4dcd803592fc71df4ae90c5
* Downmix support for 5.1 and quad with side channelsJean-Michel Trivi2012-04-231-5/+28
| | | | | | | | | In DOWNMIX_TYPE_FOLD mode, add support for variants of quad and 5.1 channel masks where the "side" channels are used instead of the "back" channels. These variants have the same channel order, so they can share the same downmix function. Change-Id: I5f9cb7cb120927189de680c2a968d6136dc1fc43
* Merge "Turn off debug in downmix effect"Jean-Michel Trivi2012-04-191-1/+1
|\
| * Turn off debug in downmix effectJean-Michel Trivi2012-04-181-1/+1
| | | | | | | | Change-Id: I4eda43166d23b3297cf769056a6db720401799aa
* | Add support for scaling mode parameterJean-Michel Trivi2012-04-181-32/+59
|/ | | | | | | | | | | | | | | | | | | | | | 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
* audio pre processing: test code for dual micEric Laurent2012-04-111-3/+261
| | | | | | | | | Added functional test code to validate effect API for multi mic simplementations. Also fixed warning in AudioFlinger. Change-Id: I07be4d2e4d17791d3626c804ba3e9f87ff26d05a
* AudioMixer uses downmix effect for multichannel contentJean-Michel Trivi2012-04-092-1/+8
| | | | | | | | | | | | | | In the AudioMixer structure associated with each track, add an object that acts as the buffer provider when the track has more than two channels of input in the mixer. This object, DownmixerBufferProvider, gets audio from the actual buffer provider of the track, and applies a downmix effect on it. The downmix effect is created and configured when the track gets created in AudioFlinger, which causes AudioMixer::getTrackName() to be called with the new track's channel mask. It is released when the track is disabled in the mixer. Change-Id: I05281ed5f61bef663a8af7ca7d5ceac3517c82db
* fix visualizer inactivity detectionEric Laurent2012-03-261-9/+24
| | | | | | | | | | | | Current method implemented by the visualizer to detect that audioflinger has stopped providing audio buffers does not work if the application reads pcm captures too fast. The fix consist in implementing a method based on real time measurement only. One drawback is that the new method makes use of system calls that add some overhead to the process and capture functions. Change-Id: I53bd596b856f1cc7f0f47e08413af3335227100b
* Update commentsGlenn Kasten2012-03-191-1/+1
| | | | Change-Id: I327663a020670d0a72ff57bd0b682e2ce0528650
* audio_channel_in/out_mask_from_countGlenn Kasten2012-03-151-5/+4
| | | | | | | and avoid ambiguous term "channels" where it might be confusing as to whether it is a channel mask or channel count Change-Id: I744fa08ccb6001a98c97bd638d2c9d56836c4234
* Remove dependency on audio_* locationGlenn Kasten2012-03-146-10/+10
| | | | Change-Id: I4bc66115fcb9ba22b057bd72db3f561dcb18a0d8
* Use correct syntax for #include <> ""Glenn Kasten2012-03-132-3/+4
| | | | Change-Id: I943137108668ae66f8eba18dafe069a7951bcd8f
* Effect for multichannel PCM downmix to stereoJean-Michel Trivi2012-03-073-0/+1013
| | | | | | | | | | | First pass at implementing an audio effect whose role is to downmix multichannel PCM buffers to stereo. The effect is not handling volume changes. The effect code here handles quad, 4.0, 5.1 and 7.1 input configurations, to optimize the most commom configurations, and does not yet handle generic multichanel configurations. Change-Id: I74d04bd961348f3f0e4ae7714b70e620808a0829
* Correct GUID errors in audio effect configurationJean-Michel Trivi2012-03-021-2/+2
| | | | | | Correct erroneous spaces that were present in some audio effect GUIDs. Change-Id: Ide3a1552b2f8976f96ee980f1341f935555656d9
* audio preprocessing: fix multiple enable problemEric Laurent2012-02-171-1/+14
| | | | | | | | | | | Do not set the effect state back to configured when a configuration command is received while the effect is enabled. Instead just check that the new config is the same as current config. It is normal to receive a config command from the framework while enabled if a new effect is added on the same session. Change-Id: I93aa38bf60a3d7cc7729934e87ddd69bf1112cd6
* Merge "Fix audio preprocessing library wrapper"Eric Laurent2012-02-131-1/+1
|\
| * Fix audio preprocessing library wrapperEric Laurent2012-02-061-1/+1
| | | | | | | | | | | | | | Fixed bug in EFFECT_CMD_GET_CONFIG command handler in webRTC audio processing library wrapper. Change-Id: I1d2cefa00930e549607af8dc2cf27555da8d313f
* | Effect UUID inputs passed by pointer are constGlenn Kasten2012-02-088-22/+22
|/ | | | Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
* modifications for new webrtc modulesEric Laurent2012-02-012-5/+5
| | | | | | | | | Adapt include files path in makefile and source to new directory structure in webrtc library. Also changed the default AGC parameters to less extreme settings. Change-Id: Ia6a41c816dc44645f8f867937b722eede88c06ea
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-3/+3
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-065-37/+37
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Use the standard CC_LIKELY and CC_UNLIKELY macrosGlenn Kasten2012-01-055-27/+22
| | | | | | | | | | | Several source files privately defined macros LIKELY and UNLIKELY in terms of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and CC_UNLIKELY which are intended for this purpose. So rename the private uses to use the standard names. In addition, AudioFlinger was relying on the macro expanding to extra ( ). Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873
* audio effects: rename configure commandEric Laurent2011-12-197-75/+263
| | | | | | | | | | | | | Renamed audio effect library interface command for audio format configuration from EFFECT_CMD_CONFIGURE to EFFECT_CMD_SET_CONFIG. This makes the naming more consistent with other exixsting commands and allow adding a new command to get the configuration (EFFECT_CMD_GET_CONFIG). Same change for reverse channel configuration renamed from EFFECT_CMD_CONFIGURE_REVERSE to EFFECT_CMD_SET_CONFIG_REVERSE. Implemented EFFECT_CMD_GET_CONFIG in exisitng effect libraries. Change-Id: Ia7b1c620f13797fe5aceb3b0b4acbacce09fb067
* am 2c29a5cf: am 1f8c6212: Merge "visualizer: reset buffer if playback is ↵Eric Laurent2011-11-111-3/+25
|\ | | | | | | | | | | | | idle" into ics-mr1 * commit '2c29a5cf1658532bca4e34f816fa30312241a336': visualizer: reset buffer if playback is idle
| * visualizer: reset buffer if playback is idleEric Laurent2011-11-101-3/+25
| | | | | | | | | | | | | | | | | | | | Visualizer capture buffer must be reset if audio framework has stopped calling process for a given period of time to get read of residual data from previous captures. Issue 5571920. Change-Id: I6e73f971bb812cdbb2979a3b5e763abab07634eb
* | resolved conflicts for merge of 914972be to masterEric Laurent2011-11-051-17/+26
|\ \ | |/ | | | | Change-Id: I15adb9040eaa206c31bb5a08ed5ee5b32967ba0a
| * Merge "Fix device management in lvm effect bundle wrapper." into ics-mr1Eric Laurent2011-11-041-17/+26
| |\
| | * Fix device management in lvm effect bundle wrapper.Eric Laurent2011-11-011-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The virtualizer and bass boost effects should be disabled when not playing throught headsets or headphones. There is a bug in current wrapper implementation that makes that those effects are not disabled if the effect is enabled by the user after the headset has been removed (current logic only works if the device selection occurs while the effect is enabled). Change-Id: I7c66b15a0339d95fb9ed13c8320d66379725d3b6
* | | resolved conflicts for merge of 79178b8b to masterEric Laurent2011-11-051-9/+19
|\ \ \ | |/ / | | | | | | Change-Id: Ia597549a6d159b86063eb3afec5ce7fe98434a65
| * | Fix problem in lvm effect bundle wrapper.Eric Laurent2011-11-021-9/+19
| |/ | | | | | | | | | | | | | | | | | | | | When an effect is disabled, the process function should either copy or accumulate the content of the input buffer to the output buffer depending on the behavior requested by the framework. Current implementation is copying the input buffer unconditionally. Related to issue 5433942. Change-Id: Ic488ca97eadcc4c763de570d7e6c6f5b7a979415
* | Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-268-721/+721
|/ | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Audio framework: support for audio pre processingEric Laurent2011-07-184-7/+73
| | | | | | | | | | | | | | | | | | | | | | | | | Audio effect framework is extended to suport effects on output and input audio path. AudioFlinger: Support for audio effects and effect chains is moved from PlaybackThread class to ThreadBase class so that RecordThread can manage effects. Effects of type pre processing are allowed on record thread only. When a pre processing is enabled, the effect interface handle is passed down to the input stream so that the audio HAL can call the process function. The record thread loop calls the effect chain process function that will only manage the effect state and commands and skip the process function. AudioRecord: The audio session is allocated before calling getInput() into audio policy serice so that the session is known before the input theead is created and pre processings can be created on the correct session. AudioPolicyService: default pre processing for a given input source are loaded from audio_effects.conf file. When an input is created, corresponding effects are created and enabled. Change-Id: Id17119e0979b4dcf189b5c7957fec30dc3478790
* Audio preprocessing wrapper for webrtc.Eric Laurent2011-07-172-0/+1641
| | | | | | | | This wrapper implements the interworking layer between the audio effect interface defined by the effect framework for audio preprocessing and the native interface of webrtc audio processing module. Change-Id: I3f9319730c102599cdf0dda520a53d90b4165114
* Merge "Remove the simulator target from all makefiles. Bug: 5010576"Jeff Brown2011-07-123-29/+4
|\
| * Remove the simulator target from all makefiles.Jeff Brown2011-07-113-29/+4
| | | | | | | | | | | | Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
* | Audio Effect API: process reverse stream functionEric Laurent2011-07-116-7/+51
|/ | | | | | | | Added function to audio effect interface for processing of a reverse stream. This is necessary for audio pre processes like echo cancellation. Change-Id: I6e12d79dbbed6376acdfc79304b8c0ab3f705eae
* Moved and renamed effect API header filesEric Laurent2011-07-078-18/+22
| | | | | | | | Moved specific effect header files to system/media/audio_effects/include/audio_effects and renamed to lower case (effect_xxx.h). Change-Id: Icfc2264bfd013cab0395d7e310ada636b9fe3621
* Fix regression in audio effect factoryEric Laurent2011-06-161-1/+1
| | | | | | | commit 0fb66c2 introduced a bug in EffectCreate() that prevents detection of problems reported by the engine library upon effect creation. Change-Id: I5bd2d42505ac29ab4a5768fd7f0c2ced135cf3e3
* Removed interface to load audio effects librariesEric Laurent2011-05-271-12/+0
| | | | | | | Removed unused functions allowing dynamic loading of audio effects libraries from effects factory API. Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca
* New effect library APIEric Laurent2011-05-2711-379/+812
| | | | | | | | | | | | | | | | | Moved and renamed media/EffectApi.h to hardware/audio_effect.h Modified the effect library API to expose a library info structure containing an interface functions table. Also removed enums for audio channels, audio format and devices from effect API and use values from system/audio.h instead. Modified effects factory to support new library interface format and load libraries and efffects listed in audio_effects.conf file. The file audio_effects.conf is first loaded from /vendor/etc and then from /system/etc/audio_effects.conf if not found. Modified existing effect libraries to implement the new library interface. Change-Id: Ie52351e071b6d352fa2fbc06c3846686f8c45df9
* frameworks/base: remove LOCAL_PRELINK_MODULEIliyan Malchev2011-03-143-5/+5
| | | | | Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Fix issue 3499926.Eric Laurent2011-03-011-8/+14
| | | | | | | | | Make sure that NumberEffectsEnabled is decremented at the same time as SamplesToExitCountBb reaches 0 in Effect_process(). Not doing so causes NumberEffectsEnabled not being decremented if Effect_setEnabled() is called after SamplesToExitCountBb reaches 0 and before next Effect_process() is called. Change-Id: Id827a301f93a5a09ecd9995a0c7d731ef526711a
* Bug 3117154Glenn Kasten2011-01-251-1/+1
| | | | | | | | The previous default audible behavior was actually NONE (dry), despite the default value of MEDIUMROOM. Corrected default value to match the default behavior. Change-Id: Iadb0d41629a383fd52f03e8a21ba4b74ea24401c
* am cd08ada7: am 67c7a4ae: Merge "Fix off-by-two and other bugs in the ↵Marco Nelissen2010-10-271-9/+12
|\ | | | | | | visualization code. b/3137511" into gingerbread
| * Fix off-by-two and other bugs in the visualization code.Marco Nelissen2010-10-271-9/+12
| | | | | | | | | | | | b/3137511 Change-Id: Ic431701e93c025bc417c9742e9af6bb2350c7dd6
* | am b047e3cd: am aeb2c62e: Merge "Fix several audio effects problems." into ↵Eric Laurent2010-09-282-126/+211
|\ \ | |/ | | | | | | | | | | | | | | gingerbread Merge commit 'b047e3cdf24b32e26f366fcd4cd0eee8ae6c592c' * commit 'b047e3cdf24b32e26f366fcd4cd0eee8ae6c592c': Fix several audio effects problems.
| * Fix several audio effects problems.Eric Laurent2010-09-282-126/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the following issues in LVM effect bundle wrapper: - memory leaks in EffectCreate() in case effect creation fails at various stages - Added saturation when accumulating to output buffer - Fixed problems with enabled effects count when an effect is released while enabled - Do not allocate temporary buffer for accumulation each time process() is called Fixed the following issues in effects framework (AudioFlinger) - Release effect synchronously in the library when deleted from effect chain - Do not call the effect process function if no tracks are present in the same audio session Change-Id: Ifbd80a163415cfb3c0a337c12082853ea45d9c91
* | am 1b37df95: am 9627847d: Merge "Fix error in AudioEffect command status ↵Eric Laurent2010-09-271-2/+2
|\ \ | |/ | | | | | | | | | | | | | | reporting." into gingerbread Merge commit '1b37df95ec9d03aaa5f4055c6cd86db42f9c9727' * commit '1b37df95ec9d03aaa5f4055c6cd86db42f9c9727': Fix error in AudioEffect command status reporting.
| * Fix error in AudioEffect command status reporting.Eric Laurent2010-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | AudioEffect::command() should not interpret the status returned in pReplyData unless the command is ENABLE or DISABLE. Also fixed: - bug in Visualizer::getWAveForm() status reporting. - wrong initialization value for capture buffer in visualizer engine. Change-Id: I60fb0011f9dba96ee74661dec1e8ef441edcaf35