summaryrefslogtreecommitdiff
path: root/media/libeffects
AgeCommit message (Collapse)Author
2012-10-17Fix valgrind issuesMarco Nelissen
We were reading some uninitialized memory when creating bass boost and EQ effects, and using memcpy() with identical source and destination. Change-Id: I15ea1b2c52ae05cbf54aef04351e89805e0ebf8e
2012-09-17Fix THD with max user EQ preset volume againEric Laurent
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
2012-09-11Merge "Limit maximum equalizer gain." into jb-mr1-devEric Laurent
2012-09-10Limit maximum equalizer gain.Eric Laurent
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
2012-09-10audio effects: no audio preprocessing by defaultEric Laurent
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
2012-09-07Merge "Fix headroom management in equalizer" into jb-mr1-devEric Laurent
2012-09-07Fix headroom management in equalizerEric Laurent
Fix a bug resetting the headroom parameters when calling the bundle process function for the first time. Change-Id: Ie05f97606f415954340ff2a4e48cd7b0a97a063b
2012-09-07audioflinger: changes for new audio devices enumsEric Laurent
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
2012-08-30audio effects: fix bug in sample rate control.Eric Laurent
Fix a bug in LVM bundle wrapper preventing audio framework sample rate from being sent to the effect bundle instance. Change-Id: I912027f866d3beac91b977bba869ff96a92d2a62
2012-08-24Reduce THD when equalizer is ON.Eric Laurent
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
2012-07-17Use struct assignment instead of explicit memcpyGlenn Kasten
for POD structs effect_descriptor_t and effect_config_t Change-Id: Ib2fc47f85fb65ed91b0abb1f87217c49b5eb571d
2012-06-13Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/James Dong
Change-Id: I0a3af3e2abdedebd5934f3d941d01c32cfc75e26 related-to-bug: 6647465
2012-06-07Take latency and current time into account for visualizationMarco Nelissen
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
2012-05-24Prevent occurences of clipping in loud downmixed scenesJean-Michel Trivi
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
2012-05-16Stereo downmixer supports generic configurations. Fix 7.1 downmixJean-Michel Trivi
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
2012-04-23Downmix support for 5.1 and quad with side channelsJean-Michel Trivi
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
2012-04-19Merge "Turn off debug in downmix effect"Jean-Michel Trivi
2012-04-18Turn off debug in downmix effectJean-Michel Trivi
Change-Id: I4eda43166d23b3297cf769056a6db720401799aa
2012-04-18Add support for scaling mode parameterJean-Michel Trivi
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
2012-04-11audio pre processing: test code for dual micEric Laurent
Added functional test code to validate effect API for multi mic simplementations. Also fixed warning in AudioFlinger. Change-Id: I07be4d2e4d17791d3626c804ba3e9f87ff26d05a
2012-04-09AudioMixer uses downmix effect for multichannel contentJean-Michel Trivi
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
2012-03-26fix visualizer inactivity detectionEric Laurent
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
2012-03-19Update commentsGlenn Kasten
Change-Id: I327663a020670d0a72ff57bd0b682e2ce0528650
2012-03-15audio_channel_in/out_mask_from_countGlenn Kasten
and avoid ambiguous term "channels" where it might be confusing as to whether it is a channel mask or channel count Change-Id: I744fa08ccb6001a98c97bd638d2c9d56836c4234
2012-03-14Remove dependency on audio_* locationGlenn Kasten
Change-Id: I4bc66115fcb9ba22b057bd72db3f561dcb18a0d8
2012-03-13Use correct syntax for #include <> ""Glenn Kasten
Change-Id: I943137108668ae66f8eba18dafe069a7951bcd8f
2012-03-07Effect for multichannel PCM downmix to stereoJean-Michel Trivi
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
2012-03-02Correct GUID errors in audio effect configurationJean-Michel Trivi
Correct erroneous spaces that were present in some audio effect GUIDs. Change-Id: Ide3a1552b2f8976f96ee980f1341f935555656d9
2012-02-17audio preprocessing: fix multiple enable problemEric Laurent
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
2012-02-13Merge "Fix audio preprocessing library wrapper"Eric Laurent
2012-02-08Effect UUID inputs passed by pointer are constGlenn Kasten
Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
2012-02-06Fix audio preprocessing library wrapperEric Laurent
Fixed bug in EFFECT_CMD_GET_CONFIG command handler in webRTC audio processing library wrapper. Change-Id: I1d2cefa00930e549607af8dc2cf27555da8d313f
2012-02-01modifications for new webrtc modulesEric Laurent
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
2012-01-08Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
2012-01-06Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
2012-01-05Use the standard CC_LIKELY and CC_UNLIKELY macrosGlenn Kasten
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
2011-12-19audio effects: rename configure commandEric Laurent
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
2011-11-11am 2c29a5cf: am 1f8c6212: Merge "visualizer: reset buffer if playback is ↵Eric Laurent
idle" into ics-mr1 * commit '2c29a5cf1658532bca4e34f816fa30312241a336': visualizer: reset buffer if playback is idle
2011-11-10visualizer: reset buffer if playback is idleEric Laurent
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
2011-11-05resolved conflicts for merge of 914972be to masterEric Laurent
Change-Id: I15adb9040eaa206c31bb5a08ed5ee5b32967ba0a
2011-11-05resolved conflicts for merge of 79178b8b to masterEric Laurent
Change-Id: Ia597549a6d159b86063eb3afec5ce7fe98434a65
2011-11-04Merge "Fix device management in lvm effect bundle wrapper." into ics-mr1Eric Laurent
2011-11-02Fix problem in lvm effect bundle wrapper.Eric Laurent
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
2011-11-01Fix device management in lvm effect bundle wrapper.Eric Laurent
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
2011-10-26Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
2011-07-18Audio framework: support for audio pre processingEric Laurent
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
2011-07-17Audio preprocessing wrapper for webrtc.Eric Laurent
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
2011-07-12Merge "Remove the simulator target from all makefiles. Bug: 5010576"Jeff Brown
2011-07-11Remove the simulator target from all makefiles.Jeff Brown
Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
2011-07-11Audio Effect API: process reverse stream functionEric Laurent
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