summaryrefslogtreecommitdiffstats
path: root/src/modules/echo-cancel
Commit message (Collapse)AuthorAgeFilesLines
* echo-cancel: Fix source may_move_to functionArun Raghavan2010-12-021-1/+1
| | | | | | | This is required to make sure that the source output between module-echo-cancel and ALSA can't get plugged to the virtual source or monitor of the virtual sink that we expose. This could be triggered by changing the profile of the underlying ALSA device.
* echo-cancel: Use S16NE for adrian moduleArun Raghavan2010-09-271-9/+5
| | | | | | This forces us to get native-endian samples in the adrian module so that we can rely on the existing endianness conversion mechanisms instead of doing it in the module.
* echo-cancel: Ensure correct handling of endiannessArun Raghavan2010-09-232-3/+4
| | | | | | The adrian module was using home-brewed endianness conversion instead of the appropriate mactos, and speex assumed a little-endian host. This fixes both of these.
* echo-cancel: orc-ify some bits for optimisationArun Raghavan2010-09-235-2/+329
| | | | | This uses Orc to optimise an inner loop in the core NLMS function of the Adrian echo canceller.
* echo-cancel: Add SSE optimisation to the adrian moduleArun Raghavan2010-09-237-12/+61
| | | | | | 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: pause timer when echo canceling is offWim Taymans2010-09-091-16/+25
| | | | | While the sink or source is in the suspended state, disable the timer callback because we are not doing any echo canceling then.
* echo-cancel: improve accuracyWim Taymans2010-09-091-1/+5
| | | | | Make the echo canceler drift up to 1ms now that things are more accurate. Add 10 samples of headroom to allow for timing inaccuracies.
* echo-cancel: rework alignment codeWim Taymans2010-09-091-59/+76
| | | | | Rework the code to align capture and playback samples so that we can keep more accurate timings.
* echo-cancel: Mark immutable parameters as const in vfuncArun Raghavan2010-09-073-5/+5
| | | | | 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-074-43/+25
| | | | | | 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: Allow selection of AEC method using modargsArun Raghavan2010-09-071-8/+27
| | | | | This adds an "aec_method" module argument to allow us to select the AEC implementation to use.
* echo-cancel: Add alternative echo-cancellation implementationArun Raghavan2010-09-077-0/+794
| | | | | | | | | | | | 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-073-24/+49
| | | | | | | | | | | | | 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-073-33/+53
| | | | | 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-073-35/+183
| | | | | This splits out the echo-cancelling core from the PA-specific bits to allow us to plug in other echo-cancellation engines.
* echo-cancel: Move the module into it's own directoryArun Raghavan2010-09-071-0/+1625
This will make splitting out the canceller parts cleaner.