summaryrefslogtreecommitdiffstats
path: root/media/libeffects
Commit message (Collapse)AuthorAgeFilesLines
* am 9857473f: am 0f4b0d23: Merge "libeffects: do not use GNU old-style field ↵Nick Kralevich2013-10-205-35/+35
|\ | | | | | | | | | | | | designators" * commit '9857473f48abf1333ddd3454ab3c916b4e69daa4': libeffects: do not use GNU old-style field designators
| * libeffects: do not use GNU old-style field designatorssynergydev2013-10-195-35/+35
| | | | | | | | | | | | Not using a GNU extension improves portability Change-Id: I4e8a0376c089828ca4fc7f1aaf3914bfd917d4c5
* | fix offload audio effect proxy implementation uuidEric Laurent2013-10-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | The proxy implementation UUID should not be the NULL UUID as AudioFlinger will reject effect creation if the AudioEffect is constructed by passing the implementation UUID and not the type UUID. Bug: 11070481. Change-Id: Ia9049d974e76303c5b63a607ee594b7dc1f182d4
* | fix oflload effect proxy commmand handlingEric Laurent2013-09-272-46/+54
| | | | | | | | | | | | | | | | | | Implement a more generic command handling in offload effect proxy. All commands are sent to both sub effects but only the reply from the active one is returned to the caller. Bug: 8174034. Change-Id: I28aa0f0d806e846332bc29801ee40d34e4ea0c43
* | fix command handling in effect offload proxyEric Laurent2013-09-271-11/+48
| | | | | | | | | | | | | | | | | | | | Fix some issues in effect proxy related to handling of effect commands to offloaded and non offloaded effects. Also fixed a bug on capture index in software Visualizer effect. Bug: 8174034. Change-Id: I119458fea597cc3acbc0ef9ec315f67aa211cbd9
* | Effect Offload Proxy for effects offloadjpadmana2013-09-274-1/+408
| | | | | | | | | | | | | | | | | | | | | | | | Effect Proxy abstracts the sub effects to the upper layers. It has the following functionalities: - creation and release of sub effects - routing the effect commands and process to the appropriate sub effect Bug: 8174034. Change-Id: Iec34b61104f0bbec4ef67c62f0710a5536dc325b Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com>
* | Effects Factory changes for effects offloadjpadmana2013-09-273-2/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | audio_effects.conf - commented changes to illustrate the addition of Proxy and sub effects to the conf file Added an effectFactoryApi - EffectGetSubEffects for querying the sub effect descriptors from the factory. This api is used by the Proxy to get the sub effects Added functions and data structures in factory code for loading the sub effects gSubEffectList - has the Proxies and their corresponding sub effects - addSubEffect() - reads a sub effect node and adds to the gSubEffectList - findSubEffect() - searches through the gSubEffectList to find a SubEffect Bug: 8174034. Change-Id: Id7f6aa67c41db370d32beaf43a979ba4ac925928 Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com>
* | Revert "Effects Factory changes for effects offload"Eric Laurent2013-09-273-274/+2
| | | | | | | | | | | | This reverts commit 284c17e73bbff51cb5b1adcee98386d47733757a. Change-Id: I31db21e1ad4758b21356bfe4c4c64f15b2da8737
* | Revert "Effect Offload Proxy for effects offload"Eric Laurent2013-09-274-453/+1
| | | | | | | | | | | | This reverts commit 60c60df7db278d2fa5c90b0fa14f99a61d50272b. Change-Id: Iafba9e02a9f3bfde6248d802e96c4e649686a87d
* | LoudnessEnhancer compatible with stereo imagingJean-Michel Trivi2013-09-264-26/+56
| | | | | | | | | | | | | | | | | | Use a single compressor for both channels. Envelope of signal is determined by looking at both channels. Bug 8413913 Change-Id: Ia9b6f34923d2977c60a3352500b858dfa1fab33c
* | Merge "Fix log typos in Visualizer effect" into klp-devJean-Michel Trivi2013-09-241-9/+7
|\ \
| * | Fix log typos in Visualizer effectJean-Michel Trivi2013-09-241-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix errors in logs for Visualizer. Set loop counters on 32 bits Bug 8413913 Change-Id: Iad2140d003d15d45be46826a5e89baff14fe9e77
* | | fix oflload effect proxy commmand handlingEric Laurent2013-09-242-46/+54
|/ / | | | | | | | | | | | | | | | | Implement a more generic command handling in offload effect proxy. All commands are sent to both sub effects but only the reply from the active one is returned to the caller. Bug: 8174034. Change-Id: Ia45f9933b3bf338257ec70b37732fa1578d26b9f
* | Add support for level measurements in VisualizerJean-Michel Trivi2013-09-231-17/+137
| | | | | | | | | | | | | | | | | | New commands to set a measurement mode and perform peak + RMS measurements. Bug 8413913 Change-Id: Ib25254065c79d365ebb34f9dc9caa0490e2d300d
* | more support for audio effect offloadEric Laurent2013-09-182-13/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offloading of audio effects is now enabled for offloaded output threads. If an effect not supporting offload is enabled, the AudioTrack is invalidated so that it can be recreated in PCM mode. Fix some issues in effect proxy related to handling of effect commands to offloaded and non offloaded effects. Also fixed a bug on capture index in software Visualizer effect. Bug: 8174034. Change-Id: Ib23d3c2d5a652361b0aaec7faee09102f2b18fce
* | LoudnessEnhancer audio effect implementationJean-Michel Trivi2013-09-1719-0/+1872
| | | | | | | | | | | | | | | | | | | | | | | | Implementation based on DRC effect, controlled by a target gain. The target gain is used to amplify the signal at the input of the DRC, and to compute the knee of the DRC. Bug 8413913 Change-Id: I386d64793a9fa3f7218e053d6f0a99f6836c02bd
* | Effect Offload Proxy for effects offloadjpadmana2013-09-064-1/+408
| | | | | | | | | | | | | | | | | | | | | | | | Effect Proxy abstracts the sub effects to the upper layers. It has the following functionalities: - creation and release of sub effects - routing the effect commands and process to the appropriate sub effect Bug: 8174034. Change-Id: I22d8136636048e7fe8f8807cbc6e348ffa200a22 Signed-off-by: jpadmana <rpadmanaban.jayashree@gmail.com>
* | Effects Factory changes for effects offloadjpadmana2013-09-063-2/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | audio_effects.conf - commented changes to illustrate the addition of Proxy and sub effects to the conf file Added an effectFactoryApi - EffectGetSubEffects for querying the sub effect descriptors from the factory. This api is used by the Proxy to get the sub effects Added functions and data structures in factory code for loading the sub effects gSubEffectList - has the Proxies and their corresponding sub effects - addSubEffect() - reads a sub effect node and adds to the gSubEffectList - findSubEffect() - searches through the gSubEffectList to find a SubEffect Bug: 8174034. Change-Id: I25b0c62b2ad523a52337128b51469e628209ea3e Signed-off-by: jpadmana <rpadmanaban.jayashree@gmail.com>
* | Clean up references to AUDIO_FORMAT_PCM_8_24_BITGlenn Kasten2013-07-102-2/+2
|/ | | | Change-Id: I08771eb2664b7082561a40937218c7f4414e2cce
* Apply EQ and bass boost first in effect chainJean-Michel Trivi2013-06-201-2/+2
| | | | | | | | | | | | EQ and bass boost can improperly interact with other effects (e.g. virtualizer) outside of the bundle. Apply them first in an effect chain, which is equivalent to using them to affect the content of a track, rather than how a track is presented, when additional effects are cascaded behind EQ and BB. Bug 8589316 Change-Id: Ifb34e46bc1969f613cdc90ee2a79af677e2fad92
* Fix reverb at 48kHzEric Laurent2013-05-011-6/+6
| | | | | | | | | | | | | The LVM reverb wrapper had a test to only accept input sampling rate of 44.1 kHz. As the LVM reberb engine supports multiple sampling rate we can remove this test. The fix for issue 8512027 (commit 2a9c5cd4) caused a regression because the framework now checks the return code of the effect configure command and ignores subsequent commands in case of error. Bug: 8630044 Change-Id: I3146871f1ad8f7945a2e63ea763dd7b87368337d
* Add liblogYing Wang2013-04-094-3/+5
| | | | | Bug: 8580410 Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
* Fix valgrind errorMarco Nelissen2013-03-191-0/+1
| | | | | | | | The volume member of the BundledEffectContext class was not being initialized, resulting in uninitialized data being used for calculations and control flow. Change-Id: I84bf9fd478e5d0479e781323b21c7c03dea958c5
* Turn off executable bit on ordinary filesGlenn Kasten2012-11-023-0/+0
| | | | Change-Id: I0abea25b58fb1d03975bed9cca40f826fcd4c5e4
* Only export the symbols that need to beMarco Nelissen2012-10-2510-12/+25
| | | | | | | | The effects libraries were exporting many more symbols than needed. This reduces the exported symbols to just the needed ones (basically just "AELI"), which happens to also save about 28KB. Change-Id: I115077e52e8dc845282e6f62a522908d26dd72d6
* Switch to new fx library APIMarco Nelissen2012-10-259-174/+0
| | | | Change-Id: I6603aef5e3821a8f911e3f33ef8565d04bd1e2e5
* 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