spandsp 3.0.0
private/modem_echo.h
Go to the documentation of this file.
1/*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * private/modem_echo.h - An echo cancellor, suitable for electrical echos in GSTN modems
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2001, 2004 Steve Underwood
9 *
10 * Based on a bit from here, a bit from there, eye of toad,
11 * ear of bat, etc - plus, of course, my own 2 cents.
12 *
13 * All rights reserved.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 2.1,
17 * as published by the Free Software Foundation.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this program; if not, write to the Free Software
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29/*! \file */
30
31#if !defined(_SPANDSP_PRIVATE_MODEM_ECHO_H_)
32#define _SPANDSP_PRIVATE_MODEM_ECHO_H_
33
34/*!
35 Modem line echo canceller descriptor. This defines the working state for an
36 echo canceller for a PSTN dial up modem. i.e a sparse canceller, canceller,
37 which deals with two small periods of echo, over two analogue line segments,
38 some substantial echoless delay between them, and some buffering delays for
39 each end's modem processing.
40*/
42{
43 int adapt;
44 int taps;
45
46 int ec_len;
47
48 fir16_state_t fir_state;
49 /*! Echo FIR taps (16 bit filtering version) */
50 int16_t *fir_taps16;
51 /*! Echo FIR taps (32 bit adapting version) */
52 int32_t *fir_taps32;
53
54 int32_t adaption_rate;
55
56 int32_t tx_power;
57 int32_t rx_power;
58
59 int curr_pos;
60};
61
63{
64 int16_t *local_delay;
65 int local_delay_len;
66 struct modem_echo_can_segment_state_s near_ec;
67 int16_t *bulk_delay;
68 int bulk_delay_len;
70 int16_t *far_delay;
71 int far_delay_len;
72
73 /*! \brief Error and flow logging control */
75};
76
77#endif
78/*- End of file ------------------------------------------------------------*/
struct logging_state_s logging_state_t
Definition logging.h:72
Definition fir.h:46
Definition private/modem_echo.h:42
int32_t * fir_taps32
Definition private/modem_echo.h:52
int16_t * fir_taps16
Definition private/modem_echo.h:50
Definition private/modem_echo.h:63
logging_state_t logging
Error and flow logging control.
Definition private/modem_echo.h:74