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]
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.
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
- Popular Resources
- Popular amplifiers
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- ARM Embedded System Principles and Applications (Wang Xiaofeng)
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- osk5912 evaluation board example source code
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- [Qinheng Trial] Run the ID reading routine
- [Recruitment] Huawei HiSilicon Semiconductor recruits chip R&D positions
- 【ufun learning】Part 2: Initial test demo example
- Problems with temperature acquisition based on stm32f446re
- MCU+MOS tube stepping subdivision drive control solution
- The release of digital terrestrial television standards has been postponed
- Detailed explanation of MSP430F5529 system working mode
- SensorTile.Box becomes bricked after firmware upgrade
- Window Comparator
- Please recommend, is there any domestic dual-channel H-bridge that can drive motors with an operating voltage of 12V or above?