2.00 DaVinci Linux Audio Driver
User's Guide
Literature Number: SPRUG98 September 2008 2 SPRUG98–September 2008 Submit Documentation Feedback Preface SPRUG98–September 2008 Read This First
About This Manual This user guide provides an overview of the audio driver by providing the driver architecture, design, and supported features. It also provides information on architecture, user Interface, and the sample applications. This user guide defines and describes the usage of user level and platform level interfaces of the ALSA Audio driver. How to Use This Manual This document includes the following Sections: • Chapter 1 - Introduction, provides an overview and supported features of the driver. • Chapter 2 - Architecture, describes the driver architecture and design concepts. • Chapter 3 - Software Interface, describes the application and driver interfaces. • Chapter 4 - Sample Applications, provides an overview about the examples provided along with the release package. Related Documentation From Texas Instruments The following documents are the reference documents from Texas Instruments. To obtain a copy of any of these TI documents, visit the Texas Instruments website at www.ti.com. • TMS320DM646x DMSoC Multichannel Audio Serial Port (McASP) User's Guide (SPRUER1) describes the operation of the multichannel audio serial port (McASP) in the TMS320DM646x Digital Media System-on-Chip (DMSoC). • TLVAIC32 Data Sheet (SLAS479B) provides the features and description of TLVAIC32. Related Documentation You can use the following document to supplement this user guide: • ALSA Project Homepage • ALSA User Space Library
SPRUG98–September 2008 Read This First 3 Submit Documentation Feedback Terms and Abbreviations www.ti.com Terms and Abbreviations The following terms and abbreviations are used in this document. Term/Abbreviation Description ALSA Advanced Linux Sound Architecture API Application Programming Interface DIT Digital Audio Interface Transmission DMA Direct Memory Access EDMA Enhanced Direct Memory Access EVM Evaluation Module PCM Pulse Code Modulation I2C Inter-Integrated Circuit I2S Inter-Integrated Sound McASP Multi Channel Audio Serial Port OSS Open Sound System TDM Time-Division Multiplexed
Trademarks DaVinci is a trademark of Texas Instruments.
4 Read This First SPRUG98–September 2008 Submit Documentation Feedback Chapter 1 SPRUG98–September 2008 Introduction
This chapter provides an overview and the supported features and constraints of the driver.
Topic ...... Page
1.1 Overview ...... 6 1.2 Features ...... 6 1.3 Constraints ...... 6
SPRUG98–September 2008 Introduction 5 Submit Documentation Feedback Overview www.ti.com
1.1 Overview The AIC32 codec transmits and receives audio data on DM700 DaVinci™HD. The AIC32 codec is connected via Multi-Channel Audio Serial Port (McASP) interface, a communication peripheral. McASP functions as a general-purpose audio serial port optimized for the needs of multi-channel audio applications. The McASP is useful for time-division multiplexed (TDM) stream, Inter-Integrated Sound (I2S) protocols, and inter component digital audio interface transmission (DIT). AIC32 supports I2S, Left/Right-Justified, DSP, and TDM Modes.
1.2 Features The ALSA Audio driver supports the following features: • ALSA framework • Simultaneous record and play back capability (full-duplex mode). • The McASP and Codec can work as slave and master or visa versa. This is not a runtime option, but a compile time option. • When Codec is the master and McASP is the slave, the driver supports 34 sample rates (from 7350 Hz - 96000 Hz). When McASP is the master and Codec is the slave, there are only two sampling rates supported (22050Hz and 44100 Hz). • Mono and stereo modes • I2S mode of operation • Interleaved access mode • Mixer support • Uses EDMA for data transfer
1.3 Constraints OSS framework is not supported by the audio driver. Formats other than I2S such as TDM, Left and Right Justified are currently not supported. Opening of the same stream (Play/Record) multiple times is not supported The audio driver will support a single input (RECORD) and single output stream (PLAY). The audio driver will not allow opening the same stream (Play/Record) multiple times concurrently.
6 Introduction SPRUG98–September 2008 Submit Documentation Feedback Chapter 2 SPRUG98–September 2008 Architecture
This chapter provides a Functional Overview and the System architecture and design aspects of the driver.
Topic ...... Page
2.1 Functional Overview ...... 8 2.2 Software Design Interfaces ...... 9
SPRUG98–September 2008 Architecture 7 Submit Documentation Feedback Functional Overview www.ti.com
2.1 Functional Overview The Advanced Linux Sound Architecture (ALSA) provides audio functionality to the Linux operating system. ALSA has the following significant features: • Efficient support for all types of audio interfaces, from consumer sound cards to professional multi-channel audio interfaces. • Fully modularized sound drivers • SMP and thread-safe design • User space library (alsa-lib) to simplify application programming and provide higher level functionality • Support for the older Open Sound System (OSS) API, providing binary compatibility for most OSS programs The system diagram is presented in Figure 2-1.
Figure 2-1. System Diagram
PCLKCR0/1/3 LOSPCP (System Ctrl Regs) (System Ctrl Regs) SYSCLK
Clock Enables LSPCLK
Peripheral I/O SPI-A/B, SCI-A Registers VBus16
Clock Enables /2
Peripheral I/O HECC-A, LIN-A Registers VBus32
Clock Enables
GPIO Peripheral Mux I/O ECAP1, EQEP1 Registers VBus32
Clock Enables
Peripheral I/O ETPWM1/.../5 + OTTO Registers VBus32 / VBUS32DP
Clock Enables
Peripheral I/O I2C-A Registers CPU-VBus16
Clock Enables
ADC CPU-VBus16 16 Ch 12-Bit ADC Registers Analog CPU &