A DSP/BIOS AIC23 Codec Device Driver for the TMS320C5510 DSK

Similar documents
A DSP/BIOS AIC23 Codec Device Driver for the TMS320C6416 DSK

A DSP/BIOS EDMA McBSP Device Driver for TMS320C6x1x DSPs

Debugging Shared Memory Systems

TMS320C6000 DSP Interrupt Selector Reference Guide

Programming the TMS320VC5509 RTC Peripheral

Using the TMS320C5509 USB Bootloader

External Programming of the TMS320C64x EDMA for Low Overhead Data Transfers

Configuring Code Composer Studio for OMAP Debugging

Interfacing the ADS8320/ADS8325 to The TMS320C6711 DSP

TMS320C6000 DSP Software-Programmable Phase-Locked Loop (PLL) Controller Reference Guide

TMS320C64x DSP Peripheral Component Interconnect (PCI) Performance

TFP101, TFP201, TFP401, TFP401A 2Pix/Clk Output Mode

Memory Allocation Techniques in System with Dynamic Swapping of Application Codes

DSP/BIOS Driver Developer's Guide

Techniques for Profiling on ROM-Based Applications

A Technical Overview of expressdsp-compliant Algorithms for DSP Software Producers

TMS320VC5409A Digital Signal Processor Silicon Errata

TMS320C620x/C670x DSP Boot Modes and Configuration Reference Guide

Using Endianess Conversion in the OMAP5910 Device

COMMUNICATIONS WITH THE MULTI- CHANNEL HOST P RT INTERFACE

Hardware UART for the TMS320C3x

INVENTORY HISTORY REPORT EXTENSION. User Guide. User Guide Page 1

CUSTOM GOOGLE SEARCH. User Guide. User Guide Page 1

TMS320C6000 DSP 32-Bit Timer Reference Guide

TMS320C6000 DSP General-Purpose Input/Output (GPIO) Reference Guide

TMS320UC5409/TMS320VC5409 Digital Signal Processors Silicon Errata

This document describes the features of the GUI program used to control Power Line Modem with E-Meter Platform.

Using the TMS320 DSP Algorithm Standard in a Dynamic DSP System

TMS470R1x External Clock Prescale (ECP) Reference Guide

INVENTORY REPORT EXTENSION. User Guide. User Guide Page 1

Choosing the Appropriate Simulator Configuration in Code Composer Studio IDE

I2C and the TAS3001C. Introduction. The I2C Protocol. Digital Audio Group ABSTRACT

ADD RELATED PRODUCTS TO CART. User Guide. User Guide Page 1

DSP/BIOS LINK. Pool LNK 082 DES. Version 1.30

Table 1. Proper Termination of Unused (Port) Pins in a Single-Port PSE System

DSP/BIOS Link. Platform Guide Published on 20 th JUNE Copyright 2009 Texas Instruments Incorporated.

FlashBurn: A DSK Flash Memory Programmer

C Fast RTS Library User Guide (Rev 1.0)

The TMS320 DSP Algorithm Standard

DSP/BIOS LINK. Configurable TSK and SWI approach LNK 207 DES. Version <1.00>

Dual Access into Single- Access RAM on a C5x Device

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications

C Routines for Setting Up the AIC on the TMS320C5x EVM

IMPORT/EXPORT Newsletter Subscribers. User Guide. User Guide Page 1

Stereo Dac Motherboard application information

Increase Current Drive Using LVDS

TMS320C62x, TMS320C67x DSP Cache Performance on Vocoder Benchmarks

Application Report. 1 Introduction. MSP430 Applications. Keith Quiring... ABSTRACT

Bootloading the TMS320VC5402 in HPI Mode

NO P.O. BOXES ALLOWED AT CHECKOUT. User Guide. User Guide Page 1

Application Report. 1 System Requirements. 2 Using the DM643x Pin Multiplexing Utility. Bernard Thompson...

SavvyCube Ecommerce Analytics Connector by MageWorx. User Guide

Implementation of a CELP Speech Coder for the TMS320C30 using SPOX

TMS320C672x DSP Software-Programmable Phase-Locked Loop (PLL) Controller. Reference Guide

Writing TMS320C8x PP Code Under the Multitasking Executive

SN5446A, 47A, 48, SN54LS47, LS48, LS49 SN7446A, 47A, 48, SN74LS47, LS48, LS49 BCD-TO-SEVEN-SEGMENT DECODERS/DRIVERS

Maximizing Endurance of MSC1210 Flash Memory

OMAP SW. Release Notes. OMAP Software Tools OST version 2.5 Release. 16xx/1710/242x platforms. Document Revision: 2.5 Release

IndoTraq Development Kit 1: Command Reference

GUEST CHECKOUT TO REGISTERED CUSTOMERS. User Guide. User Guide Page 1

xdais-dm (Digital Media) User Guide

Texas Instruments Voltage-Level-Translation Devices

Protecting the TPS25810 from High Voltage DFPs

TMS320C5x Memory Paging (Expanding its Address Reach)

Application Report. Low-Power Wireless. Shreharsha Rao... ABSTRACT

Power Line Modem with E-Meter Platform Quick Start Guide

TMS320C55x DSP Peripherals Overview Reference Guide. Preliminary Draft

TMS320VC5501/5502 DSP Host Port Interface (HPI) Reference Guide

PCIxx12 Single Socket CardBus Controller with Integrated 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller

Wolverine - based microcontrollers. Slashing all MCU power consumption in half

PROGRAMMING THE MSC1210

GUEST CHECKOUT TO REGISTERED CUSTOMERS

XIO1100 NAND-Tree Test

DS25BR204 Evaluation Kit

TMS320VC5510 DSP Host Port Interface (HPI) Reference Guide

IMPORT/EXPORT CUSTOMERS FOR MAGENTO 2. User Guide. User Guide Page 1

PMC to PCI Express Adapter with JN4 Connector Breakout

Stacking the REF50xx for High-Voltage References

SN5476, SN54LS76A SN7476, SN74LS76A DUAL J-K FLIP-FLOPS WITH PRESET AND CLEAR

IMPORT/EXPORT WISH LIST ITEMS FOR MAGENTO 2. User Guide. User Guide Page 1

A Multichannel/Algorithm Implementation on the TMS320C6000 DSP

AC Induction Motor (ACIM) Control Board

System-on-Chip Battery Board User s Guide

DSP/BIOS LINK RING IO LNK 129 DES. Version 0.91

October 2002 PMP Portable Power SLVU074

Using the TMS320VC5509/5510 Enhanced HPI

WM8805_6152_DS28_EV1_REV3 Schematic and Layout. WM8805_6152_DS28_EV1_REV3 Schematic and Layout. Customer Information 1 of 18 June 2007, Rev 3.

EV Software Rev Evaluation System User Guide. Introduction. Contents. Hardware and Software Setup. Software Installation

WL1271 ini File Description and Parameters User's Guide

TMS320C6000 DSP Expansion Bus: Multiple DSP Connection Using Asynchronous Host Mode

SN65DSI86 SW Examples

TMS320C6000 HPI to PCI Interfacing Using the PLX PCI9050

January 2003 Digital Audio Products SLEU031

Performance Analysis of Face Recognition Algorithms on TMS320C64x

Important Notice. All company and brand products and service names are trademarks or registered trademarks of their respective holders.

Store & Currency Auto Switcher

DSP/BIOS Tconf Language Coding Standards

HSKT TM Technology Specifications

February 2003 PMP EVMs SLVU081

TMS320C6414T/15T/16T Power Consumption Summary

Transcription:

Application Report SPRA856A June 2003 A DSP/BIOS AIC23 Codec Device for the TMS320C5510 DSK ABSTRACT Software Development Systems This document describes the implementation of a DSP/BIOS device driver for the AIC23 codec on the TMS320C5510 DSK. This device driver is written in conformance to the DSP/BIOS IOM device driver model. The main functionality of this device driver is to set up the codec. The actual data samples transformation is performed by the generic C5510_DMA_MCBSP part of the driver. This device driver is an interface for the core generic C5510_DMA_MCBSP driver. Contents 1 Usage............................................................................... 2 1.1 Configuration.................................................................... 3 1.2 Device Parameters............................................................... 4 1.3 Channel Parameters.............................................................. 5 1.4 Control Commands............................................................... 5 2 Architecture......................................................................... 5 3 Constraints.......................................................................... 5 4 References.......................................................................... 5 Appendix A Device Data Sheet.................................................... 6 A.1 Device Library Name........................................................ 6 A.2 DSP/BIOS Modules Used.......................................................... 6 A.3 DSP/BIOS Objects Used.......................................................... 6 A.4 CSL Modules Used............................................................... 6 A.5 CPU Interrupts Used.............................................................. 6 A.6 Peripherals Used................................................................. 6 A.7 Interrupt Disable Time............................................................. 6 A.8 Memory Usage................................................................... 6 List of Figures Figure 1 DSP/BIOS IOM Device Model............................................ 2 Figure 2 Codec Device Partitioning................................................ 3 List of Tables Table 1 dmaporttype Values.......................................................... 4 Table A 1 Device Memory Usage................................................... 6 Trademarks are the property of their respective owners. 1

1 Usage The device driver described here is actually part of an IOM mini-driver. That is, it is implemented as the lower layer of a 2-layer device driver model. The upper layer is the class driver, and can be the DSP/BIOS GIO, SIO/DIO, or PIP/PIO modules, or even some other class driver. The upper layer provides an independent and generic set of APIs and services for a wide variety of mini-drivers and allows the application to use a common interface for I/O requests. Figure 1 shows the overall DSP/BIOS device driver architecture. For more information about the IOM device driver model as well as the GIO, SIO/DIO, and PIP/PIO modules, see the References section. Application / Framework PIP APIs SIO APIs Device Class PIO Adapter DIO Adapter GIO APIs Mini- IOM Mini-(s) Chip Support Library (CSL) On-Chip Peripheral Hardware Off-Chip Peripheral Hardware Figure 1. DSP/BIOS IOM Device Model As shown in Figure 2, mini-drivers are often split into a generic part and a codec-specific part in order to maximize code reusability. This application note only describes the codec-specific part of the mini-driver, which uses the generic C5510_DMA_MCBSP driver to transfer data to and from the serial ports. Because this codec-specific part is dependent on the generic C5510_DMA_MCBSP driver, an application must link all the libraries necessary for it to function correctly: one from the codec-specific part discussed here, and one from the generic C5510_DMA_MCBSP part. These two libraries are called dsk5510_dma_aic23.l55 and c5510_dma_mcbsp.l55, respectively. 2 A DSP/BIOS AIC23 Codec Device for the TMS320C5510 DSK

Application/Framework Class Codec-Specific Part of Mini- Mini- Generic Part of Mini- Chip Support Library Figure 2. Codec Device Partitioning 1.1 Configuration To use this device driver, a device entry has to be added and configured in the DSP/BIOS configuration tool. Refer to the DSP/BIOS Device Developer s Guide (SPRU616) for more information on how to use the DSP/BIOS configuration tool to configure device drivers. This device driver will set up the generic C5510_DMA_MCBSP driver to meet its needs. The following are the device configuration settings required to use this driver: Init function: _DSK5510_DMA_AIC23_init. Function table ptr: _DSK5510_DMA_AIC23_Fxns. Function table type: IOM_Fxns. Device id: This property is ignored by this device driver since there is only one AIC23 codec on the TMS320C5510 DSK and it is hard-coded within the driver. Device params ptr: An optional pointer to an object of type DSK5510_DMA_AIC23_DevParams as defined in the header file dsk5510_dma_aic23.h. This pointer will point to a device parameter structure. Set this pointer to NULL to use the default parameters. The parameter structure and defaults are described below. Device global data ptr: N/A, not used by this driver. A DSP/BIOS AIC23 Codec Device for the TMS320C5510 DSK 3

1.2 Device Parameters typedef struct DSK5510_DMA_AIC23_DevParams { Int versionid; Uns rxdmaid; Uns txdmaid; Uns dmaporttype; AIC23_Params aic23; Uns rxiermask[2]; Uns txiermask[2]; } DSK5510_DMA_AIC23_DevParams; versionid: Version number of the driver. rxdmaid: Receive DMA channel. txdmaid: Transmit DMA channel. dmaporttype: Specifies the type of memory to be used by DMA. By default, it uses DARAM. The possible dmaporttype values are shown in Table 1. Table 1. dmaporttype Values dmaporttype DSK5510_DMA_AIC23_PORTTYPE_DARAM DSK5510_DMA_AIC23_PORTTYPE_SARAM DSK5510_DMA_AIC23_PORTTYPE_EMIF DSK5510_DMA_AIC23_PORTTYPE_DEFAULT Value DARAM SARAM EMIF DARAM aic23: The codec registers setup. If the device parameters pointer is NULL, the default parameters are used. Here are the default setups for the registers. Register 0: Left input channel volume control. Default value is 0x0017. Register 1: Right input channel volume control. Default value is 0x0017. Register 2: Left channel headphone volume control. Default value is 0x01F9. Register 3: Right channel headphone volume control. Default value is 0x01F9. Register 4: Analog audio path control. Default value is 0x0011. Register 5: Digital audio path control. Default value is 0x0000. Register 6: Power down control. Default value is 0x0000. Register 7: Digital audio interface format control. Default value is 0x0043. Register 8: Sample rate control. Default value is 0x0081, which is 48 khz. Register 9: Digital interface activation. Default value is 0x0001. rxiermask: Interrupt Enable Register mask, set in receiver ISR. txiermask: Interrupt Enable Register mask, set in transmitter ISR. 4 A DSP/BIOS AIC23 Codec Device for the TMS320C5510 DSK

1.3 Channel Parameters This device driver does not have any channel parameters. Any values that are passed as channel parameters will be ignored. Specifying NULL is suggested. 1.4 Control Commands This device driver has no run-time control commands. 2 Architecture This codec-specific portion of the mini-driver is a layer to the generic C5510_DMA_MCBSP part that transfers the data samples, opens the channels, and so on. The codec-specific part uses two basic functions, mdbinddev() and mdcreatechan(), to bind with the functions from the generic part. The mdbinddev() function uses McBSP port 1 to set up the codec and passes the McBSP port 2 to the generic C5510_DMA_MCBSP mdbinddev() function to handle data control. The mdcreatechan() function specifies the mode of the channel (i.e., input or output) to be opened and then call the generic C5510_DMA_MCBSP mdcreatechan() function to carry out the work of creating the channel. It is important to note that every sample sent to the codec that has the LSB set will be interpreted as a command. This device driver does not strip the LSB when sending the samples to the codec, so the application layer has to strip the LSB from every sample it sent to the codec device driver. 3 Constraints Inherits the constraints of the generic C5510_DMA_MCBSP part of the mini-driver. Application must strip the least significant bit (LSB) from the data. 4 References All these documents are available at the TI Developer s Village. 1. TMS320C55x Chip Support Library API User s Guide (SPRU433). 2. TMS320C5000 DSP/BIOS Application Programming Interface (API) Reference Guide (SPRU404C). 3. DSP/BIOS Device Developer s Guide (SPRU616). 4. TLV320AIC23 Stereo Audio Codec, 8 to 96 KHz, With Integrated Headphone Amplifier Data Manual, SLWS106D 5. A DSP/BIOS Generic DMA McBSP Device for TMS320C5000 DSPs (SPRA858). A DSP/BIOS AIC23 Codec Device for the TMS320C5510 DSK 5

Appendix A Device Data Sheet A.1 Device Library Name dsk5510_dma_aic23.l55 c5510_dma_mcbsp.l55 is required for building application. A.2 DSP/BIOS Modules Used A.3 DSP/BIOS Objects Used A.4 CSL Modules Used A.5 CPU Interrupts Used A.6 Peripherals Used McBSP port 1 is used to setup the codec. McBSP port 2 is used for data control. A.7 Interrupt Disable Time Maximum time that hardware interrupts can be disabled by the driver: refer to the generic C5510_DMA_MCBSP documentation. This measurement is taken using the compiler option O3. A.8 Memory Usage Table A 1. Device Memory Usage Uninitialized memory Initialized memory CODE 320 (8-bit bytes) DATA 222 (8-bit bytes) 242 (8-bit bytes) NOTE: This data was gathered using the sectti command utility. Uninitialized data:.bss Initialized data:.cinit +.const Initialized code:.text +.text:init The sizes in this table were measured on the driver library build for small model on the C5510 DSK platform. Note that to calculate the total driver overhead, you must include the sizes of the generic C5510_DMA_MCBSP part of the mini-driver as well. These size overheads are listed in the generic part s application note, which is listed in the References section. 6 A DSP/BIOS AIC23 Codec Device for the TMS320C5510 DSK

IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed. TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Mailing Address: Texas Instruments Post Office Box 655303 Dallas, Texas 75265 Copyright 2003, Texas Instruments Incorporated