summaryrefslogtreecommitdiffstats
path: root/src/modules/echo-cancel/echo-cancel.h
Commit message (Collapse)AuthorAgeFilesLines
* echo-cancel: Fix echo suppression, add some knobsBart Cerneels2011-05-281-0/+2
| | | | | | | The echo suppress attenuation value was being incorrectly modified. Fixed and added 2 arguments to change the attenuation of the residual echo filter. Default values of the speex preprocessor will be used when omitted.
* echo-cancel: Add speex preprocessingArun Raghavan2011-05-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the selective enabling of speex' preprocessing algorithms before running the echo-canceller -- for now this includes automatic gain control, noise suppression and echo suppression. It's all off by default for now, though at some point in the near future we might want to enable at least denoising by default. The denoising works pretty well, though we might want to add a way to tweak the noise-suppression knob that libspeex provides. The AGC option is just a stop-gap -- we need a real AGC mechanism that tweaks the source volume rather than doing this in software. The speex documentation mentions VAD and dereverb, but it appears that these are not complete yet. We don't do all this in a separate module from module-echo-cancel to avoid the overhead of adding another virtual source. It makes more sense to make a separate virtual source module that can be used for cases where preprocessing is useful but AEC is not (for e.g. noise suppression for fan noise in a recording application). Another reason to keep this integrated with the AEC module is that the echo suppression bits use the speex echo canceller state. This does leak some information about the AEC implementation into module-echo-cancel, but this is unavoidable.
* echo-cancel: Add SSE optimisation to the adrian moduleArun Raghavan2010-09-231-3/+5
| | | | | | Optimises the core inner-product function, which takes the most CPU. The SSE-optimised bits of the adrian echo canceller only if the CPU that PA is running on actually supports SSE.
* echo-cancel: Mark immutable parameters as const in vfuncArun Raghavan2010-09-071-3/+3
| | | | | Marks the recording and playback streams as const in the pa_echo_canceller->run method for clarity.
* echo-cancel: Make blocksize a module-wide parameterArun Raghavan2010-09-071-6/+3
| | | | | | Since all algorithms will need to specify a block size (the amount of data to be processed together), we make this a common parameter and have the implementation set it at initialisation time.
* echo-cancel: Add alternative echo-cancellation implementationArun Raghavan2010-09-071-0/+14
| | | | | | | | | | | | This adds Andre Adrian's AEC implementation from his intercom project (http://andreadrian.de/intercom/) as an alternative to the speex echo cancellation routines. Since the implementation was in C++ and not in the form of a library, I have converted the code to C and made a local copy of the implementation. The implementation actually works on floating point data, so we can tweak it to work with both integer and floating point samples (currently we just use S16LE).
* echo-cancel: Let AEC module determine source/sink specArun Raghavan2010-09-071-2/+10
| | | | | | | | | | | | | Since the source and sink specification will need to be determined by the AEC algorithm (can it handle multi-channel audio, does it work with a fixed sample rate, etc.), we negotiate these using inout parameters at initialisation time. There is opportunity to make the sink-handling more elegant. Since the sink data isn't used for playback (just processing), we could pass through the data as-is and resample to the required spec before using in the cancellation algorithm. This isn't too important immediately, but would be nice to have.
* echo-cancel: Pass arguments to the specific canceller moduleArun Raghavan2010-09-071-2/+2
| | | | | This allows us to tweak module parameters for whichever AEC module is chosen.
* echo-cancel: Split out speex code from the core moduleArun Raghavan2010-09-071-0/+61
This splits out the echo-cancelling core from the PA-specific bits to allow us to plug in other echo-cancellation engines.