PREV TOC HOME INDEX NEXT


6.1 Types of Buffers

A buffer is a temporary storage area for data transfer. The CSP software uses buffers at different layers in the Dialogic software to transfer data between the layers, from the application to the firmware where echo cancellation is performed.

The size of a buffer affects real-time processing and latency as well as system performance. You must choose a buffer size carefully to maximize throughput and minimize system load.

For SpringWare boards, the CSP software uses the buffers shown in Table6-1. For DM3 boards, the CSP software uses the buffers shown in Table6-2.

See Figure6-1, Data Flow from Application to Firmware and Figure6-2, Data Flow from Application to Firmware (DM3 Boards) for an illustration of these buffers.

Table 6-1. Types of Buffers Used in CSP (SpringWare Boards) 
Buffer name
Configurable
Parameter/Description
Driver buffers (in Windows) Yes: from 128 bytes to 16 kbytes (in multiples of 128 bytes) ECCH_XFERBUFFERSIZE Specifies the size of the host application buffers on the receive side of a CSP-capable channel. These buffers are allocated and tracked by the libraries. The default buffer size is 16 kbytes. The content of these buffers is sent to the user-defined callback function in ec_stream( ). The content is sent to a file or memory buffer when using ec_reciottdata( ).
Driver buffers (in Linux) Yes (when used as described only): 1 kbytes, 2 kbytes, 4 kbytes, 8 kbytes, 16 kbytes

ECCH_XFERBUFFERSIZE Same description as driver buffers in Windows with the following limitation. By default, the amount of data passed to the user-defined callback function is fixed at 16 kbytes. You can only override this default per process by calling ec_setparm( ) BEFORE opening a channel: int size = 1024; /* or 2, 4, 8, 16 kbytes */...ec_setparm(SRL_DEVICE, ECCH_XFERBUFFERSIZE, &size)

Note: You must use SRL_DEVICE as the device name.

Firmware buffers Yes: from 128 bytes to 512 bytes DXBD_TXBUFSIZE and DXBD_RXBUFSIZE Specifies the size of the transmit (play) and receive (record) buffers in shared RAM. These buffers are used to transfer data between the firmware and the driver. To change firmware buffers from the default of 512 bytes, you must modify the voice.prm file. For more information, see the installation and configuration guide.
Pre-speech buffer No: 250 ms Not configurable.

For more information on these parameters, see DXBD_RXBUFSIZE, DXBD_TXBUFSIZE and ECCH_XFERBUFFERSIZE descriptions in ec_setparm( ) in the Continuous Speech Processing API Library Reference.

Table 6-2. Types of Buffers Used in CSP (DM3 Boards) 
Buffer name
Configurable
Parameter/Description
Transfer buffers Yes: from 240 bytes (30 ms) to 16 kbytes ECCH_XFERBUFFERSIZE Specifies the size of the host application buffers on the receive side of a CSP-capable channel. These buffers are allocated and tracked by the libraries. The content of these buffers is sent to the user-defined callback function in ec_stream( ). The content is sent to a file or memory buffer when using ec_reciottdata( ). On DM3 boards, the size of the buffers sent from the firmware to the host is derived from the size of the transfer buffers. If the transfer buffer is less than or equal to 2 kbytes, then the firmware buffer is set to the same size as the transfer buffer. If the transfer buffer is greater than 2 kbytes, then the firmware buffer is set to 2 kbytes. The content of multiple firmware buffers is accumulated in the transfer buffer before being written to file or provided to the application callback function. The firmware buffer size cannot be greater than 2 kbytes.
Pre-speech buffer No: 250 ms Not configurable.


PREV TOC HOME INDEX NEXT

Click here to contact Dialogic Customer Engineering

Copyright 2001, Intel Corporation
All rights reserved
This page generated December, 2001