[asterisk-dev] DAHDI: force channel to SLIN

Dan Amarandei dan.amarandei at gmail.com
Tue Feb 2 23:18:18 CST 2010


Thanks for the quick response,
Here is more info:

This is for the Si3216 chipset which is capable of wideband audio
however only in linear mode. I just finished porting the Zaptel Blackfin
driver to DAHDI and Asterisk 1.6. Everything works fine in normal mode
with this chip as it should since it is pin compatible with the Si3215.
For wideband mode my plan was as follows:
change the DAHDI_CHUNKSIZE to 16
keep the sampling interrupt happening at 1ms 
switch the Si3216 to linear and wideband (WBE, PCMF) 
change the "sport" dma functions to handle 16bit samples. before
8samples * 8bits, now 8 samples * 16 bits, equivalent to 2ms worth of
data. 
hack chan_dahdi to handle 2ms worth of data as 1  and convert it from
slin to G722.

Thanks,

Dan.
 
 

 
On Tue, 2010-02-02 at 09:52 -0500, Moises Silva wrote:
> Hello,
> 
> On Mon, Feb 1, 2010 at 9:34 PM, Dan Amarandei
> <dan.amarandei at gmail.com> wrote:
>         I am trying to force an fxs dahdi channel to slin. I see that
>         DAHDI_SETLINEAR sets the DAHDI_FLAG_LINEAR in chan->flags in
>         dahdi-base.c but I am not sure how to force chan_dandi.conf or
>         dahdi/system.conf to switch to it, 
> 
> Cannot be done through system.conf or chan_dahdi.conf settings, it's
> most a programming decision depending on the situation (each time
> dahdi_write is called with a linear frame or the rawreadformat is
> changed to linear by Asterisk).
> 
>  
>         and secondly if that was done I don't
>         see how DAHDI_FLAG_LINEAR affects anything in the existing
>         DAHDI drivers
>         for TDM400P (the driver I am working on is based on the same
>         chipset). I
>         know that the fax apps somehow force DAHDI to slin so I hope
>         this is
>         possible. meetme seems to do it for the pseudo channel which
>         probably
>         won't help.
> 
> Look into dahdi-base.c, you can see how DAHDI_FLAG_LINEAR will cause
> transcoding from ulaw/alaw to slinear before returning a read buffer
> to user space (dahdi_chan_read) and before pushing down buffers to
> hardware (dahdi_chan_write).
> 
> It's probably better for you to describe why is that you want to set
> the read/write format in the dahdi channel to linear in order to get
> some help.
> 
> 
> -- 
> Moises Silva
> Senior Software Engineer
> Sangoma Technologies Inc. | 50 McIntosh Drive, Suite 120, Markham ON
> L3R 9T3 Canada
> t. 1 905 474 1990 x 128 | e. moy at sangoma.com
> -- 
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev





More information about the asterisk-dev mailing list