Design of Media Playback Based on ARM9 in Embedded Linux

Publisher:Meiren520Latest update time:2011-05-28 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Most embedded devices now require the realization of audio and video playback functions. ARM9+Linux is widely used in embedded systems. Therefore, a multimedia playback system based on ARM9 under embedded Linux is proposed here.

1 Player system platform
The hierarchical structure of the player's embedded Linux system is shown in Figure 1. After the hardware is powered on, the CPU's program pointer first points to a specific memory address, which is generally stored in the Boot-loader. After the CPU and memory are initialized, the Bootloader decompresses the Linux kernel from the ROM device to the memory, and then the program pointer jumps to the kernel's starting position in the memory, and the Linux kernel continues to complete the rest of the system boot. After the kernel reinitializes the system, it loads the root file system and runs the user application. Figure 2 is a block diagram of the development system hardware design.


The core processor of the system hardware platform is S3C2410X, which is a low-power, highly integrated microprocessor based on ARM7TDMI core designed by Samsung for handheld devices. In order to reduce the total system cost and peripheral devices, this chip also integrates: 16 KB instruction cache, 16 KB data cache, MMU, external memory controller, LCD controller (STN and TFT), NAND Flash controller, 4 DMA channels, 3-channel UART, 1 I2C bus controller, 1 I2S bus controller, as well as 4-channel PWM timer and 1 internal timer, general I/O port, real-time clock, 8-channel 10-bit ADC and touch screen interface, USB master, USB slave, SD/MMC card interface, etc. This processor is widely used in PDA, mobile communication, routers and industrial control.
Software system design must be closely integrated with the hardware platform. S3C2410 uses NAND Flash as the program storage area for the entire system. When the system starts, the Bootloader program in the on-chip ROM loads and executes the external boot program from NAND Flash to implement the startup steps of the entire system. The entire software system adopts the design structure shown in Figure 3.



2 Transplantation of madplay MP3 player
2.1 System code
The data structure of madplay main program header file information is as follows: [page]

2.2 Installation and compilation
This system requires madplay source code, libid3tag library and libmad library. Here we use madplay-0.15.1b.tar.gz, libid3tag-0.15.1b.tar.gz and
libmad-0.15.1b.tar.gz. In addition, zlib library is required for libid3tag library compilation. Copy the files to /home/cvteeh/jx2410/examples. The directory after installation is:

Among them, the install directory is the installation directory after libid3tag and libmad libraries are installed. When compiling madplay, the include and lib subdirectories under this directory must be correctly specified as the include search directory and library file search directory; libid3tag-0.15.1b is the source code directory of the libid3tag library; libmad-0.15.1b is the source code directory of the libmad library; libz is the installation directory of the libbz library, which is used when compiling the libid3tag library; madplay-0.15.1b is the madplay source program directory; mkall is the compilation script.
Directly execute the following statement in this directory:
[root@localhost madplay]#./mkall
This script will compile the libid3tag library, libmad library and madplay. After successful compilation, the madplay file is generated in the madplay-0.15.1b directory, which is the MP3 player program.

[page]

After successful compilation, the mplayer file will be generated in the madplay directory. This file is the mplayer media player program:
[root@localhost madplay-0.15.1b]#cp madplay/tftpboot
download and run. Start the ARM9+Linux platform and use the MP3 audio file zgl.mp3 in the U disk. The system uses this file for testing:

Insert the earphone into the SPK socket. If it is normal, you will hear the song.

3. Porting of the mplayer media player
mplayer only supports graphics display above 16 bpp, but not 8 bpp. Therefore, when the mplayer program runs in a teaching system with LCD configured as STN, it can only play sound but not display graphics. When the LCD is configured as TFT, it can play sound and display graphics.
The following is the audio and video synchronization code

The installation and compilation results are as follows:

There is a script file in the MPlayer-0.93 directory: mkall. This file is a compilation script. Execute directly in this directory:
[root@localhost MPlayer-0.93]#. /mkallThis
script will configure and compile mplayer. The following are the configuration and compilation commands performed by the script:

After successful compilation, the mplayer file will be generated in the MPlayer-0.93 directory. This file is the mplayer media player program.
[root@localhost MPlayer-0.93]# cp mplayer/tftpbootDownload
and run. Start the ARM9+Linux platform and test it with the mpeg video in the USB flash drive.

Insert the earphones into the SPK socket and observe the LCD display. Test whether the system has audio and video output.

4 Conclusion
This system design has good portability. Its implementation process and core code have good versatility for similar applications. It can be ported to different operating systems and platforms with only minor modifications. It can be widely used in various embedded systems, such as PDAs, smart phones, etc., and has high economic value. This design has good characteristics such as low coupling, high cohesion, scalability, and portability. It supports multimedia files with encoding formats such as MPEG-1, MPEG-2, MPEG-3, and MPEG-4.

Reference address:Design of Media Playback Based on ARM9 in Embedded Linux

Previous article:Methane volume fraction monitoring system based on ARM and rational number filtering
Next article:Structure, function and application of home remote medical monitoring terminal based on ARM9 processor

Recommended ReadingLatest update time:2024-11-17 01:34

Solution of ECG Defibrillation Simulation Generation System Based on ARM9
With the development of society, people's awareness of medical care is getting stronger and stronger, so the training of doctors has become a very important link. As a major aspect of doctor training, ECG defibrillation technology can often save people from danger in an emergency if the operation is standardized and
[Microcontroller]
Solution of ECG Defibrillation Simulation Generation System Based on ARM9
Porting OpenCV2.0.0 to ARM9 (III) (JZ2440----S3c2440)
We have cross-compiled and generated OpenCV libraries and libjpeg-related libraries. Now let's try to write and cross-compile an OpenCV application. 1. Opencv test program test.cpp program code: #include stdio.h #include highgui.h #include imgproc.h int main(int argc,char *argv ) { IplImage* img = cvLoadIma
[Microcontroller]
Porting OpenCV2.0.0 to ARM9 (III) (JZ2440----S3c2440)
Key interruption---We played mini2440 (arm9) bare metal together in those years
ARM interrupt control system Key driver design 1. Arm interrupt control system 1. Query method The program continuously queries the status of the device and responds accordingly. This method is relatively simple to implement and is often used in relatively simple systems. For example, a temperature control system can
[Microcontroller]
Key interruption---We played mini2440 (arm9) bare metal together in those years
ARM9(S3C2440) LCD
LCD is the abbreviation of liquid crystal display. Liquid crystal displays are divided into static drive, simple matrix drive and active matrix drive according to the driving mode. Simple matrix drive is divided into two types: twisted nematic (TN) and super twisted nematic (STN). Active matrix drive is mainly bas
[Microcontroller]
Design and implementation of USB communication based on embedded ARM9
introduction USB (Universal Serial Bus) is the abbreviation of universal serial bus. It has become the mainstream interface of computers because of its convenience, dynamic bandwidth allocation, excellent fault tolerance and high cost performance. With the widespread application of embedded systems, various small
[Microcontroller]
Design and implementation of USB communication based on embedded ARM9
Design of ECG Simulation Waveform Generator System Based on ARM9
0 Preface   With the development of society, people are paying more and more attention to the development of health care, and the requirements for medical technology are getting higher and higher. In reality, many cases cannot be learned through real cases, and more doctors can only be trained through simulation equ
[Microcontroller]
Design of ECG Simulation Waveform Generator System Based on ARM9
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号