--- dahdi-linux-complete-2.2.0-rc4+2.2.0-rc2/linux/drivers/dahdi/dahdi_echocan_oslec.c 2009-04-30 01:24:04.000000000 +0700 +++ dahdi-linux-complete/linux/drivers/dahdi/dahdi_echocan_oslec.c 2009-05-29 19:36:34.788815308 +0700 @@ -42,6 +42,7 @@ static void echo_can_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec); static void echo_can_process(struct dahdi_echocan_state *ec, short *isig, const short *iref, u32 size); static int echo_can_traintap(struct dahdi_echocan_state *ec, int pos, short val); +static void echo_can_hpf_tx(struct dahdi_echocan_state *ec, short *tx, u32 size); static const struct dahdi_echocan_factory my_factory = { .name = "OSLEC", @@ -54,6 +55,7 @@ .echocan_free = echo_can_free, .echocan_process = echo_can_process, .echocan_traintap = echo_can_traintap, + .echocan_hpf_tx = echo_can_hpf_tx, }; struct ec_pvt { @@ -117,6 +119,19 @@ return 1; } +static void echo_can_hpf_tx(struct dahdi_echocan_state *ec, short *tx, u32 size) +{ + struct ec_pvt *pvt = dahdi_to_pvt(ec); + u32 SampleNum; + + for (SampleNum = 0; SampleNum < size; SampleNum++, tx++) { + short iCleanSample; + + iCleanSample = oslec_hpf_tx (pvt->oslec, *tx); + *tx = iCleanSample; + } +} + static int __init mod_init(void) { if (dahdi_register_echocan_factory(&my_factory)) {