[asterisk-users] Oslec issue

Marco Signorini marcotasto at libero.it
Sat Dec 6 08:08:35 CST 2008


Hi Joseph.
I spent some time to understand what's missing in the OSLEC patch for
dahdi... I can confirm the same problem you reported some days ago and I
need OSLEC for home personal use.

For what I've understood looking at the code, there is some missing in
the dahdi_echocan_oslec.c file you can find in the
dahdi-linux/drivers/dahdi. I can list below what I did to have it
working. Actually I'm using the trunk revision 5443.

1. In the function "echo_can_create" i've modified the line

*ec = (struct echo_can_state *)oslec_create(ecp->tap_length,0);

with

*ec = (struct echo_can_state *)oslec_create(ecp->tap_length,
ECHO_CAN_USE_ADAPTION | ECHO_CAN_USE_NLP  | ECHO_CAN_USE_CLIP |
ECHO_CAN_USE_TX_HPF | ECHO_CAN_USE_RX_HPF);

This instructs OSLEC to have a working modality properly set.


2. I've replaced the function "echo_can_update" with the code below:

static void echo_can_update(struct echo_can_state *ec, short *iref,
short *isig)
{
        unsigned int SampleNum;

        for (SampleNum = 0; SampleNum < DAHDI_CHUNKSIZE; SampleNum++,
iref++)
        {
                short iCleanSample;
                iCleanSample = (short) oslec_update((struct oslec_state
*)ec, *iref, *isig);
                *isig++ = iCleanSample;
        }
}

This lets the OSLEC to work on complete DAHDI_CHUNKSIZE buffer.


Please, if you have time, let me know if this solves your problem and,
if yes, I'll appreciate to have it public on trunk. I never did a commit
on asterisk svn so I need some hints on how to do it.


Thank you and best regards.
Marco Signorini.



Joseph L. Casale wrote:
> Yesterday I pulled in the latest svn of Dahdi and added the files
> from a recent kernel in the drivers/staging/echo structure and modified
> the Kbuild file so it would compile without error. I insmod'ed the module
> in, and modified my system.conf has echocanceller=oslec.
>
> cat /proc/dahdi/1 shows:
> Span 1: WCTDM/0 "Wildcard TDM410P Board 1" (MASTER)
>         IRQ misses: 1
>
>            1 WCTDM/0/0 FXSKS (In use)  (EC: OSLEC)
>            2 WCTDM/0/1
>            3 WCTDM/0/2
>            4 WCTDM/0/3
>
> With the reco's from http://www.rowetel.com/ucasterisk/oslec.html#install on
> configuring the chan_dahdi.conf file, the system behaves exactly as if there
> is no ec enabled at all?
>
> Are there any additional steps needed to enable oslec under dahdi, I am guessing
> I have missed something?
>
> Thanks,
> jlc
>
>   




More information about the asterisk-users mailing list