Interfacing a DSP-Based Multi-Purpose Telephony and Audio System to a Digital PBX Clement Wong, Spectrum Signal Processing Inc., Canada: icspat.com
INTERFACING A DSP-BASED MULTI-PURPOSE TELEPHONY AND AUDIO SYSTEM TO A DIGITAL PBX Clement Wong Spectrum Signal Processing Inc. Burnaby, British Columbia, Canada Introduction This paper presents a hardware/software system that interfaces a Mwave DSP-based multi-purpose telephony and audio card to a NorTel digital PBX 1 with an ISDN-like data stream. The hardware addresses the issues of how to convert the PBX's digital data stream into a form that is understandable by the DSP and its output devices. If this conversion process was done on the DSP, it would occupy MIPs and memory that can be used for other tasks. The DSP itself is responsible for controlling data flow throughout the hardware, to process the signal and control data, and to communicate telephony and audio data between the host and the PBX. This system uses a software architecture that balances the processing load between the DSP and host. The DSP software deals with time critical tasks which include processing input data, outputting data to the appropriate ports, and interfacing with the host. Configuration and control of peripherals is a non-time critical task of the DSP. On the host, the software architecture allows higher-level applications to interface to the hardware through simple function calls. This allows programmers without an intimate knowledge of the hardware to design an application that utilizes the features that this system provides. For this system, Spectrum Signal Processing (SSP) and NorTel worked together to design a hardware and software platform to realize a fully integrated computer telephony system. IBM Mwave provided a major portion of the DSP and Host software as well as the reference hardware design for the Mwave DSP chipset. 1 Private Branch Exchange General Overview of the Mwave System The IBM Mwave system integrates the Mwave DSP with a software architecture that allows the hardware to contain a minimum number of memory chips; consequently, lowering the cost of producing the hardware. Being geared for multi-media applications, IBM has designed ports within the Mwave DSP that interfaces to telephony and audio hardware. IBM provides the BIOS code for these ports along with proprietary software for a v.34 modem, audio functionality, and UART emulation. Figure 1 illustrates the software architecture of the Mwave system. Mwave Application Mwave Device Drivers Mwave Manager Mwave Operating System Mwave DSP Tasks Application Programming Interface Host Code DSP Code Figure 1. Mwave Software Architecture The Mwave Device Drivers interpret calls from the Mwave Application program and make the correct Mwave Manager calls to control the DSP. The Mwave Manager provides a hardware independent interface to the Mwave Device Drivers, but contains ahardware specific component with direct links to the DSP. This component has the capability of accessing data memory, unloading and loading tasks, and performing other DSP resource management tasks. Programmers can modify this hardware specific component for compatibility with different variations on the Mwave hardware reference design. The Mwave OS is responsible for scheduling the various tasks that may run concurrently on the DSP at any given time. Finally, the Mwave Hardware Tasks perform the fax, v.34 modem, and audio functionality. One of the major features of this system is the use of the host PC. Unlike other modems that require non-volatile memory to store modem software, the Mwave system stores all of its modem software and data on the Host PC's hard drive. When the user starts the Mwave system, it will only load the OS and its associated hardware BIOS tasks onto the DSP. Only when the user initiates a modem call or a fax call does the Mwave Manager load the appropriate DSP tasks. In contrast, typical "off-the-shelf" modems already have all of its modem software loaded even if the user has not initiated a modem call. By utilizing the relatively large storage space afforded by the host PC's hard disk, the cost of manufacturing a Mwave-based hardware design is more cost effective due to the use of less memory chips. The System Hardware Architecture For this system, the major challenge to SSP hardware designers was interfacing the Mwave DSP to a digital PBX. The hardware design contains several major blocks: the NorTel chipset, a SSP custom ASIC, the Mwave DSP, audio hardware, and a MVIP 2 interface. Figure 2 presents a high-level view of the hardware architecture used to interface with the PBX. Data from the PBX first passes through the NorTel chipset, proceeds to the SSP ASIC, and then arrives at the DSP. 2 Multi-Vendor Integration Protocol. A standard used in the computer telephony field to provide a method of communication between two platforms from different vendors. See www.mvip.org for more information.NorTel's chipset directly interfaces to the PBX and a telephone set. Due to the multi-channel characteristic of the ISDN-like data stream, each channel can contain different data. For example, channel B1 3 could contain modem data and B2 H.320 4 videoconferencing data. The SSP ASIC designed for this system solves the problem of how to route the data to the appropriate hardware blocks. The tasks in the DSP processes this data based on commands from host applications. Mwave DSP Audio Hardware SSP Slot Router ASIC MVIP Interface NorTel PBX Interface Chipset Videoconferencing Hardware NorTel PBX NorTel Telephone Set Figure 2. Hardware System Block Diagram This SSP ASIC can be thought of as a railyard and the DSP as the controller responsible for routing the trains to different destinations based on higher level information. Therefore, the DSP, based on information from higher level host applications, controls the SSP ASIC to route data to the correct peripherals. The SSP ASIC also serves as a gateway to controlling the NorTel chipset. Additionally, the SSP ASIC processes the ISDN-like data stream from the NorTel chipset into a form understood by the hardware components on this system. Initially, SSP considered performing these "bit-bashing" operations on the DSP. Unfortunately, there are not enough MIPs, data storage, and instruction storage on the DSP to perform the "bit-bashing" task in addition to the BIOS, modem, and audio tasks. As a result, SSP designed the ASIC to include bit-level manipulation of the ISDN-like data stream. 3 ISDN data is typically divided up into different timeslots. For example, an ISDN data stream can be described as being 2B+D. This means it contain 2 B-channels for streaming raw data and 1 D-channel for streaming control data. Refer to [3]. 4 An ITU-T videoconferencing recommendation. Refer to [2]. Figure 2 shows a MVIP interface for communication with videoconferencing hardware. The MVIP interface on the hardware affords this system the flexibility to interface to other systems compliant with the MVIP standard. The System Software Architecture As mentioned in the hardware description, the most significant difference between the reference design provided by IBM and SSP's PBX-based system was digital telephony versus analog telephony. This presented a challenge to the SSP software engineers because the PBX-based system required modifications to the telephony BIOS. Additionally, requirements stated that the host software must be TAPI-compliant 5 . As a result, a software layer was written by SSP to interface with the NorTel written TAPI-compliant software layer . Figure 3 illustrates the modified software architecture required to interface with a digital PBX. In Figure 3, the SSP layer was written to communicate to the NorTel written TAPI-compliant layer. The SSP software layer provided a generic interface to NorTel for controlling the hardware. In this way, NorTel did not require any knowledge specific to interfacing with the Mwave DSP; consequently, enabling NorTel to focus on their TAPI application and SSP to focus on the lower level software layers. At the other end, the SSP software layer interfaces with the SSP modified Mwave Manager. As mentioned in the Mwave section of this paper, the Mwave Manager contains a hardware specific component along with the hardware independent API. SSP modified the hardware specific component for compatibility with this system's hardware platform. 5 Telephony Application Interface. An API defined by Microsoft allowing TAPI-compliant application to command hardware such as modems and audio hardware.NorTel TAPI Compliant Device Driver SSP Modified Mwave Manager Mwave Operating System SSP & Mwave DSP Tasks SSP/NorTel Defined Application Programming Interface Mwave Device Drivers SSP DSP Services Layer Host Code DSP Code TAPI Compliant Application Figure 3. System Software Architecture As an example to illustrate the software architecture, suppose a user initiates a v.34 modem call through a TAPI-compliant modem application. When this happens, the NorTel software layer detects the event and makes the appropriate calls to the SSP software layer. In turn, the SSP software layer issues the appropriate Manager calls to load the DSP tasks required for a v.34 modem connection. At the DSP level, to interface Mwave's DSP software to a digital PBX, SSP re-configured the front-end of Mwave's analog telephony BIOS. Figure 4 presents a block diagram illustrating the DSP tasks written to ensure that the existing Mwave telephony software can be kept intact even for a digital telephone line.
SSP Slot Router ASIC NorTel PBX Interface BIOS MuLaw Encoder and Decoder Task Rate Converter Task Mwave Analog Telephony BIOS Hardware DSP Other Telephony Related Tasks Figure 4. Telephony BIOS Modification for Interfacing to a Digital PBX The SSP PBX telephony BIOS designed to interface with the SSP ASIC divides the ISDN-like data stream into B-channels and D-channels 6 . Processing of the B-channels depends on commands from the high-level host application. For example, commands issued by an audio application causes the loading of DSP tasks responsible for processing audio data and streaming it to the audio codec. On the other hand, the PBX telephony BIOS streams D-channel data to the NorTel software layers for interpretation. After interpreting these commands, the NorTel software makes the appropriate calls to the SSP software layer. Mwave's analog telephony BIOS expects unencoded telephony data sampled at 9600Hz. The NorTel PBX samples analog telephony data at 8000Hz and performs mulaw encoding and decoding. Because of this, SSP wrote the rate converter 7 and mulaw encoder/decoder shown in Figure 4. As well, because Mwave's telephony BIOS no longer directly interfaces with the hardware, its front-end was re-configured to interface with DSP tasks rather than a hardware I/O data buffer. Because this new software architecture interfaces a modified analog telephony software architecture to a digital PBX, it caused some problems with the modem's echo canceller. The v.34 and v.32bis modem's echo canceller has been designed by Mwave to expect a specific echo round-trip delay. Because the new DSP tasks increased the echo 6 D-channel data usually contains commands to perform functions like bringing a telephone set off hook or DTMF dialing. 7 The rate converter uses a polyphase filter. Refer to [1].round-trip delay, the v.34 and v.32bis modem malfunctioned. To decrease the echo round-trip delay back to an acceptable value, SSP integrated the rate converter and the mulaw encoder/decoder into the PBX telephony BIOS and then increased the frequency at which the OS schedules the BIOS task. Conclusions To interface to a digital PBX, SSP designed a hardware system containing several major blocks: the NorTel chipset, a SSP custom ASIC, the Mwave DSP, audio hardware, and a MVIP interface. The major functions of the SSP custom ASIC include routing data to the hardware components, controlling the NorTel chipset, and performing the bit-level manipulation of the ISDN-like data stream. Although the DSP could have performed the "bit-bashing", its resources were more effectively utilized for the various telephony and audio DSP tasks. After modifying and adding to the existing Mwave software architecture, SSP was able to design a software system that allows a TAPI-compliant application to utilize the features of the Mwave DSP. SSP modified Mwave's analog telephony BIOS to interface to a digital PBX through SSP's PBX telephony BIOS, rate converter, and mulaw encoder/decoder tasks. On the host, SSP added a software layer to communicate to NorTel's TAPI-compliant software layer. At the other end, the SSP software layer interfaces to the existing Mwave architecture; consequently, allowing NorTel to concentrate on their TAPI application without having to become intimate with the Mwave software architecture. In summary, this system represents a Mwave DSP-based computer telephony solution that allows the user to interface to a digital PBX through a desktop personal computer with full fax/modem, voicemail, videoconferencing, and various audio capabilities. This is particularly advantageous in companies with a digital PBX-based telephone system. References [1] Crochiere R.E. and R.R. Rabiner. 1983. Multirate Digital Signal Processing. Englewood Cliffs, New Jersey: Prentice-Hall, Inc. [2] ITU-T Recommendation H.320. March, 1993. [3] Stallings W. 1995. ISDN and Broadband ISDN with Frame Relay and ATM, Third Edition. Englewood Cliffs, New Jersey: Prentice-Hall, Inc. [4] Intermetrics, Inc. 1993. Mwave Developer's Toolkit: Application Developer's Guide. |