Design and Implementation of Embedded Linux Audio Driver and A Simple Player

Author
ZhaoPeng
Advisor
ZhaoHongWei
School
Jilin University
Major
Software Engineering
Classification
TN912.2 Electro-acoustic technology and equipment
Degree
Master's thesis
Year
2009
Downloads
453
Citations
3

Request the full text

Abstract

With the rapid development of computer technology, embedded audio system has been applied to all aspects of people’s life and community, Embedded audio technology is widely used in automotive audio, 3G mobile phones, personal digital assistants (PDA), portable multimedia players (PMP) and so on.After studying the Samsung S3C2410 processor and UDA1341 codec,The purpose of this paper is to connect an embedded audio system with them using IIS audio bus , design of the the corresponding hardware connection and logic working frame, and prepare the device driver of the audio codec chip UDA1341TS.All of these are done for implementing playing and rewording of sound. On this basis, achieve a simple player application to verity the driver functions’s design and implement are correct.Considering the conditions of laboratory equipment, selected UP-NETARM2410-S development platform laboratory equipment provided by BoChuang company for development working. UP-NETARM2410-S development platform uses S3C2410 microprocessor CPU, audio codec chip UDA1341TS devices is included, and its peripheral equipment have a wealth expansion.S3C2410 microprocessor has a built-in IIS bus interface, you can directly connect the external UDA1341TS audio codec chip. S3C2410 processor and audio codec chip UDA1341TS are connected in two parts of hardware pins: one is the IIS bus pins for transmissing audio data; the other part is the L3-pins connection interface for controlling audio signals, such as the volume size.S3C2410 microprocessor uses ARM9 core, ARM chip with built-in IIS interface can read data from IIS bus,at the same time it can also provide data transmission/reception mode based on the DMA channel for the FIFO data, in order to achieve full-duplex mode. The chip uses two serial data lines as input and output lines. IIS data lines can receive and send audio data at the same time through the dual-channel DMA, so that sending and receiving data can both work in the same time.The output audio buffer is set of DMA channel 2, input audio buffer is set of DMA channel 1.Because IIS bus only deal with audio datas, so UDA1341TS chip provide IIS speaker and microphone interface, but also provide built-in L3-bus interface to control the transmission of the audio datas, L3 interface is equivalent to mixer control interface, through the L3 interface, S3C2410 processor can do a variety of settings to UDA1341TS, including the system frequency, power control, volume and so on.S3C2410 and UDA1341TS communicate with L3CLOCK, L3DATA, L3MODE pins.L3 interface trsmission timing is controlled by GPIO port programming, through the L3 interface, informations is divided into two modes, address mode and data mode. Address mode is used to determine the addresses of data transmission’s purpose register through the L3 interface, data model is used to set the specific bits of the register to achieve the UDA1341TS chip initialization setting.Device driver application shieldes the details of the hardware, so that applications can operate the hardware device as ordinary documents. Each driver has a file_operations data structure, which include a series of function pointers, pointing to the developed interface. When the process using system calls such as read or write operations to access a equipment, the system finds the device driver through the corresponding major device number of device, and then read the data structure of the corresponding function pointer, give the controlling rights to the interface function, complete the call. Therefore, the preparation of a driver is to complete the file_operation structure’s function pointers .In the designing process of the Audio equipment driver, DMA buffer memory management and designing are the most complex parts. Audio equipment needs high real-time requirements, so the reasonable using of memory can speed up the handling of audio data, and reduce the delay time. BDMA controllers of Samsung company have no built-in DMA storage area, the driver must allocate DMA buffers for the audio device. The sound datas which is need to be played or recorded can be loaded into the DMA buffer directly. In this paper, the whole cache will be divided into a number of data segment buffer. Such a large segment of the data processing is divided into several short paragraphs, After dealing with a segment buffer data, they can be sent through the DMA.UDA1341TS driver is composed of two parts, one is DSP devices for voice recording and playing, the other one is Mixer devices used to control sound, we need registering two device to the kernel. Developing driver is to complete the corresponding functions in accordance with the actual hardware.DSP driver implement: equipment opening function completes the inspection of equipment, such as the number of users, the way of opening and so on; equipment closing function completes the release of the buffer area and the closure of documents and equipments; Audio data writing function implements playing sound function, first copy user data to the kernel address space, and then create a DMA buffer, write data to the buffer, and then send data into DMA transfer queue, through channel 2 sending data in order to play sound; audio data reading function implements recording audio data, the process is similar to writing, but the direction of data transmission is opposite; audio data of the control function controlls of the voice sampling rate, stereo, channel selection and speeding and so on..The realization of Mixer drive is relatively simple, it mainly used to control audio mixing effects, there is no implementation of reading or writing operations. Finally,in the Qt/Embedded development environment, programing a simple player application,to test whether the driver development is correct or not.As a central issue of modern human visual perception study, embedded audio system will be research and development continue in-depth. Among the significance not only provides the feasibility of experimental basis for correlation theory, but more importantly, for a new try for new design, for the further research and application of future synchronization integration methods provide a viable and meaningful theory and practice basis.

Table of contents

Summary 4-8 Chapter 1 Introduction 8-11 1.1 subject source and its significance 8 1.2 embedded audio systems and driver Overview 8-9 main work of the 1.3 papers 9 1.4 papers organizational structure 9-11 Chapter 2, embedded systems and drivers 11-17 2.1 Embedded System Overview 11-12 2.1.1 embedded systems definition 11 2.1.2 embedded system characteristics 11-12 2.2 embedded systems architecture 12-13 2.3 embedded processor 13-14 2.4 embedded Linux operating system 14 2.5 ARM chips 14-16 2.6 embedded Linux drivers 16-17 Chapter 3 embedded audio system pin connection and communication logic design 17-25 3.1 S3C2410 processor chips, and UDA1341TS audio codec chip 17-18 3.2 Audio Bus Interface Overview 18 3.3 S3C2410 microprocessor IIS audio bus interface 18-21 3.3.1 IIS audio bus interface 19-20 3.3.2 of S3C2410 IIS interface operating mode 20 3.3.3 IIS bus register 20-21 3.4 S3C2410 and UDA1341TS pin connection diagram 21-22 3.5 L3 interface timing 22-23 3.6 audio device drivers for the communication 23-25 Chapter 4 the UDA1341TS chip driver design and 25-43 4.1 Linux device driver functions and interfaces 25-27 4.1.1 Linux facilities General 25-26 4.1.2 Linux device driver interface 26-27 4.2 audio driver architecture 27-29 4.2.1 UDA1341TS audio chip features 27-28 the file_operations data structure 4.2.2 Audio Driver 28-29 4.3 DMA buffer design and memory management 29-32 4.3.1 DMA buffer structure design 29-31 4.3.2 DMA buffer operation designed 31-32 4.4 Audio Driver loading and unloading 32-35 4.4.1 driver loading mode 32-33 4.4.2 Audio Driver loading 33-35 4.4.3 Audio Driver uninstall 35 4.5 audio device file (DSP) drive to achieve 35-41 4.5.1 DSP device to open and release 35-37 4.5.2 the DSP device to read and write functions 37-40 4.5.3 DSP device control operation function 40-41 4.5.4 DSP device driver 41 4.6 Mixer drive to achieve 41-43 Chapter 5 driver debugging the design and implementation of the transplant and simple player 43-50 5.1 UDA1341TS driver debugging 43-44 5.2 UDA1341TS driver transplantation 44-46 5.2.1 cross-compile environment to establish 44-46 5.2.2 UDA1341TS driver transplantation 46 5.3 simple player application design and 46-50 5.3.1 of Qt / Embedded Profile 46-47 5.3.2 simple player application design and 47-50 Chapter 6 Conclusions and outlook 50-52 6.1 Conclusion 50-51 6.2 Looking 51-52 References 52-54 thank 54-55 Summary 55-57 Abstract 57-59

Related dissertations

  1. Research and Implementation of Video Surveillance System Based on Embedded Linux
    FengMiao ·Wuhan University of Technology ·2007 ·Master's thesis
  2. Research and Design of Embedded Building Security System
    YangChen ·Liaoning Normal University ·2012 ·Master's thesis
  3. The Design and Application Research of Audio and Video Acquisition System Based on S3C2440
    PengZhiHui ·Hunan University ·2013 ·Master's thesis
  4. The Key Technology of High-power Magnesium Alloy Micro-plasma Oxidation Power
  5. Design and Implementation of GriDoc Management System
  6. Research of vehicle driver training management system
    ZhangWenJun ·Shandong Normal University ·2014 ·Master's thesis
  7. The Study of PCIe Interface Encryption Card Driver under the Linux
  8. Embedded Linux-based USB Encryption Driver Design
  9. Development of Test Resource Interface Specification Inspection Equipment
    ZhangZuoDong ·Harbin Institute of Technology ·2012 ·Master's thesis
  10. Image Monitoring System Based on ARM and GPRS Communication Technology
    YanShiBao ·Liaoning Normal University ·2012 ·Master's thesis
  11. Research on information coding and decoding technology of digital audio stream
  12. Research on the Driving Technoloy of the High Power and High Rate Electro-Optic Modulator RF
  13. Research and Design on Temperature and Humidity Monitoring System Based on ZigBee Wireless Sensor Network
  14. The Research and Design of Intelligent Supermarket Guide System Based on ZigBee and ARM9
    SuWen ·Chinese Geology University (Beijing) ·2014 ·Master's thesis
  15. Software and Hardware Design and Implement of the Driver of the Thermal Lithographic Module in High-speed Card Producing Equipment
    HuEnCi ·South China University of Technology ·2013 ·Master's thesis
  16. Based on the40Nm Process LVDS Design and Implementation
    MaJuan ·Beijing Jiaotong University ·2014 ·Master's thesis
  17. Operating Properties of High-voltage Switch's Test System Study
    YangHanJing ·East China Jiaotong University ·2013 ·Master's thesis
  18. A Two-stage Electrolytic Capacitor-less AC-DC LED Driver
  19. The Design and Implementation of LLC120W LED Driver
  20. Design of a Kind of Direct Current Servo Motor Driver