summaryrefslogtreecommitdiffstats
path: root/media/libeffects
Commit message (Collapse)AuthorAgeFilesLines
* Fix valgrind issuesMarco Nelissen2012-10-173-2/+8
| | | | | | | We were reading some uninitialized memory when creating bass boost and EQ effects, and using memcpy() with identical source and destination. Change-Id: I15ea1b2c52ae05cbf54aef04351e89805e0ebf8e
* Fix THD with max user EQ preset volume againEric Laurent2012-09-172-93/+79
| | | | | | | | | | | | | There was a problem with previous fix in 1b6c677c where the THD was good for max volume but bad for intermediate high volume values. This fix does not limit the band gains but apply a correction to the effect bundle volume to take into account not only the maximum band gain but also the average band gains weighted by the proximity of each band to the max gain band. Change-Id: Ibedd8da7fce1e163117f29b3da332da0e4fe8889
* Merge "Limit maximum equalizer gain." into jb-mr1-devEric Laurent2012-09-112-40/+68
|\
| * Limit maximum equalizer gain.Eric Laurent2012-09-102-40/+68
| | | | | | | | | | | | | | | | Limit maximum gain in all EQ bands according to current volume so that total gain (current volume + band gain) does not exceed a certain limit. The gain difference between bands is preserved. Change-Id: Ice5a9705a0b3353e8778b4c539a29ca9cdf60390
* | audio effects: no audio preprocessing by defaultEric Laurent2012-09-101-15/+24
|/ | | | | | | | | | | The audio preprocessings are not included in the default audio_effect.conf file anymore as the audio HAL has to provide support for them. Each product implementing one or more audio pre processing must provide a specific audio_effects.conf file. Change-Id: I3b2f636f7a8748829798d4b9057d269db9424d62
* Merge "Fix headroom management in equalizer" into jb-mr1-devEric Laurent2012-09-071-3/+8
|\
| * Fix headroom management in equalizerEric Laurent2012-09-071-3/+8
| | | | | | | | | | | | | | Fix a bug resetting the headroom parameters when calling the bundle process function for the first time. Change-Id: Ie05f97606f415954340ff2a4e48cd7b0a97a063b
* | audioflinger: changes for new audio devices enumsEric Laurent2012-09-071-0/+4
|/ | | | | | | | | | | | | | 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
* audio effects: fix bug in sample rate control.Eric Laurent2012-08-301-0/+2
| | | | | | | Fix a bug in LVM bundle wrapper preventing audio framework sample rate from being sent to the effect bundle instance. Change-Id: I912027f866d3beac91b977bba869ff96a92d2a62
* Reduce THD when equalizer is ON.Eric Laurent2012-08-242-3/+5
| | | | | | | | | Increase headroom in LVM bundle to reduce THD when equalizer is ON with high band gains. Also add a workaround for a bug in headroom parameter control. Change-Id: I1d67c9ae475f6cf852c2e0e49bacfc82a5e484fd
* Use struct assignment instead of explicit memcpyGlenn Kasten2012-07-177-32/+32
| | | | | | for POD structs effect_descriptor_t and effect_config_t Change-Id: Ib2fc47f85fb65ed91b0abb1f87217c49b5eb571d
* Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/James Dong2012-06-1312-0/+1140
| | | | | Change-Id: I0a3af3e2abdedebd5934f3d941d01c32cfc75e26 related-to-bug: 6647465
* Take latency and current time into account for visualizationMarco Nelissen2012-06-071-34/+63
| | | | | | | | | | Buffer more data, and return the data that is currently being output from the audio output, to ensure that visualizations are smooth and responsive even when the audio output has a large latency and/or large buffers. b/6522728 Change-Id: I401637f01be7600b3c594a55c869036c13b206c0
* 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