User guide

Lab 8: SD Card Music Player
79
Chapter
12
Chapter 12
Lab 8: SD Card Music
Player
Many commercial media/audio players use large external storage devices, such
as SD card or CF card, to store music/movie files; many new commercial
audio/media players have very high-end audio DAC circuits to provide users’ the
best sound quality. The DE2 board provides users the hardware and software
platform for SD card access and professional audio performance so that many
multimedia products can be designed using the DE2 board.
In this lab, we are demonstrating how to implement a SD Card Music Player on
DE2 where music files are stored in a SD card and DE2 can play the music files
via its CD-quality audio DAC circuits.
12-1
Design Descriptions
In this project, we use NIOS II CPU to read the music data stored in SD Card and
use audio CODEC to play the music.
The audio CODEC is configured in the slave mode, where users must provide
their own AD/DA serial bit clock (BCK) and left/right channel clock (LRCK) to the
audio CODEC. Therefore, we provide an audio DAC controller IP to achieve the
clock generation and the data flow controlling. The audio DAC controller IP is
integrated into Avalon bus architecture, where we can directly use NiosII CPU to
control the audio DAC controller.
In the operation, NIOS II will check if the FIFO memory of the audio DAC
controller is full. If the FIFO is not full, the NIOS II CPU will read a 512-byte sector
and send the data to the FIFO of the audio DAC controller via the Avalon bus. In
the meantime, the audio DAC controller uses 48Khz sample rate to send the data
and clock signals to the audio CODEC. The design also mixes the data from
microphone-in with line-in for the Karaoke effects.