aboutsummaryrefslogtreecommitdiffstats
path: root/main/tdd.c
diff options
context:
space:
mode:
authordbailey <dbailey@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-06 19:52:40 +0000
committerdbailey <dbailey@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-06 19:52:40 +0000
commitaea3c1d33fdb0f9909a1cd471bffc68344bd70e9 (patch)
treee0afd225c0798db143d3f9595132802a471ea894 /main/tdd.c
parent59d1fbc49cc2b332bb825ea28da88dca25848a99 (diff)
Change the fsk filter used in CID and TDD decode to an integer based implementation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78227 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/tdd.c')
-rw-r--r--main/tdd.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/main/tdd.c b/main/tdd.c
index a3ef39282..49c8b51dc 100644
--- a/main/tdd.c
+++ b/main/tdd.c
@@ -103,20 +103,23 @@ struct tdd_state *tdd_new(void)
struct tdd_state *tdd;
tdd = calloc(1, sizeof(*tdd));
if (tdd) {
- tdd->fskd.spb = 176; /* 45.5 baud */
+ tdd->fskd.ispb = 176; /* 45.5 baud */
+ /* Set up for 45.5 / 8000 freq *32 to allow ints */
+ tdd->fskd.pllispb = (int)((8000 * 32 * 2) / 90);
+ tdd->fskd.pllids = tdd->fskd.pllispb/32;
+ tdd->fskd.pllispb2 = tdd->fskd.pllispb/2;
tdd->fskd.hdlc = 0; /* Async */
tdd->fskd.nbit = 5; /* 5 bits */
- tdd->fskd.nstop = 1.5; /* 1.5 stop bits */
+ tdd->fskd.instop = 1; /* integer rep of 1.5 stop bits */
tdd->fskd.parity = 0; /* No parity */
tdd->fskd.bw=0; /* Filter 75 Hz */
tdd->fskd.f_mark_idx = 0; /* 1400 Hz */
tdd->fskd.f_space_idx = 1; /* 1800 Hz */
- tdd->fskd.pcola = 0; /* No clue */
- tdd->fskd.cont = 0; /* Digital PLL reset */
- tdd->fskd.x0 = 0.0;
+ tdd->fskd.xi0 = 0;
tdd->fskd.state = 0;
tdd->pos = 0;
tdd->mode = 2;
+ fskmodem_init(&tdd->fskd);
} else
ast_log(LOG_WARNING, "Out of memory\n");
return tdd;