NO:
W90P710 Programming Guide
VERSION:
2.0
PAGE:
140
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed, distributed or reproduced without permission
from Winbond.
Table No.: 2005-W90P710-11-A
6.
Set the register
ACTL_PDSTB
and
ACTL_PDST_LENGTH
to set the DMA play
destination base address and the DMA play buffer length.
7.
Set the register
ACTL_RESET
to set channel and start to play.
10.5.2 I2S
Record
W90P710 audio controller provides DMA function for transferring PCM data from external I2S
codec to main memory. It supports single-channel or 2 channels transfer. It should set base and
address by programming register
AUDIO_RDESB
and
ACTL_RDES_LENGTH
. The data
arrangement in record DMA buffer was shown in the following figure:
Figure 10-5 I2S Record Data in DMA buffer
Base ADDR.
DMA buffer (2 channels)
0x10000
Left channel – LSB byte
0x10001
Left channel – MSB byte
0x10002
Right channel – LSB byte
0x10003
Right channel – MSB byte
0x10004
Left channel – LSB byte
0x10005
Left channel – MSB byte
0x10006
Right channel – LSB byte
0x10007
Right channel – MSB byte
… …
DMA buffer (1 channel)
0x10000 Left channel – LSB byte
0x10001 Left channel – MSB byte
0x10002 Left channel – LSB byte
0x10003 Left channel – MSB byte
0x10004 Left channel – LSB byte
0x10005 Left channel – MSB byte
0x10006 Left channel – LSB byte
0x10007 Left channel – MSB byte
… …
Note: The DMA buffer is double buffering. It will trigger an interrupt when half-length of the DMA
buffer is recorded.
To playback PCM data by external I2S codec, please follow the steps below:
1. Initial the L3 interface through three GPIO pin to control the external audio CODEC.
Including turn on the ADC and set the volume.
2. Set the bit
IIS_RESET
of
ACTL_RESET
to reset IIS
3. Set the bits
AUDCLK_EN to enable the audio controller clock
, RFIFO
_EN to enable the
record FIFO
,
DMA_EN to enable DMA
,
the BLOCK_EN[0] to enable IIS interface
, and
AUDIO_EN
to enable the audio controller. These bits are all in the register
ACTL_CON.
Length