Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
echo.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include "echo.h"

Go to the source code of this file.

Macros

#define MIN_TX_POWER_FOR_ADAPTION   64
 
#define MIN_RX_POWER_FOR_ADAPTION   64
 
#define DTD_HANGOVER   600 /* 600 samples, or 75ms */
 
#define DC_LOG2BETA   3 /* log2() of DC filter Beta */
 

Functions

struct oslec_stateoslec_create (int len, int adaption_mode)
 
 EXPORT_SYMBOL_GPL (oslec_create)
 
void oslec_free (struct oslec_state *ec)
 
 EXPORT_SYMBOL_GPL (oslec_free)
 
void oslec_adaption_mode (struct oslec_state *ec, int adaption_mode)
 
 EXPORT_SYMBOL_GPL (oslec_adaption_mode)
 
void oslec_flush (struct oslec_state *ec)
 
 EXPORT_SYMBOL_GPL (oslec_flush)
 
void oslec_snapshot (struct oslec_state *ec)
 
 EXPORT_SYMBOL_GPL (oslec_snapshot)
 
int16_t oslec_update (struct oslec_state *ec, int16_t tx, int16_t rx)
 
 EXPORT_SYMBOL_GPL (oslec_update)
 
int16_t oslec_hpf_tx (struct oslec_state *ec, int16_t tx)
 
 EXPORT_SYMBOL_GPL (oslec_hpf_tx)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("David Rowe")
 
 MODULE_DESCRIPTION ("Open Source Line Echo Canceller")
 
 MODULE_VERSION ("0.3.0")
 

Macro Definition Documentation

#define DC_LOG2BETA   3 /* log2() of DC filter Beta */

Definition at line 114 of file echo.c.

#define DTD_HANGOVER   600 /* 600 samples, or 75ms */

Definition at line 113 of file echo.c.

#define MIN_RX_POWER_FOR_ADAPTION   64

Definition at line 112 of file echo.c.

#define MIN_TX_POWER_FOR_ADAPTION   64

Definition at line 111 of file echo.c.

Function Documentation

EXPORT_SYMBOL_GPL ( oslec_create  )
EXPORT_SYMBOL_GPL ( oslec_free  )
EXPORT_SYMBOL_GPL ( oslec_adaption_mode  )
EXPORT_SYMBOL_GPL ( oslec_flush  )
EXPORT_SYMBOL_GPL ( oslec_snapshot  )
EXPORT_SYMBOL_GPL ( oslec_update  )
EXPORT_SYMBOL_GPL ( oslec_hpf_tx  )
MODULE_AUTHOR ( "David Rowe"  )
MODULE_DESCRIPTION ( "Open Source Line Echo Canceller"  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( "0.3.0"  )
void oslec_adaption_mode ( struct oslec_state ec,
int  adaption_mode 
)

oslec_adaption_mode - set the adaption mode of a voice echo canceller context. The echo canceller context. : The mode.

Definition at line 295 of file echo.c.

struct oslec_state* oslec_create ( int  len,
int  adaption_mode 
)
read

oslec_create - Create a voice echo canceller context. : The length of the canceller, in samples.

Returns
: The new canceller context, or NULL if the canceller could not be created.

Definition at line 229 of file echo.c.

void oslec_flush ( struct oslec_state ec)

oslec_flush - Flush (reinitialise) a voice echo canceller context. : The echo canceller context.

Definition at line 301 of file echo.c.

void oslec_free ( struct oslec_state ec)

oslec_free - Free a voice echo canceller context. : The echo canceller context.

Definition at line 282 of file echo.c.

int16_t oslec_hpf_tx ( struct oslec_state ec,
int16_t  tx 
)

oslec_hpf_tx: Process to high pass filter the tx signal. : The echo canceller context. : The transmitted auio sample.

The return value is the HP filtered transmit sample, send this to your D/A.

Definition at line 627 of file echo.c.

void oslec_snapshot ( struct oslec_state ec)

Definition at line 327 of file echo.c.

int16_t oslec_update ( struct oslec_state ec,
int16_t  tx,
int16_t  rx 
)

oslec_update: Process a sample through a voice echo canceller. : The echo canceller context. : The transmitted audio sample. : The received audio sample.

The return value is the clean (echo cancelled) received sample.

Definition at line 335 of file echo.c.