Sound delay in i4b

Hans Petter Selasky hselasky at c2i.net
Mon May 15 12:03:56 UTC 2006


On Monday 15 May 2006 12:20, Dirk Thannhäuser wrote:
> On May 15, 2006, at 9:38 AM, Hans Petter Selasky wrote:
> > Hi,
> >
> > On Sunday 14 May 2006 22:57, Dirk Thannhäuser wrote:
> >> On May 14, 2006, at 3:18 PM, Hans Petter Selasky wrote:
> >>> Do you have SVN installed?
> >>
> >> yes i have. I checked out the version which included both, the i4b
> >> and the chan_capi. Is ist possible that my version was to old?
> >> I just did a new checkout.
> >> Subversion says "Checked out revision 264."
> >
> > That should be the latest version. It was fixed in "Revision 257",
> > which was
> > after that I released Version 1.6.0 in April.
>
> Hmm. i compiled the latest release (i4b and chan_capi) yesterday and
> tested it with the echo test application. The delay is the same as
> before.
> When I call the server internal (My Phone -> ISDNCard(NT) -> Asterisk
> (1.2.4) (isdnd not running. cards set to TE/NT mode via "isdnconfig"
> command . The delay in the echo test application remains unchanged at
> about 250ms to half a second. (not measured, it's just my feeling,
> but i know the difference to the zaptel FreeBSD driver). My machine
> is a Siemens Scenic L (1.6Ghz/512MB RAM). That schould be enough
> power to get low latency.

Sure, but that is only when the computer is not loaded. 50ms interrupts were 
chosen because it will allow one to heavily load the computer without loosing 
any data.

> How easy would it be to play around with changing latencey. Should i
> take a look to the chan_capi sources to get latency changed?
>

It is not very difficult to play around to get the latency down.

Edit: /usr/src/sys/i4b/layer1/ihfc2/i4b_ihfc2_drv.c

Change:

.s_ctmt_pci        = 0x00 | 0x17, /* t50ms + trans */

Into:

.s_ctmt_pci        = 0x00 | 0x13, /* t25ms + trans */


And change:
                  /* default AUDIO limit == 100ms of data */

                  /* limit fifo usage to 800 bytes(100ms)
                   * - Assuming that about 400 bytes(50ms)
                   * is needed for each interrupt:
                   */
                  f->Z_min_free -= 800;
Into:

                  /* default AUDIO limit == 100ms of data */

                  /* limit fifo usage to 800 bytes(100ms)
                   * - Assuming that about 400 bytes(50ms)
                   * is needed for each interrupt:
                   */
                  f->Z_min_free -= 400;

> >> Are there any "cheap" HFC-4S cards out there for testing?
> >
> > There exist some developer kits, but they are not so easy to get a
> > hand on.
> > The only place I know that sales HFC-4S are:
>
> A developer Kit would be the card of my choice.
> Does Bero sell them or shoud i contact colognechip?

I don't know.

>
> > http://shop.beronet.com
> >
> > And maybe "http://www.junghanns.net/".
> >
> >> I think that this also means that i am not able to run one card
> >> (HFC-1S) in slave mode, getting the clock from the other to keep them
> >> in sync without soldering.
> >
> > Yes.
> >
> >> For Voice over IP a huger delay might be ok. thats also my opinion.
> >> but what about Faxing over ISDN. Here I think latency is an important
> >> issue. (didn't test the CAPI Fax receiption, yet)
> >
> > Faxing works, but really you need to use line interconnect to get
> > faxing
> > working reliably. Or you can receive the fax in asterisk. That also
> > works.
>
> Does it also work with about 250ms delay? (it exists on both sides
> from my NT-Card to asterisk and also from the TE-Card to asterisk
> may be that i did something wrong compiling the sources although i
> cleaned the BSD sourcetree applied the patches again an then started
> compiling the get a "fresh" state an no confusion with the older
> release which was installed before.

Yes, faxing works with 250ms delay.

--HPS


More information about the freebsd-isdn mailing list