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

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

A DSP/BIOS EDMA McBSP Device Driver for TMS320C6x1x DSPs

External Programming of the TMS320C64x EDMA for Low Overhead Data Transfers

Debugging Shared Memory Systems

Programming the TMS320VC5509 RTC Peripheral

Interfacing the ADS8320/ADS8325 to The TMS320C6711 DSP

TMS320C6000 DSP Interrupt Selector Reference Guide

TMS320C64x DSP Peripheral Component Interconnect (PCI) Performance

Using the TMS320C5509 USB Bootloader

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

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

DSP/BIOS Driver Developer's Guide

Techniques for Profiling on ROM-Based Applications

COMMUNICATIONS WITH THE MULTI- CHANNEL HOST P RT INTERFACE

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

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

CUSTOM GOOGLE SEARCH. User Guide. User Guide Page 1

Configuring Code Composer Studio for OMAP Debugging

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

Hardware UART for the TMS320C3x

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

TMS320C6000 DSP 32-Bit Timer Reference Guide

INVENTORY REPORT EXTENSION. User Guide. User Guide Page 1

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

Memory Allocation Techniques in System with Dynamic Swapping of Application Codes

TMS320C620x/C670x DSP Boot Modes and Configuration Reference Guide

C Fast RTS Library User Guide (Rev 1.0)

TMS320VC5409A Digital Signal Processor Silicon Errata

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

TMS320UC5409/TMS320VC5409 Digital Signal Processors Silicon Errata

TMS470R1x External Clock Prescale (ECP) Reference Guide

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

Choosing the Appropriate Simulator Configuration in Code Composer Studio IDE

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

The TMS320 DSP Algorithm Standard

C Routines for Setting Up the AIC on the TMS320C5x EVM

FlashBurn: A DSK Flash Memory Programmer

Using the TMS320 DSP Algorithm Standard in a Dynamic DSP System

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

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

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

Stereo Dac Motherboard application information

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

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

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

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

Increase Current Drive Using LVDS

Implementation of a CELP Speech Coder for the TMS320C30 using SPOX

Using Endianess Conversion in the OMAP5910 Device

Bootloading the TMS320VC5402 in HPI Mode

Dual Access into Single- Access RAM on a C5x Device

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

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

TMS320C62x, TMS320C67x DSP Cache Performance on Vocoder Benchmarks

IndoTraq Development Kit 1: Command Reference

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

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

SavvyCube Ecommerce Analytics Connector by MageWorx. User Guide

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

GUEST CHECKOUT TO REGISTERED CUSTOMERS

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

TMS320C5x Memory Paging (Expanding its Address Reach)

xdais-dm (Digital Media) User Guide

Writing TMS320C8x PP Code Under the Multitasking Executive

Protecting the TPS25810 from High Voltage DFPs

PMC to PCI Express Adapter with JN4 Connector Breakout

A Multichannel/Algorithm Implementation on the TMS320C6000 DSP

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

XIO1100 NAND-Tree Test

DS25BR204 Evaluation Kit

Texas Instruments Voltage-Level-Translation Devices

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

Power Line Modem with E-Meter Platform Quick Start Guide

Maximizing Endurance of MSC1210 Flash Memory

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

HSKT TM Technology Specifications

System-on-Chip Battery Board User s Guide

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

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

PROGRAMMING THE MSC1210

HIDE PRODUCT PRICE. User Guide. User Guide Page 1

Stacking the REF50xx for High-Voltage References

Understanding Basic DSP/BIOS Features

WL1271 ini File Description and Parameters User's Guide

AC Induction Motor (ACIM) Control Board

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

Donations Ultimate User Guide

Store & Currency Auto Switcher

TMS320C6414T/15T/16T Power Consumption Summary

File Downloads User Guide

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

Upgrading Applications to DSP/BIOS II

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.

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

TMS320C6000 HPI to PCI Interfacing Using the PLX PCI9050

Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218

Performance Analysis of Face Recognition Algorithms on TMS320C64x

TMS470R1VF334E TMS470 Microcontrollers Silicon Errata

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

January 2003 Digital Audio Products SLEU031

Transcription:

Application Report SPRA909A June 2003 A DSP/BIOS AIC23 Codec Device for the TMS320C6416 DSK ABSTRACT Software Development Systems This document describes the usage and design of a device driver for the AIC23 audio codec on the TMS320C6416 DSK. This device driver is written in conformance to the DSP/BIOS IOM device driver model and uses the generic TMS320C6X1X EDMA McBSP driver to transfer samples to and from the serial port. For details on this generic driver, see the application note A DSP/BIOS EDMA McBSP Device for TMS320C6x1x DSPs (SPRA846). Contents 1 Usage............................................................................... 2 1.1 Configuration.................................................................... 3 1.2 Device Parameters............................................................... 4 1.3 Channel Parameters.............................................................. 4 1.4 Control Commands............................................................... 4 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 Maximum Interrupt Latency........................................................ 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 A 1 Device Memory Usage................................................... 6 Trademarks are the property of their respective owners. 1

1 Usage The device driver described here is 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 called the class driver and can be either the DSP/BIOS GIO, SIO/DIO, or PIP/PIO modules. The class driver 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. The diagram below 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 DSP/BIOS Device Developer s Guide (SPRU616). 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 Many mini-driver implementations split the code into a codec-specific portion and a generic portion that will work across many different codecs. Figure 2 shows the data flow between the components in a system in which the mini-driver is split into a generic part and a codec-specific part. This device driver uses the generic TMS320C6x1x EDMA McBSP device driver to transfer samples to and from the serial port. This means that to use this device driver, an application must not only link with this device driver library (dsk6416_edma_aic23.l64), but also with the generic device driver library (c6x1x_edma_mcbsp.l64). Other than this, the use of the generic device driver is hidden from the user. These device driver libraries are compiled for TMS320C641x, but can also be used with TMS320C671x. For example, if you are using TMS320C6713 and additional floating-point optimizations are needed, recompile the libraries for TMS320C6713. Note that this device driver uses both McBSP port 1 and port 2 to communicate with the codec, which implies that they cannot be used for any other purposes. 2 A DSP/BIOS AIC23 Codec Device for the TMS320C6416 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 driver, a device entry has to be added and configured in the configuration tool. This device driver will set up the generic TMS320C6x1x EDMA McBSP driver to meet its needs. Init function: Type _DSK6416_EDMA_AIC23_init. Function table ptr: Type _DSK6416_EDMA_AIC23_Fxns. Function table type: Select IOM_Fxns. Device id: This property is ignored by this device driver, since there is only one AIC23 codec on the TMS320C6416 DSK. Device params ptr: A pointer to your instance of the device parameter structure. Set this property to 0x0 to use the default parameters. The parameter structure and its defaults are described below. Device global data ptr: This property must be set to 0x0. A DSP/BIOS AIC23 Codec Device for the TMS320C6416 DSK 3

1.2 Device Parameters typedef struct DSK6416_EDMA_AIC23_DevParams { Int versionid; Bool cachecalls; Int irqid; AIC23_Params aic23; Uns intrmask; Uns edmapriority; } DSK6416_EDMA_AIC23_DevParams; versionid: Version number of the driver. cachecalls: If this parameter is set to TRUE, the device driver will treat buffers issued to any IOM channel associated with the device as if they are in cacheable memory and the L2 data cache is enabled. The default value of this parameter is TRUE. irqid: This parameter selects which IRQ number to use for the EDMA interrupt. The system default is 8. The default parameter of this value is 8. 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. Register 9: Digital interface activation. Default value is 0x0001. intrmask: Interrupt mask, set in the ISR. edmapriority: Priority queue, to use for all EDMA transfers. 1.3 Channel Parameters This driver does not have any channel parameters. Any values that are passed as channel parameters will be ignored (NULL is suggested). 1.4 Control Commands This device driver has no run-time control commands. 4 A DSP/BIOS AIC23 Codec Device for the TMS320C6416 DSK

2 Architecture The codec specific portion of the mini-driver inherits the features of the generic TMS320C6x1x EDMA McBSP driver. It uses two codec specific functions, mbbinddev() and mdcreatechan(), to do the 6416 DSK and AIC23 specific setup. These functions then call mbbinddev() and mdcreatechan() in the generic driver to complete generic portions of the driver initialization. The only thing the codec-specific part does is to set up the codec and leaves the transfers of samples to the generic device driver. The fact that this device driver uses the generic device driver is hidden from the user in all aspects except that the generic device driver library has to be linked into the application. The AIC23 has a control channel which is used to configure the codec as well as a bidirectional data channel. On the DSK, McBSP1 is used to generate the SPI format control channel signals while McBSP2 is used for audio data. The function mdbinddev() is responsible for configuring the codec through the control channel based on the DSK6416_EDMA_AIC23_DevParams structure that is passed in. It does some basic setup then calls a function called AIC23_setParams() function in aic23.c to do most of the real configuration work. The function mdcreatechan() generates the EDMA configuration used for the data transfers. The configuration is written to match the DSP data format mode of the codec with 16-bit stereo data samples. 3 Constraints Inherits the constraints of the generic TMS320C6x1x EDMA McBSP driver. By default the McBSP signals on the DSK are connected to the AIC23 codec. However, the McBSP signals can be re-routed to the expansion headers for use by daughtercards. The routing is set by bits in the MISC CPLD register on the DSK. The driver assumes that the default on-board routing is used and does not change the CPLD. See the DSK help file for more details on the CPLD registers. 4 References All these documents are available on the TI Developer s Village. 1. A DSP/BIOS EDMA McBSP Device for TMS320C6x1x DSPs (SPRA846) 2. TLV320AIC23 Stereo Audio Codec, 8 to 96 KHz, With Integrated Headphone Amplifier Data Manual, SLWS106D 3. DSP/BIOS Developer s Guide (SPRU616). 4. TMS320C6000 Chip Support Library API Reference Guide (SPRU401) 5. TMS320C6000 Peripherals Reference Guide (SPRU190) 6. TMS320C6000 DSP/BIOS Application Programming Interface (API) Reference Guide (SPRU403) A DSP/BIOS AIC23 Codec Device for the TMS320C6416 DSK 5

Appendix A Device Data Sheet A.1 Device Library Name dsk6416_edma_aic23.l64 When building an application the generic c6x1x_edma_mcbsp.l64 library is required. 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 A.7 Maximum Interrupt Latency A.8 Memory Usage Includes the memory usage of the generic TMS320C6x1x EDMA McBSP device driver. Table A 1. Device Memory Usage Uninitialized memory Initialized memory CODE 1056 words DATA 224 words 272 words NOTE: This data was gathered using the sectti command utility. Uninitialized data:.bss Initialized data:.cinit +.const Initialized code:.text +.text:init 6 A DSP/BIOS AIC23 Codec Device for the TMS320C6416 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