-------------------------------------------------------------------------------
Example: C Block-based SPDIF-to-DAC TalkThrough
Target: ADSP-21489
Hardware: ADSP-21489 EZ-board
-------------------------------------------------------------------------------
This project contains a talkthrough example using the onboard AD1939 and onchip
SPDIF receiver to acquire and output an audio stream. The digital audio data is
available for processing in the file SPORTisr.c. The block size is 1024 samples.
The SPDIF receiver derives the MCLK, BCLK, and LRCLK from the input data. The
data output of the SPDIF receiver is connected to SPORT 0A. DAC1 is connected
to SPORT 1A, DAC2 to SPORT 1B, DAC3 to SPORT2A, and DAC4 (Headphone output) to
SPORT2B. All channels of the codec are accessed in I2S mode. See initSRU.c for
the details of which DAI pins are used to access the codec and SPDIF receiver.
Use #defines to select the output channel.
-------------------------------------------------------------------------------
Instructions: Apply an input signal to J7 on the ADSP-21489 EZ-board, and
attach an output device to the selected channel of J4 or J5 (middle and top
connectors). Make sure that the loopback (J2) jumper is off. By default all DAC outputs are selected. To disable output
on a particular DAC uncomment the define statement corresponding to it
in the initSPORT.c file
Output combinations:
- J4 middle row RCA connectors - DAC OUT 1 Left/Right Channel
- J5 middle row RCA connectors - DAC OUT 2 Left/Right Channels
- J4 top row RCA connectors - DAC OUT 3 Left/Right Channels
- J5 top row RCA connectors - DAC OUT 4 Left/Right Channels
- Headphone jack (H)
| J8 | J4 | J5 |
---------------------------------------
| | *O3l* | *O3r* | *O4l* | *O4r* |
| | +O1l+ | +O1r+ | +O2l+ | +O2r+ |
| *H* | +I1l+ | +I1r+ | *I2l* | *I2r* |
---------------------------------------
Switch settings for rev 0.1 EZ-Board:
SW1 ON, ON, ON, ON, ON, ON, ON, ON
SW2 ON, ON, ON, ON, OFF, OFF, ON, ON
SW3 ALL ON
SW7 ALL ON
SW15-18 ON, OFF, ON, OFF, ON, OFF
SW23 ALL ON
SW24 ALL OFF
SW25 ALL OFF
NOTE: If the application is halted within the VDSP system, the executable should
be reloaded to the target to ensure proper operation.
-------------------------------------------------------------------------------
Source Files contained in this directory:
SPDIF to Analog TalkThru.dpj VisualDSP project file
init1939viaSPI.c SPI Flash Subroutines
initSRU.c Set up the SRU to connect to the AD1939
initSPDIF.c Set up the SPDIF receiver
main.c Main section to call setup routines
initSPORT.c Initialize the SPORT DMA to communicate with the AD1939
initPLL_SDRAM.c Configures the DSP to run at CCLK= 400 MHz & SDCLK= 160 MHz
SPORTisr.c Process SPORT 0 interrupts
blockProcess.c Process the audio data in the current block
ad1939.h Macro Definitions for AD1939 registers
tt.h Includes and external declarations used for all files
-------------------------------------------------------------------------------
Dependencies contained in VisualDSP++ default include path:
def21489.h Header file with generic definitions for ADSP-21489
SRU.h Header file with SRU definitions and Macros
*******************************************************************************
Analog Devices, Inc.
DSP Division
Three Technology Way
Norwood, MA 02062
*******************************************************************************
SPDIF.zip_SPDIF 源码_sharc_音频采样率
版权申诉
5星 · 超过95%的资源 46 浏览量
2022-09-19
22:00:27
上传
评论 1
收藏 32KB ZIP 举报
JaniceLu
- 粉丝: 78
- 资源: 1万+