~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to kernel/kb1ec_const.h

  • Committer: Bazaar Package Importer
  • Author(s): Tzafrir Cohen
  • Date: 2008-08-28 22:58:23 UTC
  • mfrom: (11.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080828225823-r8bdunirm8hmc76m
Tags: 1:1.4.11~dfsg-2
* Patch xpp_fxs_power: Fixed an issue with hook detection of the Astribank
  FXS module.
* Don't fail init.d script if fxotune fails. This may happen if running it
  when Asterisk is already running.
* Bump standards version to 3.8.0.0 .
* Ignore false lintian warning ("m-a a-i" has "a a").
* Patch xpp_fxo_cid_always: do always pass PCM if that's what the user
  asked.
* Patch vzaphfc_proc_root_dir: fix vzaphfc on 2.6.26.
* Patch wcte12xp_flags: Proper time for irq save flags.
* Patch headers_2627: Fix location of semaphore.h for 2.6.27 .
* Patch xpp_fxs_dtmf_leak: Don't play DTMFs to the wrong channel.
* Patch wctdm_fix_alarm: Fix sending channel alarms.
* Patch device_class_2626: Fix building 2.6.26 (Closes: #493397).
* Using dh_lintian for lintian overrides, hence requiring debhelper 6.0.7.
* Lintian: we know we have direct changes. Too bad we're half-upstream :-(
* Fix doc-base section names. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
   Important constants for tuning kb1 echo can
 
3
 */
 
4
#ifndef _MEC2_CONST_H
 
5
#define _MEC2_CONST_H
 
6
 
 
7
 
 
8
/* Convergence (aka. adaptation) speed -- higher means slower */
 
9
#define DEFAULT_BETA1_I 2048
 
10
 
 
11
/* Constants for various power computations */
 
12
#define DEFAULT_SIGMA_LY_I 7
 
13
#define DEFAULT_SIGMA_LU_I 7
 
14
#define DEFAULT_ALPHA_ST_I 5            /* near-end speech detection sensitivity factor */
 
15
#define DEFAULT_ALPHA_YT_I 5
 
16
 
 
17
#define DEFAULT_CUTOFF_I 128
 
18
 
 
19
/* Define the near-end speech hangover counter: if near-end speech 
 
20
 *  is declared, hcntr is set equal to hangt (see pg. 432)
 
21
 */
 
22
#define DEFAULT_HANGT 600               /* in samples, so 600 samples = 75ms */
 
23
 
 
24
/* define the residual error suppression threshold */
 
25
#define DEFAULT_SUPPR_I 16              /* 16 = -24db */
 
26
 
 
27
/* This is the minimum reference signal power estimate level 
 
28
 *  that will result in filter adaptation.
 
29
 * If this is too low then background noise will cause the filter 
 
30
 *  coefficients to constantly be updated.
 
31
 */
 
32
#define MIN_UPDATE_THRESH_I 4096
 
33
 
 
34
/* The number of samples used to update coefficients using the
 
35
 *  the block update method (M). It should be related back to the 
 
36
 *  length of the echo can.
 
37
 * ie. it only updates coefficients when (sample number MOD default_m) = 0
 
38
 *
 
39
 *  Getting this wrong may cause an oops. Consider yourself warned!
 
40
 */
 
41
#define DEFAULT_M 16                    /* every 16th sample */
 
42
 
 
43
/* If AGGRESSIVE supression is enabled, then we start cancelling residual 
 
44
 * echos again even while there is potentially the very end of a near-side 
 
45
 *  signal present.
 
46
 * This defines how many samples of DEFAULT_HANGT can remain before we
 
47
 *  kick back in
 
48
 */
 
49
#define AGGRESSIVE_HCNTR 160            /* in samples, so 160 samples = 20ms */
 
50
 
 
51
 
 
52
/***************************************************************/
 
53
/* The following knobs are not implemented in the current code */
 
54
 
 
55
/* we need a dynamic level of suppression varying with the ratio of the 
 
56
   power of the echo to the power of the reference signal this is 
 
57
   done so that we have a  smoother background.                 
 
58
   we have a higher suppression when the power ratio is closer to
 
59
   suppr_ceil and reduces logarithmically as we approach suppr_floor.
 
60
 */
 
61
#define SUPPR_FLOOR -64
 
62
#define SUPPR_CEIL -24
 
63
 
 
64
/* in a second departure, we calculate the residual error suppression
 
65
 * as a percentage of the reference signal energy level. The threshold
 
66
 * is defined in terms of dB below the reference signal.
 
67
 */
 
68
#define RES_SUPR_FACTOR -20
 
69
 
 
70
 
 
71
#endif /* _MEC2_CONST_H */
 
72